ZHANGYUXUAN-zR commited on
Commit
9430ec1
·
verified ·
1 Parent(s): 121a6e6

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/B1lG42C9Km/B1lG42C9Km.md +392 -0
  2. parse/train/B1lG42C9Km/B1lG42C9Km_content_list.json +0 -0
  3. parse/train/B1lG42C9Km/B1lG42C9Km_middle.json +0 -0
  4. parse/train/B1lG42C9Km/B1lG42C9Km_model.json +0 -0
  5. parse/train/BJg15lrKvS/BJg15lrKvS.md +0 -0
  6. parse/train/BJg15lrKvS/BJg15lrKvS_content_list.json +0 -0
  7. parse/train/BJg15lrKvS/BJg15lrKvS_middle.json +0 -0
  8. parse/train/BJg15lrKvS/BJg15lrKvS_model.json +0 -0
  9. parse/train/BJxLH2AcYX/BJxLH2AcYX.md +369 -0
  10. parse/train/BJxLH2AcYX/BJxLH2AcYX_content_list.json +0 -0
  11. parse/train/BJxLH2AcYX/BJxLH2AcYX_middle.json +0 -0
  12. parse/train/BJxLH2AcYX/BJxLH2AcYX_model.json +0 -0
  13. parse/train/BkSmc8qll/BkSmc8qll.md +451 -0
  14. parse/train/BkSmc8qll/BkSmc8qll_content_list.json +0 -0
  15. parse/train/BkSmc8qll/BkSmc8qll_middle.json +0 -0
  16. parse/train/BkSmc8qll/BkSmc8qll_model.json +0 -0
  17. parse/train/BkgYPREtPr/images/066175af26ade87ef420ad40c58c4452f8ece88a66ac76e90f88a068840ebd7c.jpg +3 -0
  18. parse/train/BkgYPREtPr/images/12567491105ff78e397b8e0bafd6d07f4e0f00fdf6a056fc29a9afb37e1011a1.jpg +3 -0
  19. parse/train/BkgYPREtPr/images/1d5eaa40baa0a9adb3bdfa97f37c5c61623ab810e84ef379d09259709df9b0e4.jpg +3 -0
  20. parse/train/BkgYPREtPr/images/211aef153d54559dad958c17bfa2018004136b7685bc3cf6e29b51a98cb37382.jpg +3 -0
  21. parse/train/BkgYPREtPr/images/244d9eb4162103278e38ebcf9f6c3fae6a695441df234562e62e061229592d61.jpg +3 -0
  22. parse/train/BkgYPREtPr/images/2d14d0e2b29edf052b00c5624104bc69a4b813db77c87f132af3872ca1e0df83.jpg +3 -0
  23. parse/train/BkgYPREtPr/images/3dbd1f5d1f519066236c9331cb51d2898b592d20f173cbb2c0c144ea285f871f.jpg +3 -0
  24. parse/train/BkgYPREtPr/images/46b7091903c117c2e472c306df82dac9b9b1ce8fccf50a4d154ed5cd567dd5b0.jpg +3 -0
  25. parse/train/BkgYPREtPr/images/47e66723c86bd642f34030c67e03d7d775c0518e6669ae9c9d21c25fdc0fa895.jpg +3 -0
  26. parse/train/BkgYPREtPr/images/58eef280515505d2d2a197f0815c1b5e745e524840a019420424404c881865fc.jpg +3 -0
  27. parse/train/BkgYPREtPr/images/5c1db73dcb5b3fc5e3ef840365db4876bb70b01e700a39d154afa83332a0b7a8.jpg +3 -0
  28. parse/train/BkgYPREtPr/images/604b4047c708aa608825994b79054dc45866f894e762b2dea61dbb1e5d78f317.jpg +3 -0
  29. parse/train/BkgYPREtPr/images/69faf379f7b86e81a31ac7cde5d9a6d26b838717c5ed192578fa109d9039f679.jpg +3 -0
  30. parse/train/BkgYPREtPr/images/7674f229951c2cac24c31140a8aaae74f4f711ada20d1e1d4b4ad44b0f8351dd.jpg +3 -0
  31. parse/train/BkgYPREtPr/images/7d83acaa24389edd2280bbbaeec81b83c93918316c7c749434afef3ec1fa4a2e.jpg +3 -0
  32. parse/train/BkgYPREtPr/images/82006e85767afeac6b04f57786af22c9d5f9daee7cfe8516652bd6de02ac6884.jpg +3 -0
  33. parse/train/BkgYPREtPr/images/83b5660a973c4dc436d8959be4cf1868b47997b26d7f9f5e681925629384c6b3.jpg +3 -0
  34. parse/train/BkgYPREtPr/images/8d1b84cee8f0bdd381c9e9b27d07f884439873a400ac83b5561d904c15297b6a.jpg +3 -0
  35. parse/train/BkgYPREtPr/images/8e9d95c519606a34e4b13b0a5a508d99139fce19b7ab0939cd5f87effadb965c.jpg +3 -0
  36. parse/train/BkgYPREtPr/images/928b160a39136b7a95f56e26b6408e07ac879442583ef9c027670d3a898e4e6e.jpg +3 -0
  37. parse/train/BkgYPREtPr/images/9a21ffa9e2d59c98ed0251c75ddf083c188ef56ae61e6a4c1d5a34cc6c2f612a.jpg +3 -0
  38. parse/train/BkgYPREtPr/images/a692b4e7c3b0e871013011cf7c192888522d08c6ef52db13d5aace12288d8481.jpg +3 -0
  39. parse/train/BkgYPREtPr/images/b984b2d7fc940f0c081de21685e85cab62c13266e79dfd784038cb20f8d48b4d.jpg +3 -0
  40. parse/train/BkgYPREtPr/images/ba13579af38b65d9adb43b36d245df8956ec780539b558ba49a9813db37afa1a.jpg +3 -0
  41. parse/train/BkgYPREtPr/images/bb84020d14394637248edf3dde128a9af425810b173e863d12de5f7badcf873f.jpg +3 -0
  42. parse/train/BkgYPREtPr/images/c70f8eea76b7d41e606bd8ff096251202e2055959db8d56f7de1010669a612ae.jpg +3 -0
  43. parse/train/BkgYPREtPr/images/d01575285c4fe0dbbb50cf80c42081c9b34cbce99ee011dfeae65ad2b7853cac.jpg +3 -0
  44. parse/train/BkgYPREtPr/images/d79ed8533c2414feaafacaffc61ee1cf39bf13c3bc22d69b657dfa347093f1b7.jpg +3 -0
  45. parse/train/BkgYPREtPr/images/d8edef04ebcaf8356a642dab32e6e9738edbcd86e2f6c04891aa9dd60b00e959.jpg +3 -0
  46. parse/train/BkgYPREtPr/images/d97e59307a592699aa87a2c136a20f8f58f31165ceb40016c1a9bfa840d010cb.jpg +3 -0
  47. parse/train/BkgYPREtPr/images/da0653d940a2d7564549b2253a7aafae4fd8d9cbaa3f2890e6ccf4c2cc261742.jpg +3 -0
  48. parse/train/BkgYPREtPr/images/e8c24983c3fed7cf6a51524359b7491dbc3fe35a3d656cc0408f581fb320a6a0.jpg +3 -0
  49. parse/train/BkgYPREtPr/images/eee0d8f6c04f4bfdbfb00b4d5eeb875bdcd1f04d436115517315983e6d9cad88.jpg +3 -0
  50. parse/train/BkgYPREtPr/images/f39b053fb4377ba51e492d655adf677dbfc95921a2904d29437cf470b644fd76.jpg +3 -0
parse/train/B1lG42C9Km/B1lG42C9Km.md ADDED
@@ -0,0 +1,392 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # INTRINSIC SOCIAL MOTIVATION VIA CAUSAL INFLUENCE IN MULTI-AGENT RL
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We derive a new intrinsic social motivation for multi-agent reinforcement learning (MARL), in which agents are rewarded for having causal influence over another agent’s actions. Causal influence is assessed using counterfactual reasoning. The reward does not depend on observing another agent’s reward function, and is thus a more realistic approach to MARL than taken in previous work. We show that the causal influence reward is related to maximizing the mutual information between agents’ actions. We test the approach in challenging social dilemma environments, where it consistently leads to enhanced cooperation between agents and higher collective reward. Moreover, we find that rewarding influence can lead agents to develop emergent communication protocols. We therefore employ influence to train agents to use an explicit communication channel, and find that it leads to more effective communication and higher collective reward. Finally, we show that influence can be computed by equipping each agent with an internal model that predicts the actions of other agents. This allows the social influence reward to be computed without the use of a centralised controller, and as such represents a significantly more general and scalable inductive bias for MARL with independent agents.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep reinforcement learning (RL) has made impressive progress on specific tasks with well-defined reward functions, but is still difficult to learn intelligent behavior that generalizes across multiple domains. Intrinsic motivation is a technique for solving this problem by developing general reward functions that encourage an agent to learn across a variety of tasks (Singh et al., 2004). Previous approaches to intrinsic motivation have broadly fallen into two categories: (1) curiosity, or a drive for novelty (e.g. Pathak et al. (2017); Schmidhuber (2010)), and (2) empowerment, or a drive to be able to manipulate the environment (Klyubin et al., 2005).
12
+
13
+ We posit that this body of work has largely overlooked an important intrinsic motivation that is key to human learning: social interaction. Humans have remarkable social learning abilities; some authors suggest that it is social learning that has given rise to cultural evolution, and allowed us to achieve unprecedented progress and coordination on a massive scale (van Schaik & Burkart, 2011; Herrmann et al., 2007). Others emphasize that our impressive capacity to learn from others far surpasses that of other animals, apes, and even other proto-human species (Henrich, 2015; Harari, 2014; Laland, 2017).
14
+
15
+ Therefore, we propose an intrinsic reward function designed for multi-agent RL (MARL), which awards agents for having a causal influence on other agents’ actions. Causal influence is assessed using counterfactual reasoning; at each timestep, an agent simulates alternate, counterfactual actions that it could have taken, and assesses their effect on another agent’s behavior. Actions that lead to relatively higher change in the other agent are considered to be highly influential and are rewarded. We show how this reward is related to maximizing the mutual information between agents’ actions, and is thus a form of social empowerment. We hypothesize that rewarding influence may therefore encourage cooperation between agents. We also take inspiration from experiments in human cognition, showing that newborn infants are sensitive to correspondences between their own actions and the actions of other people, and use this to coordinate their behavior with others (Tomasello, 2009; Melis & Semmann, 2010).
16
+
17
+ To study our proposed social influence reward in the MARL setting, we adopt the Sequential Social Dilemmas (SSDs) of Leibo et al. (2017). These are challenging MA environments with a game-theoretic reward structure, similar to Prisoner’s Dilemma. For each individual agent, ‘defecting’ (non-cooperative behavior) has the highest payoff. However, the collective reward will be better if all agents choose to cooperate. The paradoxical payoff structure of these tasks make achieving cooperative social dynamics extremely challenging for typical RL agents. We show that social influence allows agents to learn to cooperate in these environments, and make the following contributions:
18
+
19
+ • We demonstrate that deep RL agents trained with the proposed social influence reward cooperate to attain higher collective reward than baseline deep RL agents (Mnih et al., 2016). In some cases, this cooperation is attained because influencer agents learn to use their actions as an emergent communication protocol, analogous to behavior seen in animals (von Frisch, 1969). Motivated by the previous point, we apply the influence reward to training deep RL agents to use an explicit communication channel, as in Foerster et al. (2016). We demonstrate that the communication protocols trained with the influence reward meaningfully relate to agents’ actions, and that once again, agents trained with the influence reward achieve better collective outcomes. We demonstrate that there is a significant correlation between being influenced through communication messages and obtaining higher individual return, suggesting that influential communication is beneficial to the agents that receive it. Finally, rather than computing social influence using a centralised training framework as in prior work (e.g. Foerster et al. (2017; 2016)), we extend the approach by attaching an internal Model of Other Agents (MOA) network to each agent and training it to predict the actions of every other agent. The agent can then simulate counterfactual actions and use its own internal MOA to predict how these will affect other agents, thus computing its own intrinsic influence reward.
20
+
21
+ Using a MOA to predict and reward influence allows us to compute an intrinsic social reward by observing other agents’ past actions, without a centralised controller, and without requiring access to another agent’s reward function. We believe this is an important innovation over prior work (e.g. (Hughes et al., 2018; Foerster et al., 2017; 2016)). When we consider likely future applications of MARL, such as autonomous driving, it becomes apparent that centralised training or the sharing of reward functions are unrealistic assumptions, since autonomous vehicles are likely to be produced by a wide variety of organizations and institutions with mixed motivations. Rather, a social reward function which only depends on observing the behavior of agents acting in the environment, and which can give rise to coordinated, cooperative behavior, represents a more promising approach.
22
+
23
+ # 2 METHODS
24
+
25
+ We consider a MARL Markov game defined by the tuple $\langle S , T , A , r \rangle$ , in which multiple agents which do not share weights are trained to independently maximize their own individual reward. The environment state is given by $s \in S$ . At each timestep $t$ , each agent $k$ chooses an action $a _ { t } ^ { k } \in A$ . The actions of all $N$ agents are combined to form a joint action $\pmb { a } _ { t } = [ a _ { t } ^ { 0 } , . . . a _ { t } ^ { N } ]$ , which produces a transition in the environment $T _ { \cdot } ( s _ { t + 1 } | \mathbf { a } _ { t } , s _ { t } )$ , according to the state transition function $T$ . Each agent then receives its own reward $r ^ { k } ( a _ { t } , s _ { t } )$ , which may depend on the actions of other agents. A history of these variables over time is termed a trajectory, ${ \boldsymbol { \tau } } = \left\{ { { s _ { t } } , { a _ { t } } , { r _ { t } } } \right\} _ { t = 0 } ^ { T }$ . We consider a partially observable setting in which each agent $k$ can only vieture reward, true sta, where , $s _ { t } ^ { k }$ . Each agent seeks to maximize its own total discount factor. A distributed asynchronous a ectedntage $\begin{array} { r } { R ^ { k } = \sum _ { i = 0 } ^ { \infty } \gamma ^ { i } r _ { t + i } ^ { k } } \end{array}$ $\gamma$
26
+ $\pi ^ { k }$ policy is learned via REINFORCE with baseline (Williams, 1992). Architecturally, our agents consist of a convolutional layer, fully connected layers, a Long Short Term Memory (LSTM) network (Gers et al., 1999), and linear layers which output $\pi ^ { \dot { k } }$ and the value function $V ^ { \pi _ { k } } ( s )$ . We will refer to the internal LSTM state of agent $k$ at timestep $t$ as $\dot { u } _ { t } ^ { k }$ .
27
+
28
+ # 2.1 INTRINSIC SOCIAL MOTIVATION VIA CAUSAL INFLUENCE
29
+
30
+ Social influence intrinsic motivation modifies an agent’s reward function so that it becomes $R ^ { k } = \alpha E ^ { k } + \beta I ^ { k }$ , where $E ^ { k }$ is the extrinsic or environmental reward, and $I ^ { k }$ is the causal influence reward. We compute $I ^ { k }$ by generating counterfactual actions that the agent could have taken at each timestep, and assessing how taking these would have affected other agents’ behavior. A counterfactual is the estimated probability that $^ { 6 6 } Y$ would be $y$ had $X$ been $x$ , in situation $Z = z ^ { \prime }$ , where $X , Y ,$ , and $Z$ are random variables, and $x , y$ and $z$ are their values (Pearl et al., 2016). Importantly, it is a counterfactual because we condition on a set of evidence $z$ , and because the assignment $X = x$ is counter to what we actually observed; in reality, $X$ took on some other value.
31
+
32
+ ![](images/d4c9d865d0914f582cec2f90cb9102528669a3d0feda5b6e015295234f191f06.jpg)
33
+ Figure 1: Causal diagram of agent $A$ ’s effect on $B$ ’s action. We condition on each agent’s view of the environment and LSTM state $u$ (shaded nodes), and intervene on $a _ { t } ^ { \dot { A } }$ (blue).
34
+
35
+ To see how we can compute the causal effect of one agent on another, suppose there are two agents, $A$ and $B$ , and that agent $B$ receives $A$ ’s action at time $t$ taction, know a , as input1. Agent $p \big ( a _ { t } ^ { B } | a _ { t } ^ { A } , \overline { { s _ { t } ^ { B } } } , u _ { t } ^ { B } \big )$ $B$ then uses this to compute a distribution over its own ecause we have built the model , and its own internal LSTM state, agent , as sh $B$ , wen in $\bar { a } _ { t } ^ { A } , s _ { t } ^ { B }$ $u _ { t } ^ { B }$ Figure 1. This allows us to exactly isolate the causal effect of $A$ ’s action on $B$ by conditioning on the values we observed for the other inputs at this timestep (note that by conditioning on these variables, including the LSTM state $u _ { t } ^ { B }$ , we remove any dependency on previous timesteps in the trajectory). We can then intervene on $a _ { t } ^ { A }$ by replacing it with a counterfactual action, $d o \dot { ( a _ { t } ^ { A } ) }$ . This counterfactual action is used to compute a new estimate of $p ( a _ { t } ^ { B } | d o ( \tilde { a } _ { t } ^ { A } ) , s _ { t } ^ { B } , u _ { t } ^ { B } )$ . Essentially, the agent asks a retrospective question: “How would $B$ ’s action change if I had acted differently in this situation?”.
36
+
37
+ To simplify notation, let $\boldsymbol { z } _ { t } = \langle \boldsymbol { u } _ { t } ^ { B } , \boldsymbol { s } _ { t } ^ { B } \rangle$ , so that conditioning on $z _ { t }$ is equivalent to conditioning on all relevant background variables (all shaded variables in Figure 1). We can also forego the $d o$ operator, noting that $p ( \dot { a } _ { t } ^ { B } | d o ( \tilde { a } _ { t } ^ { A } ) , z _ { t } ) \equiv p ( a _ { t } ^ { B } | \tilde { a } _ { t } ^ { \tilde { A } } , z _ { t } )$ in this case, because $z$ satisfies the back-door criterion (Pearl & Mackenzie, 2018). Now, consider averaging over several counterfactuals $\tilde { a } _ { t } ^ { A }$ . This gives us the marginal policy of $B$ , $\begin{array} { r } { p ( a _ { t } ^ { B } | \tilde { z _ { t } } ) = \sum _ { \tilde { a } _ { t } ^ { A } } p ( a _ { t } ^ { B } | \tilde { a } _ { t } ^ { A } , z _ { t } ) p ( \tilde { a } _ { t } ^ { A } | z _ { t } ) } \end{array}$ —in other words, $B$ ’s policy if $A$ were not considered. The discrepancy between the marginal policy of $B$ and the conditional policy of $B$ given $A$ ’s action is a measure of the causal influence of
38
+
39
+ $A$ on $B$ ; it gives the degree to which $B$ changes its planned action distribution because of $A$ ’s behavior. Thus, the causal influence intrinsic reward for agent $A$ is
40
+
41
+ $$
42
+ { I _ { t } ^ { A } } = D _ { K L } \left[ p ( a _ { t } ^ { B } \mid a _ { t } ^ { A } , z _ { t } ) \right| \left| \sum _ { \tilde { a } _ { t } ^ { A } } p ( a _ { t } ^ { B } \mid z _ { t } , \tilde { a } _ { t } ^ { A } ) p ( \tilde { a } _ { t } ^ { A } \mid z _ { t } ) \right] = D _ { K L } \left[ p ( a _ { t } ^ { B } \mid a _ { t } ^ { A } , z _ { t } ) \right| \left| p ( a _ { t } ^ { B } \mid z _ { t } ) \right] .
43
+ $$
44
+
45
+ # 2.2 RELATIONSHIP TO MUTUAL INFORMATION AND EMPOWERMENT
46
+
47
+ The causal influence reward in Eq. 1 is related to the mutual information (MI) between the actions of agents $A$ and $B$ , which is given by
48
+
49
+ $$
50
+ I ( A ^ { B } ; A ^ { A } | z ) = \sum _ { a ^ { A } , a ^ { B } } p ( a ^ { B } , a ^ { A } | z ) \mathrm { l o g } \frac { p ( a ^ { B } , a ^ { A } | z ) } { p ( a ^ { B } | z ) p ( a ^ { A } | z ) } { = \sum _ { a ^ { A } } p ( a ^ { A } | z ) D _ { \mathrm { K L } } \left[ p ( a ^ { B } | a ^ { A } , z ) \right] \left| p ( a ^ { B } | z ) \right] } ,
51
+ $$
52
+
53
+ where we see that the $D _ { K L }$ factor in Eq. 2 is the causal influence reward given in Eq. 1. The connection to mutual information is interesting, because a frequently used intrinsic motivation for single agent RL is empowerment, which rewards the agent for having high mutual information between its actions and the future state of the environment (e.g. Klyubin et al. (2005); Capdepuy et al. (2007)). To the extent that the social influence reward defined in Eq. 1 is an approximation of the MI, $A$ is rewarded for having empowerment over $B ^ { \prime } s$ actions.
54
+
55
+ By sampling $N$ independent trajectories $\tau _ { n }$ from the environment, where A’s actions $a _ { n } ^ { A }$ are drawn according to $\overset { \cdot } { p } ( a ^ { A } | z )$ , we perform a Monte-Carlo approximation of the MI (see e.g. Strouse et al. (2018)),
56
+
57
+ $$
58
+ I ( A ^ { A } ; A ^ { B } | z ) = \mathbb { E } _ { \tau } \Big [ D _ { \mathrm { K L } } \big [ p ( A ^ { B } | A ^ { A } , z ) \big \| p ( A ^ { B } | z ) \big ] \Big | z \Big ] \approx \frac { 1 } { N } \sum _ { n } D _ { \mathrm { K L } } \big [ p ( A ^ { B } | a _ { n } ^ { A } , z ) \big \| p ( A ^ { B } | z ) \big ] .
59
+ $$
60
+
61
+ Thus, in expectation, the social influence reward is the MI between agents’ actions.
62
+
63
+ Whether the policy trained with Eq. 1 actually learns to approximate the MI depends on the learning dynamics. We calculate the intrinsic social influence reward using Eq. 1, because unlike Eq. 2, which gives an estimate of the symmetric bandwidth between $A$ and $B$ , Eq. 1 gives the directed causal effect of the specific action taken by agent $A$ , $a _ { t } ^ { A }$ . We believe this will result in an easier reward to learn, since it allows for better credit assignment; agent $A$ can more easily learn which of its actions lead to high influence. We also experiment with replacing the KL-divergence with several other measures, including the Jensen-Shannon Divergence (JSD), and find that the influence reward is robust to the choice of measure.
64
+
65
+ # 2.3 INFLUENCE THROUGH COMMUNICATION
66
+
67
+ According to Melis & Semmann (2010), human children rapidly learn to use communication to influence the behavior of others when engaging in cooperative activities. They explain that “this ability to influence the partner via communication has been interpreted as evidence for a capacity to form shared goals with others”, and that this capacity may be “what allows humans to engage in a wide range of cooperative activities”. Therefore, we investigate a second use of the social influence reward: learning inter-agent communication protocols. Using a similar approach to Reinforced Inter-Agent Learning (RIAL) (Foerster et al., 2016), we equip the agents with an explicit communication channel. At each timestep, each agent $k$ chooses a discrete communication symbol $\Dot { m } _ { t } ^ { k }$ ; these symbols are concatenated into a combined message vector $\pmb { m } _ { t } = [ m _ { t } ^ { 0 } , m _ { t } ^ { 1 } . . . m _ { t } ^ { N } ] ,$ , for $N$ agents. This message vector $\mathbf { \nabla } m _ { t }$ is then shown to every other agent in the next timestep, as in Figure 2. To train the agents to communicate, we augment our initial network with an additional A3C output head, that learns a communication policy $\pi _ { c }$ over which symbol to emit, and a communication value function $V _ { c }$ (this is separate from the normal policy and value function used for acting in the environment, $\pi _ { e }$ and $V _ { e }$ , which are trained only with environmental reward $E$ ).
68
+
69
+ The influence reward is used, in addition to environmental reward, to train the communication policy $\pi _ { c }$ Counterfactuals are employed to assess how muon another agent’s action in the next timestep, luence an agent’s communication message, . Importantly, we hypothesize that comm $m _ { t } ^ { A }$ , hastion $a _ { t + 1 } ^ { B }$ can only be influential if it is useful to another agent. There is nothing that compels agent to act based on agent $A$ ’s communication message; if it does not contain valuable information, $B$ is free to ignore it. In fact, previous work has shown that selfish agents do not learn to use this type of ungrounded, cheap talk communication channel effectively (Cao et al., 2018). In contrast, for $A$ to gain influence via communication, $m _ { t } ^ { A }$ must contain valuable information that informs $B$ about how best to maximize its own reward, so much so that it actually causes $B$ to change its intended action.
70
+
71
+ ![](images/caa2b9dc3c9fe0bdc22237d63bfba2b09073071b89e2a88a719924f5aa8e5a38.jpg)
72
+ Figure 2: The communication model has two A2C heads, which learn a normal policy, $\pi _ { e }$ , and a policy for emitting communication symbols, $\pi _ { c }$ . Other agents’ communication messages $\mathbf { \nabla } m _ { t }$ are input to the LSTM.
73
+
74
+ ![](images/64e00c7a40f5d8bfca22499a480991f9780f7757dc5984363b283b0279a25fc0.jpg)
75
+ Figure 3: The Model of Other Agents (MOA) architecture learns both an RL policy $\pi _ { e }$ , and a supervised model that predicts the actions of other agents, $\mathbf { \pmb { a } } _ { t + 1 }$ The predictions of the supervised model are used for computing the influence reward.
76
+
77
+ # 2.4 INFLUENCE VIA MODELING OTHER AGENTS
78
+
79
+ Computing the causal influence reward as introduced in Section 2.1 requires knowing the probability of $B$ ’s next action given a counterfactual, $p ( a _ { t } ^ { B } | \tilde { a } _ { t } ^ { A } , s _ { t } ^ { B } )$ , which we previously solved by using a centralised controller that could access other agent’s policy networks. While using a centralised training framework is common in MARL (e.g. Foerster et al. (2017; 2016)), it is less realistic than a scenario in which each agent is trained independently. We can relax this assumption and achieve independent training by equipping each agent with its own internal Model of Other Agents (MOA). The MOA consists of a second set of fully-connected and LSTM layers connected to the agent’s convolutional layer (see Figure 3), and is trained to predict all other agents’ next actions given their current action, and the agent’s egocentric view of the state: $p ( { \pmb a } _ { t + 1 } | { \pmb a } _ { t } , { \pmb s } _ { t } ^ { A } )$ . The MOA is trained using cross-entropy loss over observed action trajectories.
80
+
81
+ A trained MOA can be used to compute the social influence reward in the following way. Each agent can “imagine” counterfactual actions that it could have taken at each timestep, and use its internal MOA to predict the effect on other agents. It can then give itself reward for taking actions that it estimates were the most influential. This has an intuitive appeal, because it resembles how humans reason about their effect on others (Ferguson et al., 2010). We may often find ourselves asking counterfactual questions of the form, “How would she have reacted if I had said or done something else in that situation?”, which we can only answer using our internal model of others.
82
+
83
+ Both the MOA and communication approaches are an important improvement over the original model shown in Figure 1, which computed influence within a given timestep and required that agent $A$ choose its action $a _ { t } ^ { A }$ first, and this action be transmitted to agent $B$ as input. This meant that only some agents (those acting first) could be influencers. In contrast, using influence for communication or with a MOA are general approaches that can be implemented in any agent, and allow all agents to mutually influence each other.
84
+
85
+ We now seek to estimate influence in the next timestep, meaning the influence of $a _ { t } ^ { A }$ on $a _ { t + 1 } ^ { B }$ , which requires modeling $p ( a _ { t + 1 } ^ { B } | \underline { { a } } _ { t } ^ { A } , s _ { t } ^ { A } )$ . The corresponding causal diagrof $a _ { t } ^ { A }$ is son $a _ { t + 1 } ^ { B }$ in Figure 4. We can infer the causal effectby conditioning on the shaded variables (so that there are no back-door paths) (Pearl et al., 2016). Learning a model of $p ( a _ { t + 1 } ^ { B } | a _ { t } ^ { \bar { A } } , s _ { t } ^ { A } )$ requires implicitly modeling both the environment transition function $T$ (to predict $s _ { t + 1 } )$ , as well as relevant aspects of the internal LSTM state of the other agent, $u _ { t + 1 } ^ { B ^ { * } }$ , as highlighted in Figure 4.
86
+
87
+ We enable agents to condition their policy on the actions of other agents in the previous timestep (actions are visible), and only give the social influence reward to an agent when the agent it is attempting to influence is within its field-of-view, because the estimates of $p ( a _ { t + 1 } ^ { B } | a _ { t } ^ { A } , s _ { t } ^ { A } )$ are likely to be more accurate when $B$ is visible to $A ^ { 2 }$ . The latter constraint could have the sideeffect of encouraging agents to stay in closer proximity.
88
+
89
+ ![](images/c636b44cc733a0638da4fbce914888df05874d72cc520f1bcf72e309b465e051.jpg)
90
+ Figure 4: Causal diagram in the MOA case. Shaded nodes are conditioned on, and we intervene on $a _ { t } ^ { A }$ (blue node) by replacing it with counterfactuals. Nodes with a green background must be modeled using the MOA module. Note that there is no backdoor path between $a _ { t } ^ { A }$ and $s _ { t }$ since it would require traversing a collider that is not in the conditioning set.
91
+
92
+ However, an intrinsic social reward based on proximity is also a reasonable approach to approximating human social motivation. Humans seek affiliation and to spend time near other people (Tomasello, 2009).
93
+
94
+ # 2.5 SEQUENTIAL SOCIAL DILEMMAS
95
+
96
+ First proposed by Leibo et al. (2017), Sequential Social Dilemmas (SSDs) are spatially and temporally extended multi-agent games that have a payoff structure similar to that of Prisoner’s Dilemma (PD). That is, an individual agent can obtain higher reward by engaging in defecting, non-cooperative behavior (and thus is rationally motivated to defect), but the average payoff per agent will be higher if all agents cooperate (see Figure 9 of the Appendix). The paradoxical reward structure makes it extremely difficult for traditional RL agents to learn to coordinate to solve the tasks (Hughes et al., 2018). We experiment with two SSDs in this work, a public goods game Cleanup, and a tragedy-of-the-commons game Harvest (see Figure 5). In both games apples (green tiles) provide the rewards, and agents also have the ability to punish each other with a fining beam. Further details are available in Appendix Section 6.1.
97
+
98
+ ![](images/20206990cd332b2c23f36bfab8c7c99fd397bf6323218026ab67daf49c621e5f.jpg)
99
+ Figure 5: The two SSD environments, Cleanup (left) and Harvest (right). Agents can exploit other agents for immediate payoff, but at the expense of the long-term collective reward of the group.
100
+
101
+ # 3 RELATED WORK
102
+
103
+ Several attempts have been made to develop intrinsic social motivation rewards3. Sequeira et al. (2011) developed hand-crafted rewards specific to a foraging environment, in which agents were punished for eating more than their fair share of food. Another approach gave agents an emotional intrinsic reward based on their perception of their neighbours’ cooperativeness in a networked version of the iterated prisoner’s dilemma (Yu et al., 2013). This approach is limited to scenarios in which it is possible to directly classify each action as cooperative or non-cooperative, which is untenable in complex settings with long-term strategies, such as the SSDs under investigation here. Hughes et al. (2018) introduced an inequity aversion motivation, which penalized agents if their rewards differed too much from those of the group. Another approach used prosocial reward shaping to show that if even a single agent is trained to optimize for the rewards of other agents, it can help the group obtain better collective outcomes (Peysakhovich & Lerer, 2018). However, these both require the ability to observe other agent’s rewards, which may be an unrealistic assumption, depending on the application.
104
+
105
+ Another body of work has focused on training agents to learn emergent communication protocols (Foerster et al., 2016; Cao et al., 2018; Choi et al., 2018; Lazaridou et al., 2018; Bogin et al., 2018), with many authors finding that selfish agents do not learn to use an ungrounded, cheap talk communication channel effectively. Crawford & Sobel (1982) find that in theory, the information revealed in communication (in equilibrium) is proportional to amount of common interest; thus, as agents’ interests diverge, no communication is to be expected. And while communication can emerge when agents are prosocial (Foerster et al., 2016; Lazaridou et al., 2018) or hand-crafted (Crandall et al., 2017), self-interested agents do not to learn to communicate (Cao et al., 2018). We test whether the social influence reward can encourage agents to learn to communicate more effectively in complex environments with challenging social dilemma dynamics.
106
+
107
+ Interestingly, Oudeyer & Kaplan (2006) show that a robot trained with a curiosity-based intrinsic motivation to maximize learning progress learns to prefer vocalizing sounds imitated by another robot over interaction with other objects in the environment. Follow-up papers suggest that curiosity may be a sufficient motivation to encourage agents, or even children, to learn to communicate with others (Oudeyer & Smith, 2016; Forestier & Oudeyer, 2017).
108
+
109
+ Our MOA network is related to work on machine theory of mind (Rabinowitz et al., 2018), which demonstrated that a model trained to predict agents’ actions is able to model false beliefs. With LOLA, Foerster et al. (2018) train agents that model the impact of their policy on the parameter updates of other agents, and directly incorporate this into the agent’s own learning rule.
110
+
111
+ Barton et al. (2018) propose causal influence as a way to measure coordination between agents, specifically using Convergence Cross Mapping (CCM) to analyze the degree of dependence between two agents’ policies. The limitation of this approach is that CCM estimates of causality are known to degrade in the presence of stochastic effects (Tajima et al., 2015). Counterfactual reasoning has also been used in a multi-agent setting, to marginalize out the effect of one agent on a predicted global value function estimating collective reward, and thus obtain an improved baseline for computing each agent’s advantage function (Foerster et al., 2017). A similar paper shows that counterfactuals can be used with potential-based reward shaping to improve credit assignment for training a joint policy in multi-agent RL Devlin et al. (2014). However, once again these approaches rely on a centralised controller.
112
+
113
+ Following in the tradition of the empowerment literature, authors have investigated mutual information (MI) as a powerful tool for designing social rewards. Strouse et al. (2018) train agents to maximize or minimize the MI between their actions and a categorical goal, and show how this can be used to signal or hide the agent’s intentions. However, this approach depends on agents pursuing a known, categorical goal. Guckelsberger et al. (2018), in pursuit of the ultimate video game adversary, develop an agent that maximizes its empowerment over its own states, minimizes the player’s empowerment over their states, and maximizes its empowerment over the player’s next state. This third goal, termed transfer empowerment, is obtained by maximizing the MI between the agent’s actions and the player’s future state. While similar to our approach, the authors find that agents trained with transfer empowerment simply tend to stay near the player. Further, the agents are not trained with RL, but rather analytically compute these measures in simple grid-world environments. As such, the agent cannot learn to model other agents or the environment.
114
+
115
+ # 4 EXPERIMENTS
116
+
117
+ The following sections present the results of training agents with the social influence reward in three settings: (1) using a centralised controller, (2) using an explicit communication channel, and (3) using a learned model of other agents (MOA). In each case we compare against a standard A3C agent, and an ablated version of the model which is architecturally identical, but does not receive the influence reward. We measure the total collective reward obtained using the best hyperparameter setting tested with 5 random seeds. It is worth noting that we use a curriculum learning approach which gradually increases the weight of the social influence reward over $C$ steps $( C \in [ 0 . 2 \mathrm { - } 3 . 5 ] \times \bar { 1 } 0 ^ { 8 } )$ ; this can lead to a slight delay before the influence models’ performance improves.
118
+
119
+ We also provide the results of an additional experiment Section 6.2 of the Appendix, which tests the social influence reward in a simplified environment where the effects of influence are clear. We encourage the reader to examine that section to gain a better intuition for how social influence can foster cooperative behavior in an otherwise selfish agent.
120
+
121
+ # 4.1 CENTRALISED CONTROLLER
122
+
123
+ Figures 6(a) and 6(d) show the results of training influence with a centralised controller as described in Section 2.1. With this method, the influencer agents transmit their intended action to the influenced agents at each timestep. Therefore, we benchmark against an ablated version of the influence model with visible actions but no influence reward. As is evident in Figures 6(a) and 6(d), introducing an awareness of other agents’ actions helps, but having the social influence reward eventually leads to significantly higher collective reward in both games.
124
+
125
+ ![](images/3b9225cc90c9a95e47d5cf85514dba567067d0da375c94be1d1955429ea1bdd4.jpg)
126
+ Figure 6: Total collective reward obtained in all experiments. Error bars show a $9 9 . 5 \%$ confidence interval (CI) over 5 random seeds, computed within a sliding window of 200 agent steps. The models trained with influence reward (red) significantly outperform the baseline and ablated models.
127
+
128
+ While these aggregated results demonstrate the success of our models, they are not sufficient to understand the mechanism through which social influence is helping the agents achieve cooperative behavior. Therefore, we investigated the trajectories produced by high scoring models in both Cleanup and Harvest; the analysis revealed interesting behavior. As an example, in the Cleanup video available here: https: //youtu.be/iH_V5WKQxmo a single agent (shown in purple) was trained with the social influence reward. We see that unlike the other agents, which continue to randomly move and explore while waiting for apples to spawn, the influencer has a strange economy of motion; it only moves on the map when it is pursuing an apple, then stops. Interestingly, examining the trajectory reveals that the influencer uses only two moves to explore the map: turn left, which turns the agent in place without traversing the map, and move right, which moves the agent one square to the right on the map.
129
+
130
+ ![](images/15faf4dfa88bd78c4d0e9ddf505f7cecc97572565601a0318358c9465b4a4695.jpg)
131
+ Figure 7: A moment of high influence when the purple influencer signals the presence of an apple outside the yellow influencee’s field-of-view (yellow outlined box).
132
+
133
+ Why did the influencer learn to use only these two moves? We can see that the influencer agent only chooses to move right (i.e. traverse the map) when it is pursuing an apple which is present. The rest of the time it simply turns left on the spot. At $t = 4 9$ , there is a moment of high influence between the influencer and the yellow influencee, which is shown in Figure 7. The influencer has chosen to move right towards an apple that is outside of the ego-centric field-of-view of the yellow agent. Because the purple agent only moves when apples are available, this signals to the yellow agent that an apple must be present above it which it cannot see. This changes the yellow agent’s distribution over its planned action, $p ( a _ { t } ^ { B } | a _ { t } ^ { A } , s _ { t } ^ { B } )$ and allows the purple agent to gain influence. A similar moment occurs when the influencer signals to an agent that has been cleaning the river that no apples have appeared by continuing to turn left (see Figure 12 in the Appendix).
134
+
135
+ In this example, the influencer agent learned to use its own actions as a sort of binary code, which signals the presence or absence of apples in the environment. We also observe this effect in the influence agents in the Harvest task. This type of action-based communication could be likened to the bee waggle dance discovered by von Frisch (1969). Thus, rewarding agents for increasing the mutual information between their actions gave rise not only to cooperative behavior, but in this case, to emergent communication. These results further support the idea of using influence as a reward for training agents to communicate.
136
+
137
+ # 4.2 INFLUENCE THROUGH COMMUNICATION
138
+
139
+ Figures 6(b) and 6(e) show the results of training the agents to use an explicit communication channel, and its effect on their collective reward. In this case, the ablated baseline is a model that has the same structure as in Figure 2, but in which the communication policy $\pi _ { c }$ is trained only with environmental reward. We observe that the agents which are trained to use the communication channel with additional social influence reward achieve significantly higher collective reward in both games. In fact, in the case of Cleanup, we found that $\alpha = 0$ in the optimal hyperparameter settings, meaning that it was most effective to train the communication head with zero extrinsic or environmental reward (see Table 2 in the Appendix). This suggests that influence alone can be a sufficient mechanism for training an effective communication policy.
140
+
141
+ To analyze the communication behaviour learned by the agents, we introduce three metrics. Speaker consistency, is a normalized score $\in [ 0 , 1 ]$ which assesses the entropy of $p ( a ^ { k } | m ^ { k } )$ and $p ( m ^ { k } | a ^ { k } )$ to determine how consistently a speaker agent emits a particular symbol when it takes a particular action, and vice versa (the formula is given in Appendix Section 6.3.4). We expect this measure to be high if, for example, the speaker always emits the same symbol when it is cleaning the river. We also introduce two measures of i(1) symbol/action $\mathbf { I C } = I ( m _ { t } ^ { A } ; a _ { t + 1 } ^ { B } )$ dination (IC), which are both measures of mutual information (MI): measures the MI between the influencer/speaker’s symbol and the influencee/listener’s next action, and (2) action/action $\begin{array} { r } { \mathbf { I C } = I ( a _ { t } ^ { A } ; a _ { t + 1 } ^ { B } ) } \end{array}$ measures the MI between the influencer’s action and the influencee’s action in the next timestep. To compute these measures we first average over all trajectory steps, then take the maximum value between any two agents, to determine if any pair of agents are coordinating. Note that these measures are all instantaneous, as they consider only short-term dependencies across two consecutive timesteps, and cannot capture if an agent communicates influential compositional messages, i.e. information that requires several consecutive symbols to transmit and only then affects the other agents behavior.
142
+
143
+ ![](images/cfabcddf1dd58ea122c746b3e02eae517a3782b403a73cf07bb8bc425f0202f7.jpg)
144
+ Figure 8 presents the results. The speaker consistencies metric reveals that agents trained with the influence reward communicate less ambiguously about their own actions, indicating that the emergent communication is more meaningful. The instantaneous coordination metrics demonstrate
145
+ Figure 8: Metrics describing the quality of learned communication protocols. The models trained with influence reward exhibit more consistent communication and more coordination, especially in moments where influence is high.
146
+
147
+ that the baseline agents trained without influence reward show almost no signs of co-ordinating behavior with communication, i.e. speakers saying A and listeners doing B consistently. This result is aligned with both theoretical results in cheap-talk literature (Crawford & Sobel, 1982), and recent empirical results in MARL (e.g. (Foerster et al., 2016; Lazaridou et al., 2018; Cao et al., 2018)).
148
+
149
+ In contrast, we do see highly coordinated behavior between influence agents, but only when we limit the analysis to timesteps on which influence was high (cf. influential moments in Figure 8). If we inspect the results for agents trained with influence on the two tasks, a common pattern emerges: influence is sparse in time. An agent’s influence is only greater than its mean influence in less than $10 \%$ of timesteps. Because the listener agent is not compelled to listen to any given speaker, listeners selectively listen to a speaker only when it is beneficial, and influence cannot occur all the time. Only when the listener decides to change its action based on the speaker’s message does influence occur, and in these moments we observe high $I ( m _ { t } ^ { A } ; a _ { t + 1 } ^ { B } )$ ; an effect that is lost when averaging over the entire trajectory. It appears the influencers have learned a strategy of communicating meaningful information about their own actions, and gaining influence when this becomes relevant enough for the listener to act upon it.
150
+
151
+ Examining the relationship between the reward obtained by individual agents and the degree to which they were influenced by other agents gives a compelling result: agents that are the most influenced also achieve higher individual environmental reward, $\dot { E } ^ { k }$ . We sampled 100 different experimental conditions (i.e., hyper-parameters and random seeds) for both games, collected the influence and individual rewards, normalized them across the 5 agents in each condition, and correlated the resulting list of values. We found that agents who are more often influenced tend to achieve higher task reward in both Cleanup, $\rho = . 6 7$ , $p { < } 0 . 0 0 1$ , and Harvest, $\rho = . 3 4$ , $p { < } 0 . 0 0 1$ . This supports the hypothesis stated in Section 2.3: in order to gain influence from another agent by communicating with it, the communication message should contain information that helps the listener maximize its own environmental reward. Since better listeners/influencees are more successful in terms of task reward, we have evidence that useful information was transmitted to them.
152
+
153
+ # 4.3 INFLUENCE VIA MODELING OTHER AGENTS
154
+
155
+ Finally, we investigate whether the influence reward is still effective when computed without a centralised controller, but rather through each agent’s own internal Model of Other Agents (MOA) network. In this case, we extend the training period from $3 \cdot 1 0 ^ { 8 }$ steps to $5 \cdot 1 0 ^ { 8 }$ , in order to give the MOA model time to train. We also allow the policy LSTM to condition on the actions of other agents in the last timestep. We compare against an ablated version of this architecture (shown in Figure 3), which does not use the output of the MOA module to compute a reward; rather, the MOA module can be thought of as an unsupervised auxiliary task that may help the model to learn a better shared embedding layer, encouraging it to encode information relevant to predicting other agents’ behavior.
156
+
157
+ Figures 6(c) and 6(f) show the collective reward obtained for agents trained with a MOA module. While we see that the auxiliary task does help to improve reward over the A3C baseline, the influence agent gets consistently higher collective reward. Impressively, for Cleanup, the MOA model scores higher than the original influence agents computed using the centralised controller (CC). As shown in Figure 6(c), the MOA baseline also achieves high collective reward, suggesting that the auxiliary task of modeling other agents helps the MOA agents cooperate more effectively in Cleanup. Further, the independent design of the MOA method allows each agent to influence every other agent, thus generating more reward signal and a greater chance to develop two-way cooperative behavior.
158
+
159
+ Table 4 of the Appendix gives the final collective reward obtained by each model for all three experiments. Interestingly, several influence models are able to achieve higher collective reward than the previous state-of-the-art scores for these environments (275 for Cleanup and 750 for Harvest) (Hughes et al., 2018). This is compelling, given that previous work relied on the assumption that agents could view one another’s rewards; we make no such assumption, instead relying only on agents viewing each other’s actions.
160
+
161
+ # 5 DISCUSSION AND CONCLUSIONS
162
+
163
+ The experiments above have demonstrated that an intrinsic social reward based on having causal influence on the actions of other agents consistently improves cooperation and leads to higher collective return in the MA social dilemmas under investigation. In some cases, the influence reward drove agents to learn an emergent communication protocol via their actions. This is compelling, and confirms the connection between maximizing influence and maximizing the mutual information between agents’ actions.
164
+
165
+ However, it is important to consider the limitations of the influence reward. Whether it will always give rise to cooperative behavior may depend on the specifics of the environment, task, and the trade-off between environmental and influence reward. Although influence is arguably necessary for cooperation (e.g. two agents cooperating to lift a box would have a high degree of influence between their actions), it may not be sufficient, in that it may be possible to influence another agent without helping it. For example, it is possible that agents could have gained influence in the tasks studied here by threatening to attack other agents with their fining beam. We believe this type of behavior did not emerge because communicating information represents the cheapest and most effective way to gain influence. Influencers do not have to sacrifice much in terms of their own environmental reward in order to communicate to other agents.
166
+
167
+ Rewarding influence over an explicit communication channel may not be subject to this limitation, because influential communication may be inherently beneficial to the listener (at least in the case where listeners and speakers interact repeatedly). Since listeners can easily ignore communication messages if they do not help to obtain environmental reward, a speaker must transmit valuable information in order to gain influence through communication. There is no advantage to the speaker for communicating unreliably, because it would lose influence with the listener over time (although this is no longer guaranteed in one-shot interactions). Indeed, our results reveal that agents benefit from being influenced by (listening to) communication messages by obtaining higher individual reward, suggesting that the messages contain valuable information. Further, we found that the communication protocols learned via influence reward were more meaningful, and that the influence reward allowed agents to obtain higher collective return. Therefore, we suggest that influence could be a promising way to train emergent communication protocols in various settings.
168
+
169
+ Finally, we have shown that influence can be computed by augmenting agents with an internal model that predicts the actions of other agents, and using this MOA model to simulate the effect of an agent’s actions on others. This represents an important step forward in multi-agent intrinsic social motivation, because it implies that the influence reward can be computed without having access to another agent’s reward function, or requiring a centralised controller.
170
+
171
+ # 5.1 FUTURE WORK
172
+
173
+ Using counterfactuals to allow agents to understand the effects of their actions on other agents could be a promising approach with a number of extensions. Perhaps agents could use counterfactuals to develop a form of ‘empathy‘, by simulating how their actions affect another agent’s value function. Or, social influence could be used to drive coordinated behavior in robots attempting to do cooperative manipulation and control tasks. Finally, if we view multi-agent networks as a single agent, influence could be used as a regularizer to encourage different modules of the network to integrate information from other networks; for example, perhaps it could prevent collapse in hierarchical RL.
174
+
175
+ # REFERENCES
176
+
177
+ Sean L Barton, Nicholas R Waytowich, Erin Zaroukian, and Derrik E Asher. Measuring collaborative emergent behavior in multi-agent reinforcement learning. arXiv preprint arXiv:1807.08663, 2018.
178
+
179
+ Ben Bogin, Mor Geva, and Jonathan Berant. Emergence of communication in an interactive world with consistent speakers. arXiv preprint arXiv:1809.00549, 2018.
180
+
181
+ Kris Cao, Angeliki Lazaridou, Marc Lanctot, Joel Z Leibo, Karl Tuyls, and Stephen Clark. Emergent communication through negotiation. arXiv preprint arXiv:1804.03980, 2018.
182
+
183
+ Philippe Capdepuy, Daniel Polani, and Chrystopher L Nehaniv. Maximization of potential information flow as a universal utility for collective behaviour. In Artificial Life, 2007. ALIFE’07. IEEE Symposium on, pp. 207–213. Ieee, 2007.
184
+
185
+ Edward Choi, Angeliki Lazaridou, and Nando de Freitas. Compositional obverter communication learning from raw visual input. arXiv preprint arXiv:1804.02341, 2018.
186
+
187
+ Jacob W. Crandall, Mayada Oudah, Tennom Chenlinangjia, Fatimah Ishowo-Oloko, Sherief Abdallah, Jean-Franc¸ois Bonnefon, Manuel Cebrian, Azim Shariff, Michael A. Goodrich, and Iyad Rahwan. ´ Cooperating with machines. CoRR, abs/1703.06207, 2017. URL http://arxiv.org/abs/ 1703.06207.
188
+
189
+ Vincent P Crawford and Joel Sobel. Strategic information transmission. Econometrica: Journal of the Econometric Society, pp. 1431–1451, 1982.
190
+
191
+ Sam Devlin, Logan Yliniemi, Daniel Kudenko, and Kagan Tumer. Potential-based difference rewards for multiagent reinforcement learning. In Proceedings of the 2014 international conference on Autonomous agents and multi-agent systems, pp. 165–172. International Foundation for Autonomous Agents and Multiagent Systems, 2014.
192
+
193
+ Heather J. Ferguson, Christoph Scheepers, and Anthony J. Sanford. Expectations in counterfactual and theory of mind reasoning. Language and Cognitive Processes, 25(3):297–346, 2010. doi: 10.1080/ 01690960903041174. URL https://doi.org/10.1080/01690960903041174.
194
+
195
+ Jakob Foerster, Ioannis Alexandros Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2137–2145, 2016.
196
+
197
+ Jakob Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. arXiv preprint arXiv:1705.08926, 2017.
198
+
199
+ Jakob Foerster, Richard Y Chen, Maruan Al-Shedivat, Shimon Whiteson, Pieter Abbeel, and Igor Mordatch. Learning with opponent-learning awareness. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 122–130. International Foundation for Autonomous Agents and Multiagent Systems, 2018.
200
+
201
+ Sebastien Forestier and Pierre-Yves Oudeyer. A unified model of speech and tool use early development.´ In 39th Annual Conference of the Cognitive Science Society (CogSci 2017), 2017.
202
+
203
+ Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. ¨ 1999.
204
+
205
+ Christian Guckelsberger, Christoph Salge, and Julian Togelius. New and surprising ways to be mean. adversarial npcs with coupled empowerment minimisation. arXiv preprint arXiv:1806.01387, 2018.
206
+
207
+ Yuval Noah Harari. Sapiens: A brief history of humankind. Random House, 2014.
208
+
209
+ Joseph Henrich. The Secret of Our Success: How culture is driving human evolution, domesticating our species, and making us smart. Princeton University Press, Princeton, NJ, 2015. URL http: //press.princeton.edu/titles/10543.html.
210
+
211
+ Esther Herrmann, Josep Call, Mar´ıa Victoria Hernandez-Lloreda, Brian Hare, and Michael Tomasello. \` Humans have evolved specialized skills of social cognition: The cultural intelligence hypothesis. Science, 317(5843):1360–1366, 2007. ISSN 0036-8075. doi: 10.1126/science.1146282. URL http: //science.sciencemag.org/content/317/5843/1360.
212
+
213
+ Edward Hughes, Joel Z Leibo, Matthew G Phillips, Karl Tuyls, Edgar A Due´nez-Guzm ˜ an, Antonio Garc ´ ´ıa Castaneda, Iain Dunning, Tina Zhu, Kevin R McKee, Raphael Koster, et al. Inequity aversion improves ˜ cooperation in intertemporal social dilemmas. In Advances in neural information processing systems (NIPS), Montreal, Canada, 2018.
214
+
215
+ Alexander S Klyubin, Daniel Polani, and Chrystopher L Nehaniv. Empowerment: A universal agent-centric measure of control. In Evolutionary Computation, 2005. The 2005 IEEE Congress on, volume 1, pp. 128–135. IEEE, 2005.
216
+
217
+ Kevin N. Laland. Darwin’s unfinished symphony $\therefore$ how culture made the human mind / Kevin N. Laland. Princeton University Press Princeton, 2017. ISBN 9781400884872 140088487.
218
+
219
+ Angeliki Lazaridou, Karl Moritz Hermann, Karl Tuyls, and Stephen Clark. Emergence of linguistic communication from referential games with symbolic and pixel input. arXiv preprint arXiv:1804.03984, 2018.
220
+
221
+ Joel Z Leibo, Vinicius Zambaldi, Marc Lanctot, Janusz Marecki, and Thore Graepel. Multi-agent reinforcement learning in sequential social dilemmas. In Proceedings of the 16th Conference on Autonomous Agents and MultiAgent Systems, pp. 464–473. International Foundation for Autonomous Agents and Multiagent Systems, 2017.
222
+
223
+ Joseph T Lizier and Mikhail Prokopenko. Differentiating information transfer and causal effect. The European Physical Journal B, 73(4):605–615, 2010.
224
+
225
+ Alicia P Melis and Dirk Semmann. How is human cooperation different? Philosophical Transactions of the Royal Society of London B: Biological Sciences, 365(1553):2663–2674, 2010.
226
+
227
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pp. 1928–1937, 2016.
228
+
229
+ Pierre-Yves Oudeyer and Fred´ eric Kaplan. Discovering communication. ´ Connection Science, 18(2): 189–206, 2006.
230
+
231
+ Pierre-Yves Oudeyer and Linda B Smith. How evolution may work through curiosity-driven developmental process. Topics in Cognitive Science, 8(2):492–502, 2016.
232
+
233
+ Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International Conference on Machine Learning (ICML), volume 2017, 2017.
234
+
235
+ Judea Pearl and Dana Mackenzie. The Book of Why: The New Science of Cause and Effect. Basic Books, 2018.
236
+
237
+ Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. Causal inference in statistics: a primer. John Wiley & Sons, 2016.
238
+
239
+ Julien Perolat, Joel Z Leibo, Vinicius Zambaldi, Charles Beattie, Karl Tuyls, and Thore Graepel. A multi-agent reinforcement learning model of common-pool resource appropriation. In Advances in Neural Information Processing Systems, pp. 3643–3652, 2017.
240
+
241
+ Alexander Peysakhovich and Adam Lerer. Prosocial learning agents solve generalized stag hunts better than selfish ones. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2043–2044. International Foundation for Autonomous Agents and Multiagent Systems, 2018.
242
+
243
+ Neil C Rabinowitz, Frank Perbet, H Francis Song, Chiyuan Zhang, SM Eslami, and Matthew Botvinick. Machine theory of mind. arXiv preprint arXiv:1802.07740, 2018.
244
+
245
+ Thomas C Schelling. Hockey helmets, concealed weapons, and daylight saving: A study of binary choices with externalities. Journal of Conflict resolution, 17(3):381–428, 1973.
246
+
247
+ Jurgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). ¨ IEEE Transactions on Autonomous Mental Development, 2(3):230–247, 2010.
248
+
249
+ Pedro Sequeira, Francisco S Melo, Rui Prada, and Ana Paiva. Emerging social awareness: Exploring intrinsic motivation in multiagent learning. In Development and Learning (ICDL), 2011 IEEE International Conference on, volume 2, pp. 1–6. IEEE, 2011.
250
+
251
+ Satinder P. Singh, Andrew G. Barto, and Nuttapong Chentanez. Intrinsically motivated reinforcement learning. In Advances in Neural Information Processing Systems 17 [Neural Information Processing Systems, NIPS 2004, December 13-18, 2004, Vancouver, British Columbia, Canada], pp. 1281–1288, 2004. URL http://papers.nips.cc/paper/ 2552-intrinsically-motivated-reinforcement-learning.
252
+
253
+ Katherine KM Stavropoulos and Leslie J Carver. Research review: social motivation and oxytocin in autism–implications for joint attention development and intervention. Journal of Child Psychology and Psychiatry, 54(6):603–618, 2013.
254
+
255
+ DJ Strouse, Max Kleiman-Weiner, Josh Tenenbaum, Matt Botvinick, and David Schwab. Learning to share and hide intentions using information regularization. arXiv preprint arXiv:1808.02093, 2018.
256
+
257
+ Satohiro Tajima, Toru Yanagawa, Naotaka Fujii, and Taro Toyoizumi. Untangling brain-wide dynamics in consciousness by cross-embedding. PLoS computational biology, 11(11):e1004537, 2015.
258
+
259
+ Michael Tomasello. Why we cooperate. MIT press, 2009.
260
+
261
+ Carel P van Schaik and Judith M Burkart. Social learning and evolution: the cultural intelligence hypothesis. Philosophical Transactions of the Royal Society B: Biological Sciences, 366(1567):1008–1016, 2011.
262
+
263
+ Karl von Frisch. The dance language and orientation of bees. 5, 06 1969.
264
+
265
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
266
+
267
+ Chao Yu, Minjie Zhang, and Fenghui Ren. Emotional multiagent reinforcement learning in social dilemmas. In International Conference on Principles and Practice of Multi-Agent Systems, pp. 372–387. Springer, 2013.
268
+
269
+ # 6 APPENDIX
270
+
271
+ # 6.1 SEQUENTIAL SOCIAL DILEMMAS
272
+
273
+ In each of the sequential social dilemma (SSD) games studied above, an agent is rewarded $+ 1$ for every apple it collects, but the apples are a limited resource. In Harvest (a tragedy of the commons game), apples regenerate more slowly the faster they are harvested, and if an exploiting agent consumes all of the apples, they will not grow back; agents must cooperate to harvest sustainably. In Cleanup (a public goods game), apples are generated based on the amount of waste in a nearby river. Agents can use a cleaning beam action to clean the river when they are positioned in it; or they can simply consume the apples the other agent produces. Agents also have a fining beam action which they can use to fine nearby agents $- 5 0$ reward.
274
+
275
+ Figure 9 gives the Schelling diagram for both SSD tasks under investigation. A Schelling diagram (Schelling, 1973; Perolat et al., 2017) shows the relative payoffs for a single agent’s strategy given a fixed number of other agents who are cooperative. Schelling diagrams generalize payoff matrices to multi-agent settings, and make it easy to visually recognize game-theoretic properties like Nash equilibria (see Schelling (1973) for more details).
276
+
277
+ ![](images/cd8620142473269dee9b7be7e5b1fb98864ebd4ee20a85b56ccae63f16b46cc2.jpg)
278
+ Figure 9: Schelling diagrams for the two social dilemma tasks show that an individual is almost always motivated to defect, even though the group will get higher reward if there are more cooperators.
279
+
280
+ # 6.2 ADDITIONAL EXPERIMENT - BOX TRAPPED
281
+
282
+ As a proof-of-concept experiment to test whether the influence reward works as expected, we constructed a special environment, shown in Figure 10. In this environment, one agent (teal) is trapped in a box. The other agent (purple) has a special action it can use to open the box... or it can simply choose to consume apples, which exist outside the box and are inexhaustible in this environment.
283
+
284
+ As expected, a vanilla A3C agent learns to act selfishly; the purple agent will simply consume apples, and chooses the open box action in $0 \%$ of trajectories once the policy has converged. A video of A3C agents trained in this environment is available at: https://youtu.be/C8SE9_ $\Upsilon \mathrm { K z x I }$ , which shows that the purple agent leaves its compatriot trapped in the box throughout the trajectory.
285
+
286
+ ![](images/3f18791740d5f30d7f41c7fce3b78ff4b93cfac39e1f81dcfeb16188b74db18f.jpg)
287
+ Figure 10: The Box trapped environment in which the teal agent is trapped, and the purple agent can release it with a special open box action.
288
+
289
+ In contrast, an agent trained with the social influ
290
+ ence reward chooses the open box action in $88 \%$ of trajectories, releasing its fellow agent so that they are both able to consume apples. A video of this behavior is shown at: https://youtu.be/Gfo248-qt3c. Further, as Figure 11(a) reveals, the purple influencer agent usually chooses to open the box within the first few steps of the trajetory, giving its fellow agent more time to collect reward.
291
+
292
+ Most importantly though, Figure 11(b) shows the influence reward over the course of a trajectory in the Box trapped environment. The agent chooses the open box action in the second timestep; at this point, we see a corresponding spike in the influence reward. This reveals that the influence reward works as expected, incentivizing an action which has a strong — and in this case, prosocial — effect on the other agent’s behavior.
293
+
294
+ ![](images/87f2f4c8939684aaa1a065bb1bd2a40dcabf6619e1b311cd76ab190958323091.jpg)
295
+
296
+ (a) Number of times the open box action occurs at each trajectory step over 100 trajectories.
297
+
298
+ ![](images/aa590ebca444f816660ca98874365417e4da0912c85a637d878b313133db889b.jpg)
299
+ (b) Influence reward over a trajectory in Box trapped
300
+ Figure 11: The Box trapped proof-of-concept experiment reveals that an agent gets high influence for letting another agent out of a box in which it is trapped.
301
+
302
+ # 6.3 IMPLEMENTATION DETAILS
303
+
304
+ All models are trained with a single convolutional layer with a kernel of size 3, stride of size 1, and 6 output channels. This is connected to two fully connected layers of size 32 each, and an LSTM with 128 cells. We use a discount factor $\gamma = . 9 9$ . The number of agents $N$ is fixed to 5.
305
+
306
+ As mentioned in Section 2.2, the social influence reward can be computed using a number of divergence measures, including JSD. We also experiment with training the agents using the pointwise mutual information (the innermost term of Eq. 3), which is given by:
307
+
308
+ $$
309
+ p m i ( a ^ { A } ; a ^ { B } | Z { = } z ) { = } \log \frac { p ( a ^ { B } | a ^ { A } , z ) } { p ( a ^ { B } | z ) } { = } \mathrm { l o g } \frac { p ( a ^ { A } , a ^ { B } | z ) } { p ( a ^ { A } | z ) p ( a ^ { B } | z ) } .
310
+ $$
311
+
312
+ This PMI term is precisely the local information flow proposed by Lizier & Prokopenko (2010) as a measure of direct causal effect; the expectation of the PMI over $p \dot { ( } a ^ { B } , a ^ { A } | z )$ is the MI. and gives us a measure of influence of a single action of $A$ on the single action taken by $B$ .
313
+
314
+ In addition to the comparison function used to compute influence, there are many other hyperparameters that can be tuned for each model. We use a random search over hyperparameters, ensuring a fair comparison with the search size over the baseline parameters that are shared with the influence models. For all models we search for the optimal entropy reward and learning rate, where we anneal the learning rate from an initial value lr init to lr final. The below sections give the parameters found to be most effective for each of the three experiments.
315
+
316
+ # 6.3.1 CENTRALISED CONTROLLER HYPERPARAMETERS
317
+
318
+ In this setting we vary the number of influencers from 1−4, the influence reward weight $\beta$ , and the number of curriculum steps over which the weight of the influence reward is linearly increased $C$ . In this setting, since we have a centralised controller, we also experiment with giving the influence reward to the agent being influenced as well, and find that this sometimes helps. This ‘influencee’ reward is not used in the other two experiments, since it precludes independent training. The hyperparameters found to give the best performance for each model are shown in Table 1.
319
+
320
+ # 6.3.2 COMMUNICATION HYPERPARAMETERS
321
+
322
+ Because the communication models have an extra A2C output head for the communication policy, we use an additional entropy regularization term just for this head, and apply a weight to the communication loss in the loss function. We also vary the number of communication symbols that the agents can emit, and the size of the linear layer that connects the LSTM to the communication policy layer, which we term the communication embedding size. Finally, in the communication regime, we experiment to setting the weight on the extrinsic reward E, $\alpha$ , to zero. The best hyperparameters for each of the communication models are shown in Table 2.
323
+
324
+ Table 1: Optimal hyperparameter settings for the models in the centralised controller experiment.
325
+
326
+ <table><tr><td rowspan="2">Hyperparameter</td><td colspan="3">Cleanup</td><td colspan="3">Harvest</td></tr><tr><td>A3C</td><td>Visibleactions</td><td>Influence</td><td>A3C baseline</td><td>Visibleactions</td><td>Influence</td></tr><tr><td>Entropy reg.</td><td>baseline .00176</td><td>baseline .00176</td><td>.000248</td><td>.000687</td><td>baseline .00184</td><td>.00025</td></tr><tr><td>lr_init</td><td>.00126</td><td>.00126</td><td>.00107</td><td>.00136</td><td>.00215</td><td>.00107</td></tr><tr><td>lr_end</td><td>.000012</td><td>.000012</td><td>.000042</td><td>.000028</td><td>.000013</td><td>.000042</td></tr><tr><td>Number of influencers</td><td></td><td>3</td><td>1</td><td></td><td>3</td><td>3</td></tr><tr><td>Influence weight β</td><td></td><td>0</td><td>.146</td><td></td><td>0</td><td>.224</td></tr><tr><td>Curriculum C</td><td></td><td>1</td><td>140</td><td></td><td>1</td><td>140</td></tr><tr><td>Policy comparison</td><td></td><td></td><td>JSD</td><td></td><td></td><td>PMI</td></tr><tr><td>Influencee reward</td><td></td><td></td><td>1</td><td></td><td></td><td>0</td></tr></table>
327
+
328
+ Table 2: Optimal hyperparameter settings for the models in the communication experiment.
329
+
330
+ <table><tr><td rowspan="2">Hyperparameter</td><td colspan="3">Cleanup</td><td colspan="2">Harvest</td></tr><tr><td>A3C baseline</td><td>Comm. baseline</td><td>Influence comm.</td><td>A3C Comm. baseline baseline</td><td></td><td>Influence comm.</td></tr><tr><td>Entropy reg.</td><td>.00176</td><td>.000249</td><td>.00305</td><td>.000687</td><td>.000174</td><td>.00220</td></tr><tr><td>lr_init</td><td>.00126</td><td>.00223</td><td>.00249</td><td>.00136</td><td>.00137</td><td>.000413</td></tr><tr><td>lr_end</td><td>.000012</td><td>.000022</td><td>.0000127</td><td>.000028</td><td>.0000127</td><td>.000049</td></tr><tr><td>Influence weight β</td><td>=</td><td>0</td><td>2.752</td><td>=</td><td>0</td><td>4.825</td></tr><tr><td>Extrinsic reward</td><td></td><td></td><td>0</td><td></td><td></td><td>1.0</td></tr><tr><td>weight α</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Curriculum C</td><td></td><td></td><td>1 KL</td><td></td><td></td><td>8</td></tr><tr><td>Policy comparison</td><td></td><td></td><td>.000789</td><td></td><td></td><td>KL</td></tr><tr><td>Comm. entropy reg.</td><td></td><td></td><td>.0758</td><td></td><td></td><td>.00208</td></tr><tr><td>Comm. loss weight</td><td></td><td></td><td>9</td><td></td><td></td><td>.0709</td></tr><tr><td>Symbol vocab size</td><td></td><td></td><td>32</td><td></td><td></td><td>7</td></tr><tr><td>Comm. embedding</td><td></td><td></td><td></td><td></td><td></td><td>16</td></tr></table>
331
+
332
+ Table 3: Optimal hyperparameter settings for the models in the model of other agents (MOA) experiment.
333
+
334
+ <table><tr><td rowspan="2">Hyperparameter</td><td colspan="3">Cleanup</td><td colspan="3">Harvest</td></tr><tr><td>A3C baseline</td><td>MOA baseline</td><td>Influence MOA</td><td>A3C baseline</td><td>MOA baseline</td><td>Influence MOA</td></tr><tr><td>Entropy reg.</td><td>.00176</td><td>.00176</td><td>.00176</td><td>.000687</td><td>.00495</td><td>.00223</td></tr><tr><td>lr_init</td><td>.00126</td><td>.00123</td><td>.00123</td><td>.00136</td><td>.00206</td><td>.00120</td></tr><tr><td>lr_end</td><td>.000012</td><td>.000012</td><td>.000012</td><td>.000028</td><td>.000022</td><td>.000044</td></tr><tr><td>Influence weight β</td><td></td><td>0</td><td>.620</td><td>=</td><td>0</td><td>2.521</td></tr><tr><td>MOA loss weight</td><td></td><td>1.312</td><td>15.007</td><td>=</td><td>1.711</td><td>10.911</td></tr><tr><td>Curriculum C</td><td></td><td>-</td><td>40</td><td>=</td><td>1</td><td>226</td></tr><tr><td>Policy comparison</td><td></td><td>=</td><td>KL</td><td>=</td><td>=</td><td>KL</td></tr><tr><td>Train MOA only</td><td></td><td>False</td><td>True</td><td></td><td>False</td><td>True</td></tr><tr><td>when visible</td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
335
+
336
+ # 6.3.3 MODEL OF OTHER AGENTS (MOA) HYPERPARAMETERS
337
+
338
+ The MOA hyperparameters include whether to only train the MOA with cross-entropy loss on the actions of agents that are visible, and how much to weight the supervised loss in the overall loss of the model. The best hyperparameters are shown in Table 3.
339
+
340
+ <table><tr><td></td><td>Cleanup</td><td>Harvest</td></tr><tr><td>A3Cbaseline</td><td>89</td><td>485</td></tr><tr><td>Inequity aversion (Hughes et al., 2018)</td><td>275</td><td>750</td></tr><tr><td>Influence - Basic</td><td>190</td><td>1073</td></tr><tr><td>Influence - Communication</td><td>166</td><td>951</td></tr><tr><td>Influence -Model of other agents</td><td>392</td><td>588</td></tr></table>
341
+
342
+ Table 4: Final collective reward over the last 50 agent steps for each of the models considered. Bolded entries represent experiments in which the influence models significantly outperformed the scores reported in previous work on inequity aversion(Hughes et al., 2018). This is impressive, considering the inequity averse agents are able to view all other agents’ rewards. We make no such assumption, and yet are able to achieve similar or superior performance.
343
+
344
+ # 6.3.4 COMMUNICATION ANALYSIS
345
+
346
+ The speaker consistency metric is calculated as:
347
+
348
+ $$
349
+ \sum _ { k = 1 } ^ { N } 0 . 5 [ \sum _ { c } 1 - \frac { H ( p ( a ^ { k } | m ^ { k } = c ) ) } { H _ { m a x } } + \sum _ { a } 1 - \frac { H ( p ( m ^ { k } | a ^ { k } = a ) ) } { H _ { m a x } } ] ,
350
+ $$
351
+
352
+ where $H$ is the entropy function and $H _ { m a x }$ is the maximum entropy based on the number of discrete symbols or actions. The goal of the metric is to measure how much of a 1:1 correspondence exists between a speaker’s action and the speaker’s communication message.
353
+
354
+ # 6.4 ADDITIONAL RESULTS
355
+
356
+ Figure 12 shows an additional moment of high influence in the Cleanup game. The purple influencer agent can see the area within the white box, and therefore all of the apple patch. The field-of-view of the magenta influencee is outlined with the magenta box; it cannot see if apples have appeared, even though it has been cleaning the river, which is the action required to cause apples to appear. When the purple influencer turns left and does not move towards the apple patch, this signals to the magenta agent that no apples have appeared, since otherwise the influence would move right.
357
+
358
+ ![](images/fda9989ec537ce17189a8d0151565ce65db1893467693e2932bcd54bd93d57e3.jpg)
359
+ Figure 12: A moment of high influence between the purple influencer and magenta influencee.
360
+
361
+ Table 4 presents the final collective reward obtained by each of the models tested in the experiments presented in Section 4. We see that in several cases, the influence agents are even able to out-perform the state-of-the-art results on these tasks reported by Hughes et al. (2018), despite the fact that the solution proposed by Hughes et al. (2018) requires that agents can view other agents’ rewards, whereas we do not make this assumption, and instead only require that agents can view each others’ actions.
362
+
363
+ It is important to note that collective reward is not always the perfect metric of cooperative behavior, a finding that was also discovered by Barton et al. (2018) and emphasized by Leibo et al. (2017). In the case, we find that there is a spurious solution to the Harvest game, in which one agent fails to learn and fails to collect any apples. This leads to very high collective reward, since it means there is one fewer agent that can exploit the others, and makes sustainable harvesting easier to achieve. Therefore, for the results shown in the paper, we eliminate any random seed in Harvest for which one of the agents has failed to learn to collect apples, as in previous work (Hughes et al., 2018).
364
+
365
+ However, here we also present an alternative strategy for assessing the overall collective outcomes: weighting the total collective reward by an index of equality of the individual returns. Specifically, we compute the Gini coefficient over the $N$ agents’ individual returns:
366
+
367
+ $$
368
+ G = \frac { \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { N } \left| { r ^ { i } - r ^ { j } } \right| } { 2 N \sum _ { i = 1 } ^ { N } r ^ { i } } ,
369
+ $$
370
+
371
+ which gives us a measure of the inequality of the returns, where $G \in [ 0 , 1 ]$ , with $G = 0$ indicating perfect equality. Thus, $1 - G$ is a measure of equality; we use this to weight the collective reward for each experiment, and plot the results in Figure 13. Once again, we see that the influence models give the highest final performance, even with this new metric.
372
+
373
+ ![](images/c923ae01cca519ebc26562fb33c66fec40b0011ec5f33643088a3be15814576d.jpg)
374
+ Figure 13: Total collective reward times equality, $R * ( 1 - G )$ , obtained in all experiments. Error bars show a $9 9 . 5 \%$ confidence interval (CI) over 5 random seeds, computed within a sliding window of 200 agent steps. Once again, the models trained with influence reward (red) significantly outperform the baseline and ablated models.
375
+
376
+ Finally, we would like to show that the influence reward is robust to the choice of hyperparameter settings. Therefore, in Figure 14, we plot the collective reward of the top 5 best hyperparameter settings for each experiment, over 5 random seeds each. Once again, the influence models result in higher collective reward, which provides evidence that the model is robust to the choice of hyperparameters.
377
+
378
+ ![](images/1408fa6f4ede73df1fdda59c904bd76d77d6315c5152307ac31700974d00769d.jpg)
379
+ Figure 14: Total collective reward over the top 5 hyperparameter settings, with 5 random seeds each, for all experiments. Error bars show a $9 9 . 5 \%$ confidence interval (CI) computed within a sliding window of 200 agent steps. The influence models still maintain an advantage over the baselines and ablated models, suggesting the technique is robust to the hyperparameter settings.
380
+
381
+ # 6.4.1 OPTIMIZING FOR COLLECTIVE REWARD
382
+
383
+ In this section we include the results of training explicitly prosocial agents, which directly optimize for the collective reward of all agents. Previous work (e.g. Peysakhovich & Lerer (2018)) has shown that training agents to optimize for the rewards of other agents can help the group to obtain better collective outcomes. Following a similar prown individual reward $E ^ { k }$ ple, we implemented agents that optimize foand the collective reward of all other agents, $\textstyle \sum _ { i = 1 , i \neq k } ^ { N } E ^ { i }$ mbination of their. Thus, the reward function for agent $k$ is $\begin{array} { r } { { R ^ { k } } = E ^ { k } + \eta \sum _ { i = 1 , i \neq k } ^ { N } E ^ { i } } \end{array}$ . We conducted the same hyperparameter search over the parameters mentioned in Section 6.3.1 varying the weight placed on the collective reward, $\eta \in [ 0 , 2 ]$ .
384
+
385
+ As expected, we find that agents trained to optimize for collective reward attain higher collective reward in both Cleanup and Harvest, as is shown in Figure 15. In both games, the optimal value for $\eta = 0 . 8 5$ .
386
+
387
+ ![](images/fe3d4f89e8a19d1b5fe2a4f19403d717b5760772f2debd3fb1d1b879cb6bc09c.jpg)
388
+ Figure 15: Total collective reward obtained by agents trained to optimize for the collective reward, for the 5 best hyperparameter settings with 5 random seeds each. Error bars show a $9 9 . 5 \%$ confidence interval (CI) computed within a sliding window of 200 agent steps.
389
+
390
+ Interestingly, however, the equality in the individual returns for these agents is extremely low. Across the hyperparameter sweep, no solution to the Cleanup game which scored more than 20 points in terms of collective return was found in which all agents scored an individual return above 0. It seems that in Cleanup, when agents are trained to optimize for collective return, they converge on a solution in which some agents never receive any reward.
391
+
392
+ Note that training agents to optimize for collective reward requires that each agent can view the rewards obtained by other agents. As discussed previously, the social influence reward is a novel way to obtain cooperative behavior, that does not require making this assumption.
parse/train/B1lG42C9Km/B1lG42C9Km_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1lG42C9Km/B1lG42C9Km_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1lG42C9Km/B1lG42C9Km_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg15lrKvS/BJg15lrKvS.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg15lrKvS/BJg15lrKvS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg15lrKvS/BJg15lrKvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg15lrKvS/BJg15lrKvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJxLH2AcYX/BJxLH2AcYX.md ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UNSUPERVISED MULTI-TARGET DOMAIN ADAPTATION:AN INFORMATION THEORETIC APPROACH
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Unsupervised domain adaptation (uDA) models focus on pairwise adaptation settings where there is a single, labeled, source and a single target domain. However, in many real-world settings one seeks to adapt to multiple, but somewhat similar, target domains. Applying pairwise adaptation approaches to this setting may be suboptimal, as they fail to leverage shared information among multiple domains. In this work, we propose an information theoretic approach for domain adaptation in the novel context of multiple target domains with unlabeled instances and one source domain with labeled instances. Our model aims to find a shared latent space common to all domains, while simultaneously accounting for the remaining private, domain-specific factors. Disentanglement of shared and private information is accomplished using a unified information-theoretic approach, which also serves to establish a stronger link between the latent representations and the observed data. The resulting model, accompanied by an efficient optimization algorithm, allows simultaneous adaptation from a single source to multiple target domains. We test our approach on three challenging publicly-available datasets, showing that it outperforms several popular domain adaptation methods.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In real-world data, the training and test instances often do not come from the same underlying distribution (Sun et al. (2016)). For example, in the task of object recognition/classification from image data, this may be due to the image noise, changes in the object view, etc., which induce different biases in the observed data sampled during the training and test stage. Consequently, assumptions made by traditional learning algorithms are often violated, resulting in degradation of the algorithms’ performance during inference of test data. Domain Adaptation (DA) approaches (Fernando et al. (2013); Gong et al. (2012); Kodirov et al. (2015); Yoo et al. (2016)) aim to tackle this by transferring knowledge from a source domain (training data) to an unlabeled target domain (test data) to reduce the discrepancy between the source and target data distributions, typically by exploring domain-invariant data structures.
12
+
13
+ Existing DA methods tackle the adaptation problems in one of the two settings: (semi)supervised DA and unsupervised DA (Csurka (2017)). The former assume that in addition to the labeled data of the source domain, some labeled data from the target domain are also available for training/adapting the classifiers. In contrast, the latter does not require any labels from the target domain but rather explores the similarity in the data distributions of the two domains. In this work, we focus on the unsupervised DA (uDA) scenario, which is more challenging due to the lack of correspondences in source and target labels.
14
+
15
+ Most works on uDA today focus on a single-source-single-target-domain scenario. However, in many real-world applications, unlabeled data may come from different domains, thus, with different statistical properties but with common task-related content. For instance, we may have access to images of the same class of objects (e.g., cars) recorded by various types of cameras, and/or under different camera views and at different times, rendering multiple different domains (e.g., datasets). Likewise, facial expressions of emotions, such as joy and surprise, shown by different people and recorded under different views, result in multiple domains with varying data distributions. In most cases, these domains have similar underlying data distributions, which can be leveraged to build more effective and robust classifiers for tasks such as the object or emotion recognition across multiple datasets/domains. To this end, traditional uDA methods focus on the single-source-single-target DA scenario. However, in the presence of multiple domains, as typically encountered in real-world settings, this pair-wise adaptation approach may be suboptimal as it fails to leverage simultaneously the knowledge shared across multiple task-related domains. Recently, Zhao et al. (2017) showed that by having access to multiple source domains can facilitate better adaptation to a single target domain, when compared to the pair-wise DA approach. While this is intuitive due to the access to multiple labelled source domains, offering more adaptation flexibility for the target domain (i.e., by efficiently exploring the data labels across multiple source domains that are most related to the target domain), it comes at the expense of the data labelling in multiple source domains, which can be costly and time-consuming. In either case, a single source domain or readily available multiple source domains, to the best of our knowledge, a simultaneous adaptation to multiple and unlabelled target domains remains an unexplored DA scenario. However, this DA scenario is important as we usually have access to multiple unlabeled domains; yet, the adaptation process is also more challenging due to the lack of supervision in the target domains. Still, multi-target DA can have advantages over a single-target DA when: (i) there is direct knowledge sharing between the source and multiple target domains (fig. 1a), and (ii) the source and a target domain are related through another target domain (fig. 1b). While this seems intuitive, it is critical how the data from multiple unlabelled target domains are leveraged within the multi-target DA approach, in order to improve its performance over the single target DA approaches and naive fusion of multiple target domains.
16
+
17
+ ![](images/36886e0179e0304a2140f74c7b598abbe23c7d9c3021a983addc10b904e84af3.jpg)
18
+ Figure 1: Illustration of domains with common (a) and pairwise-shared spaces (b). We tackle the domain adaptation task when all domains share a common task/space, which is then leveraged to transfer knowledge across multiple target domains.
19
+
20
+ To this end, we propose a Multi-Target DA-Information-Theoretic-Approach (MTDA-ITA) for single-sourcemulti-target DA. We exploit a single source domain and focus on multiple target domains to investigate the effects of multi-target DA; however, the proposed approach can easily be extended to multiple source domains. This approach leverages the data from multiple target domains to improve performance compared to individually learning from pair-wise source-target domains. Specifically, we simultaneously factorize the information from each available target domain and learn separate subspaces for modeling the shared (i.e., correlated across the domains) and private (i.e., independent between the domains) subspaces of the data (Salzmann et al. (2010)). To this end, we employ deep learning to derive an information theoretic approach where we jointly maximize the mutual information between the domain labels and private (domain-specific) features, while minimizing the mutual information between the the domain labels and the shared (domaininvariant) features. Consequently, the more robust feature representations are learned for each target domain by exploiting dependencies between multiple target domains. We show on benchmark datasets for DA that this approach leads to overall improved performance on each target domain, compared to independent DA for each pair of source-target domains, or the naive combination of multiple target domains, and state-of-the-art models applicable to the target task.
21
+
22
+ # 2 THE PROPOSED METHOD
23
+
24
+ Without loss of generality, we consider a multi-class ( $K$ -class) classification problem as the running example. Furthermore, let $( \mathbf { X } , \mathbf { Y } , \mathbf { D } ) = \{ ( \pmb { x } _ { i } , \pmb { y } _ { i } , \pmb { d } _ { i } ) \} _ { i = 0 } ^ { N }$ be a collection of $M$ domains (a labeled source domain, and $M - 1$ unlabeled target domains), where $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ denotes the $i$ -th sample, and $\pmb { y } _ { i } = [ y _ { i } ^ { 1 } , y _ { i } ^ { 2 } , . . . , y _ { i } ^ { K } ]$ and $d _ { i } = [ d _ { i } ^ { 1 } , d _ { i } ^ { 2 } , . . . , d _ { i } ^ { M } ]$ are the $K$ -D and $M$ -D encoding of the class and domain labels for $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ , respectively. Note that the class labels are only available for the source samples.
25
+
26
+ The latent space representation of the data point $_ { \textbf { \em x } }$ is denoted as $\boldsymbol { z } = [ z _ { s } , z _ { p } ]$ , where $z _ { s }$ and $z _ { p }$ are the (latent) shared and private features of the data point $_ { \textbf { \em x } }$ , respectively. By factorizing the joint distribution $p ( { \pmb x } , { \pmb y } , d , z _ { s } , z _ { p } )$ as
27
+
28
+ $$
29
+ \begin{array} { r } { p ( { \pmb x } , { \pmb y } , { \pmb d } , z _ { s } , z _ { p } ) = p ( { \pmb x } ) p ( { \pmb d } ) p ( z _ { s } | { \pmb x } ) p ( z _ { p } | { \pmb x } ) p ( { \pmb y } | z _ { s } ) , } \end{array}
30
+ $$
31
+
32
+ we propose to maximize the following objective function:
33
+
34
+ $$
35
+ \begin{array} { r } { \boldsymbol { \mathcal { L } } ( \boldsymbol { \theta } _ { s } , \boldsymbol { \theta } _ { p } , \boldsymbol { \theta } _ { c } ; \boldsymbol { x } , \boldsymbol { y } , \boldsymbol { d } ) = \lambda _ { r } \boldsymbol { I } ( \boldsymbol { x } ; \boldsymbol { z } ) + \lambda _ { c } \boldsymbol { I } ( \boldsymbol { y } ; \boldsymbol { z } _ { s } ) + \lambda _ { d } \big ( \boldsymbol { I } ( \boldsymbol { d } ; \boldsymbol { z } _ { p } ) - \boldsymbol { I } ( \boldsymbol { d } ; \boldsymbol { z } _ { s } ) \big ) , } \end{array}
36
+ $$
37
+
38
+ where $p ( { \pmb x } )$ and $p ( d )$ denote the underlying (true) data distribution and domain label distribution, respectively, $I ( { \pmb x } ; { \pmb y } )$ denotes the Mutual Information between the random variables $_ { \textbf { \em x } }$ and $\textbf { { y } }$ . $\lambda _ { r } , \lambda _ { c }$ and $\lambda _ { d }$ denote the hyper-parameters controlling the weights of the objective terms. The proposed objective function (2) maximizes the three terms described below:
39
+
40
+ • $I ( { \pmb x } ; z )$ : encourages the latent features (both shared and private) to preserve information about the data samples (that can be used to reconstruct $_ { \textbf { \em x } }$ from $_ { z }$ ).
41
+ • $I ( \pmb { y } ; \pmb { z } _ { s } )$ : enables to correctly predict the true class label of the samples out of their common shared features.
42
+ • $I ( d ; z _ { p } ) - I ( d ; z _ { s } )$ : encourages the latent private features to preserve the information about the domain label and penalizes the latent shared features to be domain informative. This not only reduces the redundancy in the shared and private features, but also, penalizes the redundancy of different private spaces, while preserving the shared information.
43
+
44
+ An additional term could be used to minimize the mutual information between the shared $( z _ { s } )$ and private $( z _ { p } )$ features. However, computing the mutual information (even approximating it) is intractable due to the highly complex joint distribution $p ( z _ { s } , z _ { p } )$ . Since we want $z _ { s }$ and $z _ { p }$ features to encode different aspects of $_ { \textbf { \em x } }$ , we enforce such constraint by jointly maximizing the term: $I ( d ; \dot { z } _ { p } ) - I ( d ; z _ { s } )$ .
45
+
46
+ # 2.1 OPTIMIZATION
47
+
48
+ The following lower bound for mutual information is derived using the non-negativity of KL-divergence (Barber & Agakov (2003)); i.e., $\begin{array} { r } { \Sigma _ { { \pmb x } } p ( { \pmb x } | z ) \ln \frac { p ( { \pmb x } | z ) } { q ( { \pmb x } | z ) } \ge 0 } \end{array}$ gives:
49
+
50
+ $$
51
+ I ( \pmb { x } ; z ) \geq H ( \pmb { x } ) + \mathbb { E } _ { p ( \pmb { x } , z ) } [ \ln q ( \pmb { x } | z ; \phi ) ]
52
+ $$
53
+
54
+ where $H ( { \pmb x } )$ denotes the Shanon Entropy (Lin (1991)) of the random variable $_ { \textbf { \em x } }$ . $q ( { \pmb x } | { \pmb z } ; { \pmb \phi } )$ is any arbitrary distribution parameterized by $\phi$ . We need a variational distribution $q ( { \pmb x } | { \pmb z } ; \phi )$ because the posterior distribution $p ( \pmb { x } | \pmb { z } ) = p ( \pmb { z } | \pmb { x } ) p ( \pmb { x } ) / p ( \pmb { z } )$ is intractable since the true data distribution $p ( { \pmb x } )$ is assumed to be unknown. Similarly, we can derive lower bounds for $I ( d ; z _ { p } ) \geq H ( d ) + \mathbb { E } _ { p ( d , z _ { p } ) } [ \ln q ( d | z _ { p } ; \psi ) ]$ and $I ( d ; z _ { s } ) \geq$
55
+
56
+ ![](images/8e3477bd318324bc4827d471de794c2c830ef3f1de87446abdf6c005292de940.jpg)
57
+ Figure 2: MDTA-ITA: The encoder $E _ { s } ( { \pmb x } )$ captures the feature representations $( z _ { s } )$ for a given input sample $_ { \pmb { x } }$ that are shared among domains. $E _ { p } ( { \pmb x } )$ captures domain–specific private features $( z _ { p } )$ using the shared private encoder. The shared decoder $F \big ( z _ { p } , z _ { s } \big )$ learns to reconstruct the input sample by using both the private and shared features. The domain classifier $D$ learns to correctly predict the domain labels of the actual samples from both their shared and private features while the classifier $C$ learns to correctly predict the class labels from the shared features.
58
+
59
+ $H ( d ) + \mathbb { E } _ { p ( d , z _ { s } ) } [ \ln q ( d | z _ { s } ; \psi ) ]$ , where $q ( d | z _ { p } ; \psi )$ is any arbitrary distribution parameterized by $\psi$ . 1 We further drive lower bound for $I ( \pmb { y } ; \pmb { z } _ { s } )$ as $I ( \pmb { y } ; \pmb { z _ { s } } ) \geq H ( \pmb { y } ) + \mathbb { E } _ { p ( \pmb { y } , \pmb { z _ { s } } ) } [ \ln q ( \pmb { y } | \pmb { z _ { s } } ; \pmb { \theta _ { c } } ) ]$ , where $q ( \pmb { y } | \pmb { z } _ { s } ; \theta _ { c } )$ is a variational distribution parameterized by $\theta _ { c }$ approximating $p ( \pmb { y } | \boldsymbol { z } _ { s } )$ .
60
+
61
+ Let next $E _ { s } ( \pmb { x } ; \theta _ { s } )$ be a function parameterized by $\theta _ { s }$ that maps a sample $_ { \textbf { \em x } }$ to its corresponding shared feature $z _ { s }$ , and $E _ { p } ( \pmb { x } ; \theta _ { p } )$ be an analogous function which maps $_ { \textbf { \em x } }$ to $z _ { p }$ , the feature that is private to each domain (fig. 2). We also define $F ( z _ { s } , z _ { p } ; \phi )$ as a decoding function mapping the concatenation of the latent features $z _ { s }$ and $z _ { p }$ to a sample reconstruction $\hat { \pmb x }$ , and $D ( z ; \psi )$ as a decoding function mapping $z _ { s }$ and $z _ { p }$ to a $M$ -dimensional vector: the predictions of the domain label $\hat { d }$ . Finally, $C ( z _ { s } ; \theta _ { c } )$ is a task-specific function mapping $z _ { s }$ to a $K$ -dimensional probability vector of the class label $\hat { y }$ .
62
+
63
+ We represent $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { \bar { N } } \delta ( { \bf d } - { \bf d } _ { i } ) ) } \end{array}$ $p ( { \pmb d } ) , p ( { \pmb x } ) , p ( { \pmb y } )$ as in the case of variational autoencoders (VAE) (Abbasnejad et al. (2017); as the empirical distribution of a finite training set (e.g. $\begin{array} { r l } { p ( d ) } & { { } = } \end{array}$ $\mathrm { P u }$ et al. (2017)), $p ( \pmb { z } _ { s } | \pmb { x } ) , p ( \pmb { z } _ { p } | \pmb { x } )$ as deterministic functions of $_ { \textbf { \em x } }$ as $p ( z _ { s } | \pmb { x } ) = \delta \big ( z _ { s } - E _ { s } ( \pmb { x } ; \theta _ { s } ) \big )$ and $p ( z _ { p } | \pmb { x } ) = \delta \big ( z _ { p } - E _ { p } ( \pmb { x } ; \theta _ { p } ) \big )$ , and the variational distributions $q ( \pmb { y } | \pmb { z } _ { s } )$ , $q ( { \pmb x } | z )$ and , $q ( d | z )$ as
64
+
65
+ $$
66
+ q ( \boldsymbol { y } | \boldsymbol { z } _ { s } ) = \mathrm { S o f t M a x } ( C ( \boldsymbol { z } _ { s } ; \boldsymbol { \theta } _ { c } ) ) , q ( d | \boldsymbol { z } ) = \mathrm { S o f t M a x } ( D ( \boldsymbol { z } ; \boldsymbol { \psi } ) ) , q ( \boldsymbol { x } | \boldsymbol { z } ; \boldsymbol { \phi } ) \propto \exp ( \| \boldsymbol { x } - \boldsymbol { F } ( \boldsymbol { z } ; \boldsymbol { \phi } ) \| _ { 1 } )
67
+ $$
68
+
69
+ where Softmax $( \cdot )$ denotes the softmax or normalized exponential function (Bridle (1990)), and $\left. . \right. _ { 1 }$ denotes the $L _ { 1 }$ norm. Then, the optimization task can be posed as a minimax saddle point problem, where we use adversarial training to maximize (2) w.r.t. the parameters $( \theta _ { s } , \theta _ { p } , \theta _ { c } )$ , and to minimize (2) w.r.t. the parameters $( \phi , \psi )$ , using Stochastic Gradient Descent (SGD).
70
+
71
+ # Optimizing the parameters $\phi$ of the decoder $F$
72
+
73
+ $$
74
+ \hat { \phi } = \underset { \phi } { \arg \operatorname* { m i n } } \ : \mathcal { L } _ { F } = \frac { \lambda _ { r } } { N } \sum _ { i = 1 } ^ { N } \| \pmb { x } _ { i } - F \big ( E _ { s } ( \pmb { x } _ { i } ) , E _ { p } ( \pmb { x } _ { i } ) \big ) \| _ { 1 } .
75
+ $$
76
+
77
+ The decoder $F ( z _ { s } , z _ { p } ; \phi )$ is trained in such a way so as to minimize the difference between original input $_ { \textbf { \em x } }$ and its decoding from corresponding shared and private features via the decoder $F$ .
78
+
79
+ # Optimizing the parameters $\psi$ of the domain classifier $D$
80
+
81
+ $$
82
+ \hat { \psi } = \underset { \psi } { \arg \operatorname* { m i n } } \ : \mathcal { L } _ { D } = - \frac { \lambda _ { d } } { N } \sum _ { i = 1 } ^ { N } d _ { i } ^ { \top } \ln D \big ( E _ { s } ( \pmb { x } _ { i } ) \big ) - \frac { \lambda _ { d } } { N } \sum _ { i = 1 } ^ { N } d _ { i } ^ { \top } \ln D \big ( E _ { p } ( \pmb { x } _ { i } ) \big ) .
83
+ $$
84
+
85
+ $D ( z ; \psi )$ can be considered as a classifier whose task is to distinguish between the shared/private features of the different domains. More precisely, the two terms in Eq. 6 encourage $D$ to correctly predict the domain labels from the shared and private features, respectively.
86
+
87
+ # Optimizing the parameters $\theta _ { c }$ of the label classifier $C$
88
+
89
+ $$
90
+ \hat { \theta } _ { c } = \underset { \theta _ { c } } { \arg \operatorname* { m i n } } \big \{ - H ( \pmb { y } ) - \mathbb { E } _ { p ( \pmb { y } , z _ { s } ) } \big [ \ln q ( \pmb { y } | z _ { s } ) \big ] \big \} .
91
+ $$
92
+
93
+ Since we have access to the source labels, $H ( \pmb { y } )$ is a constant for source samples. we can approximate $H [ \pmb { y } ]$ for the target samples using the output of the classifier $C$ , leading to the following optimization problem:
94
+
95
+ $$
96
+ \begin{array} { r l } & { \hat { \theta } _ { c } = \underset { \theta _ { c } } { \arg \operatorname* { m i n } } \ \mathcal { L } _ { C } = - \ \frac { 1 } { N } \displaystyle \sum _ { i = 1 } ^ { N _ { s } } y _ { i } ^ { T } \ln C \big ( E _ { s } ( x _ { i } ) \big ) - \frac { \lambda _ { c } } { N - N _ { s } } \displaystyle \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( x _ { i } ) \big ) ^ { \top } \ln C \big ( E _ { s } ( x _ { i } ) \big ) } \\ & { \qquad + \ \frac { \lambda _ { c } } { N - N _ { s } } \displaystyle \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( x _ { i } ) \big ) ^ { \top } \ln \bigg ( \displaystyle \frac { 1 } { N - N _ { s } } \displaystyle \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( x _ { i } ) \big ) \bigg ) , } \end{array}
97
+ $$
98
+
99
+ where $N _ { s }$ denotes the number of source samples. Intuitively, we enforce the classifier $C$ to correctly predict the class labels of the source samples by the first term in Eq. 8. We use the second term to minimize the entropy of $q ( \pmb { y } | \pmb { z } _ { s } )$ for the target samples; effectively, reducing the effects of "confusing" labels of target samples, as given by $p ( \pmb { y } | \pmb { z } _ { s } )$ that leads to decision boundaries occur far away from target data-dense regions in the feature space. The intuition behind the last term is that by minimizing only the entropy (second term), we may arrive at a degenerate solution where every target point $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ is assigned to the same class. Hence, the last term encourages the classifier $C$ to have balanced labeling for the target samples where it reaches its minimum, $\ln K$ , when each class is selected with uniform probability.
100
+
101
+ # Optimizing the parameter $\theta _ { p }$ of the private encoder $E _ { p }$
102
+
103
+ $$
104
+ \hat { \theta _ { p } } = \underset { \theta _ { p } } { \operatorname { a r g m i n } } \ \mathcal { L } _ { P } = \frac { \lambda _ { r } } { N } \sum _ { i = 1 } ^ { N } \| \boldsymbol { x } _ { i } - F \big ( E _ { s } ( \boldsymbol { x } _ { i } ) , E _ { p } ( \boldsymbol { x } _ { i } ) \big ) \| _ { 1 } - \frac { \lambda _ { d } } { N } \sum _ { i = 1 } ^ { N } d _ { i } ^ { \top } D \big ( E _ { p } ( \boldsymbol { x } _ { i } ) \big ) .
105
+ $$
106
+
107
+ The first term in Eq. 9 encourages the private encoder $E _ { p }$ to preserve the recovery ability of the private features. The second term enforces distinct private features be produced for each domain by penalizing the representation redundancy in different private spaces. This, in turn, encourages moving this common information from multiple domains to their shared space.
108
+
109
+ # Optimizing the parameter $\theta _ { s }$ of the shared encoder $E _ { s }$
110
+
111
+ $$
112
+ \begin{array} { c } { \displaystyle \hat { \theta _ { s } } = \arg \operatorname* { m i n } _ { \theta _ { s } } \mathcal { L } _ { S } = \frac { \lambda _ { r } } { N } \sum _ { i = 1 } ^ { N } \| \boldsymbol { x } - F \big ( E _ { s } ( \boldsymbol { x } _ { i } ) , E _ { p } ( \boldsymbol { x } _ { i } ) \big ) \| _ { 1 } - \frac { \lambda _ { c } } { N } \sum _ { i = 1 } ^ { N _ { s } } y _ { i } ^ { T } \ln C \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) } \\ { \displaystyle - \frac { \lambda _ { d } } { N } \sum _ { i = 1 } ^ { N } d _ { i } ^ { \top } \ln D \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) - \frac { \lambda _ { c } } { N - N _ { s } } \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) ^ { \top } \ln C \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) } \\ { \displaystyle + \frac { \lambda _ { c } } { N - N _ { s } } \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) ^ { \top } \ln \bigg ( \frac { 1 } { N - N _ { s } } \sum _ { i = N _ { s } + 1 } ^ { N } C \big ( E _ { s } ( \boldsymbol { x } _ { i } ) \big ) \bigg ) . } \end{array}
113
+ $$
114
+
115
+ The first term in Eq. 10 encourages the shared encoder $E _ { s }$ to preserve the recovery ability of the shared features. The second term is the source domain classification loss penalty that encourages $E _ { s }$ to produce discriminative features for the labeled source samples. The third term simulates the adversarial training by trying to fool the domain classifier $D$ when predicting the domain labels $^ d$ , given the shared features $z _ { s }$ . The effect of this is two-fold: (i) the rendered shared features are more distinct from the corresponding private features, (ii) the shared features of different domains are encouraged to be similar to each other. The last two terms encourage $E _ { s }$ to produce the shared features for target samples so that the classifier is confident on the unlabeled target data, driving the shared features away from the decision boundaries. To train our model, we alternate between updating the shared encoder $E _ { s }$ , the private encoder $E _ { p }$ , the decoder $F$ , the classifier $C$ and the domain classifier $D$ using the SGD algorithm (see Algorithm 1 in Appendix E for more details).
116
+
117
+ # 3 RELATED WORK
118
+
119
+ There has been extensive prior work on domain adaptation (Csurka (2017)). Recent papers have focused on transferring deep neural network representations from a labeled source dataset to an unlabeled target domain, where the main strategy is to find a feature space such that the confusion between source and target distributions in that space is maximized ( Rebuffi et al. (2017); Benaim & Wolf (2017); Courty et al. (2017); Motiian et al. (2017); Saito et al. (2017); Zhang et al. (2017); Yan et al. (2017); Bousmalis et al. (2017)). For this, it is critical to first define a measure of divergence between source and target distributions. For instance, several methods have used the Maximum Mean Discrepancy (MMD) loss for this purpose (Bousmalis et al. (2017); Zellinger et al. (2017); Long et al. (2014)). MMD computes the norm of the difference between two domain means in the reproducing Kernel Hilbert Space (RKHS) induced by a pre-specified kernel. The Deep Adaptation Network (DAN) (Long et al. (2015)) applied MMD to layers embedded in a RKHS, effectively matching higher order statistics of the two distributions. The deep Correlation Alignment (CORAL) method (Sun & Saenko (2016)) attempts to match the mean and covariance of the two distributions. Deep Transfer Network (DTN) (Zhang et al. (2015)) achieved source/target distribution alignment via two types of network layers based on MMD distance: the shared feature extraction layer, which learns a subspace that matches the marginal distributions of the source and the target samples, and the discrimination layer, which matches the conditional distributions by classifier transduction.
120
+
121
+ Recently proposed unsupervised DA methods (Rebuffi et al. (2017); Benaim & Wolf (2017); Courty et al. (2017); Motiian et al. (2017); Saito et al. (2017); Zhang et al. (2017)) operate by training deep neural networks using adversarial training, which allows the learning of feature representations that are simultaneously discriminative of source labels, and indistinguishable between the source and target domain. For instance, Ganin & Lempitsky (2015) proposed a DA mechanism called Domain-Adversarial Training of Neural Networks (DANN), which enables the network to learn domain invariant representations in an adversarial way by adding a domain classifier and back-propagating inverse gradients. Adversarial Discriminative Domain Adaptation (ADDA) (Tzeng et al. (2017)) learns a discriminative feature subspace using the source labels, followed by a separate encoding of the target data to this subspace using an asymmetric mapping learned through a domain-adversarial loss. Liu et al. (2017) makes a shared-latent space assumption and proposes an unsupervised image-to-image translation (UNIT) framework based on Coupled GANs (Liu & Tuzel (2016)). Another example is the pixel-level domain adaptation models that perform the distribution alignment not in the feature space but directly in raw pixel space. PixelDA (Bousmalis et al. (2017)) uses adversarial approaches to adapt source-domain images as if drawn from the target domain while maintaining the original content.
122
+
123
+ While these approaches have shown success in DA tasks with single source-target domains, they are not designed to leverage information from multiple domains simultaneously. More recently, Zhao et al. (2017) introduced an adversarial framework called MDAN for multiple source single target domain adaptation where a domain classifier, induced by minimizing the H-divergence between multiple source and a target domain, is used to align their feature distributions in a shared space. Instead, in our approach we focus on multi-target DA where we perform adaptation of multiple unlabelled target domains. Although both our model and MDAN use the similar notion of the domain classifier to minimize the domain mismatch in shared space, the domain classifier induced by our information-theoretic (IT) loss also acts to separate domains in the private space (see Eqs. $6 \& 9$ for more details), improving the essential reconstruction ability, similar to (Bousmalis et al. (2016)). We provided how our model is related to IT representation learning approaches, and multiple domain transfer networks in Appendices A and B respectively. In Appendix C, we also clearly contrasted our model with DSN model which also uses the notion of auto-encoders to explicitly separate the feature representations private to each source/target domain from those that are shared between the domains.
124
+
125
+ # 4 EXPERIMENTAL RESULTS
126
+
127
+ We compare the proposed method with state-of-the-art methods on standard benchmark datasets: a digit classification task that includes 4 datasets: MNIST (LeCun et al. (1998)), MNIST-M (Ganin et al. (2016)), SVHN (Netzer et al. (2011)), USPS (Tzeng et al. (2017)), Multi-PIE expression recognition dataset2, and PACS multi-domain image recognition benchmark (Li et al. (2017)), a new dataset designed for the crossdomain recognition problems (the details for this experiment is available in Appendix G). Fig. 3 illustrates image samples from different datasets and domains. We evaluate the performance of all methods with classification accuracy metric. We repeated each experiment 5 times and report the average and the standard deviation of the accuracy.
128
+
129
+ We used ADAM (Kingma & Ba (2015)) for training; the learning rate was set to 0.0002 and momentum parameters to 0.5 and 0.999. We used batches of size 16 from each domain, and the input images were meancentered/rescaled to $[ - 1 , 1 ]$ . The hyper-parameters are empirically set as $\lambda _ { r } = 1 . 0 , \lambda _ { c } = 0 . 0 1$ , $\lambda _ { d } = 0 . 2 0$ . For the network architecture, our private/shared encoders consisted of three convolutional layers as the front-end and four basic residual blocks as the back-end. The decoder consisted of four basic residual blocks as the front-end and four transposed convolutional layers as the back-end. The discriminator and the classifier consisted of stacks of convolutional layers. We used ReLU for nonlinearity. Tanh function is used as the activation function of the last layer in the decoder $F$ for scaling the output pixels to $[ - 1 , 1 ]$ . The details of the networks are given in Appendix D.
130
+
131
+ The quantitative evaluation involves a comparison of the performance of our model to previous work and to Source Only and 1-NN baselines that do not use any domain adaptation. For Source Only baseline, we train our model only on the unaltered source training data and evaluate on the target test data. We compare the proposed method MTDA-ITA with several related methods designed for pair-wise source-target adaptation: CORAL (Sun & Saenko (2016)), DANN (Ganin & Lempitsky (2015)), ADDA (Tzeng et al. (2017)), DTN (Zhang et al. (2015)), UNIT (Liu et al. (2017)), PixelDA (Bousmalis et al. (2017)), and DSN (Bousmalis et al. (2016)). We reported the results of two following baselines: (i) one is to combine all the target domains into a single one and train it using MTDA-ITA, which we denote as (c-MTDA-ITA). (ii) the other one is to train multiple MTDA-ITA separately, where each one corresponds to a source-target pair which we denote as (s-MTDA-ITA). For completeness, we reported the results of the competing methods by combining all the target domains into a single one (denoted by c-DTN, c-ADDA, and c-DSN) as well. We also extend DSN to multiple domains by (i) having one private encoder for all domains denoted by (1p-DSN), (ii) adding multiple private encoders to it denoted by (mp-DSN) and contrast them with our model.
132
+
133
+ # 4.1 DIGITS DATASETS
134
+
135
+ We combine four popular digits datasets (MNIST, MNIST-M, SVHN, and USPS) to build the multitarget domain dataset. All images were uniformly rescaled to $3 2 \times 3 2$ . We take each of MNIST-M,
136
+
137
+ ![](images/c17f5da419bdc0deb50b99f30b19766556f98c280148111ece40ad50497e48c6.jpg)
138
+ Figure 3: Exemplary images from different datasets. a) Digits datasets, b) PACS datatset (first row: Art-painting, second row: Cartoon, Third row: Photo, last row: Sketch), c) Multi-PIE dataset (each row corresponds to a different camera angle and each subject depicts an expression(normal, smile, surprise, squint, disgust, scream) at every camera position).
139
+
140
+ SVHN, USPS, and MNIST as source domain in turn, and the rest as targets. We use all labeled source images and all unlabeled target images, following the standard evaluation protocol for unsupervised domain adaptation (Ganin et al. (2016); Long et al. (2016). We show the accuracy of different methods in Table 1. Additional results are available in Appendix F. The results show that first of all cMTDA-ITA has worse performance than sMTDA-ITA and MTDA-ITA. We have similar observations for ADDA, DTN, and DSN that demonstrates a naive combination of different target datasets can sometimes even decrease the performance of the competing methods. Furthermore, MTDA-ITA outperforms the state-of-the-art methods in most of domain transformations. The higher performance of MTDA-ITA compared to other methods is mainly attributed to the joint adaptation of related domains where each domain could benefit of other related domains. Furthermore, from the results obtained, we see that it is beneficial to use information coming from unlabeled target data (see Eq. 8 for updating the classifier $C$ ) during the learning process, compared to when no data from target domain is used (See the ablation study section for more information). Indeed, using our scheme, we find a representation space in which embeds the knowledge from the target domain into the learned classifier. By contrast, the competing methods do not provide a principled way of sharing information across all domains, leading to overall lower performance. The results also verify the superiority of MTDA-ITA over both mp-DSN, and 1p-DSN. This can be due to (i) having multiple private encoders increase the number of parameters that may lead to mp-DSN overfitting, (ii) superiority of the MTDA-ITA’s domain adversarial loss over the DSN’s MMD loss to separate the shared and private features, (iii) utilization of the unlabeled target data to regularize the classifier in MTDA-ITA.
141
+
142
+ # 4.2 MULTI-PIE DATASET
143
+
144
+ The Multi-PIE dataset includes face images of 337 individuals captured from different expressions, views, and illumination conditions (fig. 3(c)). For this experiment, we use 5 different camera views (positions) $C 0 5$ , $C 0 8$ , $C 0 9$ , $C 1 3$ , and $C 1 4$ as different domains (Fig. 3(c)) and the face expressions (normal, smile, surprise, squint, disgust, scream) as labels. Each domain contains 27120 images of size $6 4 \times 6 4 \times 3$ . We used each view as the source domain, in turn, and the rest as targets. We expect the face inclination angle to reflect the complexity of transfer learning. Tab. 2 shows the classification accuracy for $C 1 3$ and $C 1 4$ as source domain (the results for views $C 0 5$ , $C 0 8$ and $C 0 9$ as source domain are available in Appendix F). As can be seen, MTDA-ITA achieves the best performances as well as the best scores in most settings that verifies the effectiveness of MTDA-ITA for multi-target domain adaptation. Clearly, with the increasing camera angle, the image structure changes up to a certain extent (the views become heterogeneous). However, our method produces better results even under such very challenging conditions.
145
+
146
+ Table 1: Classification results on digit datasets. M: MNIST; MM: MNIST-M, S: SVHN, U: USPS. The best is shown in red. c-X: combining all target domains into a single one and train it using X. s-MTDA-ITA: training multiple MTDAITA where each one correspond to a source-target pair. 1p-DSN: extended DSN with single private encoder.mp-DSN: extended DSN with multiple private encoder. Last column shows the average rank of each method over all adaptation pairs. $\bf \Pi ^ { * } U N I T$ trains with the extended SVHN $> 5 0 0 \mathrm { K }$ images vs ours 72K). \*PixelDA uses $( \approx 1 , 0 0 0 )$ of labeled target domain data as a validation set for tuning the hyper-parameters.
147
+
148
+ <table><tr><td>method</td><td>S→M</td><td>S→MM</td><td>S→U</td><td>M→S</td><td>M→MM</td><td>M→U</td><td>Ave.ranking</td></tr><tr><td>Source Only</td><td>62.10±0.60</td><td>40.43±0.70</td><td>39.90± 0.60</td><td>30.29± 0.59</td><td>55.98 ± 0.48</td><td>78.30±0.38</td><td>14.00</td></tr><tr><td>1-NN</td><td>35.86</td><td>18.21</td><td>29.31</td><td>28.01</td><td>12.58</td><td>41.22</td><td>15.00</td></tr><tr><td>CORAL (Sun &amp; Saenko (2016))</td><td>63.10 ± 0.61</td><td>54.37 ± 0.53</td><td>50.15 ± 0.63</td><td>33.40 ±0.74</td><td>57.70 ± 0.69</td><td>81.05 ± 0.80</td><td>11.33</td></tr><tr><td>DANN (Ganin et al. (2016))</td><td>73.80 ±0.49</td><td>61.05±0.80</td><td>62.54 ± 0.91</td><td>35.50 ± 0.65</td><td>77.40±0.73</td><td>81.60 ± 0.60</td><td>8.75</td></tr><tr><td>ADDA(Tzeng et al. (2017))</td><td>77.68 ± 0.92</td><td>64.23±0.70</td><td>64.10±0.79</td><td>30.04± 0.98</td><td>91.47 ±1.0</td><td>90.51 ± 0.80</td><td>6.43</td></tr><tr><td>C-ADDA</td><td>80.10 ± 0.69</td><td>56.80 ± 0.79</td><td>64.80±0.88</td><td>27.50 ± 0.86</td><td>83.30 ±0.90</td><td>84.10 ±0.98</td><td>8.95</td></tr><tr><td>DTN (Zhang et al. (2015))</td><td>81.40± 0.42</td><td>63.70±0.39</td><td>60.12 ± 0.52</td><td>40.40±0.50</td><td>85.70±0.39</td><td>85.80 ± 0.46</td><td>6.04</td></tr><tr><td>c-DTN PixelDA (Bousmalis et al. (2017))</td><td>82.10 ±0.62</td><td>59.30 ± 0.59</td><td>56.87 ± 0.65</td><td>38.32 ± 0.50</td><td>80.90±0.80</td><td>79.31 ±0.78</td><td>7.96</td></tr><tr><td>UNIT (Liu et al. (2017))</td><td></td><td></td><td></td><td></td><td>98.10*</td><td>94.10*</td><td>1</td></tr><tr><td>DSN (Bousmalis et al. (2016))</td><td>90.6*</td><td></td><td></td><td></td><td></td><td>92.90</td><td>1</td></tr><tr><td>c-DSN</td><td>82.70±0.37 83.10 ±0.20</td><td>64.80± 0.40</td><td>65.30± 0.28</td><td>49.30±0.30</td><td>83.20±0.30</td><td>91.65 ± 0.40</td><td>2.85</td></tr><tr><td>1p-DSN</td><td>81.00 ± 0.47</td><td>60.56 ± 0.36 58.22 ± 0.68</td><td>60.35 ± 0.59</td><td>46.80 ± 0.45</td><td>80.49±0.40</td><td>88.21 ±0.38</td><td>4.84</td></tr><tr><td>mp-DSN</td><td>83.40±0.30</td><td>61.00±0.50</td><td>58.06 ±0.48 58.10 ±0.64</td><td>45.11 ± 0.33</td><td>77.33 ± 0.52 79.30±0.59</td><td>85.16 ± 0.63</td><td>4.90</td></tr><tr><td>s-MTDA-ITA</td><td>82.90±0.13</td><td>63.10±0.28</td><td>63.54±0.30</td><td>47.35 ± 0.40</td><td>82.42± 0.19</td><td>86.45 ± 0.71</td><td>5.33</td></tr><tr><td>c-MTDA-ITA</td><td>79.20±0.28</td><td>59.90 ± 0.30</td><td>63.70±0.26</td><td>49.60± 0.25 45.30 ±0.30</td><td>77.12 ± 0.22</td><td>89.21±0.28</td><td>2.88</td></tr><tr><td>MTDA-ITA</td><td>84.60±0.24</td><td>65.30 ± 0.15</td><td>70.03 ±0.20</td><td>52.01 ± 0.21</td><td>85.50 ±0.18</td><td>87.47 ± 0.25 94.20±0.20</td><td>4.25</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1.16</td></tr></table>
149
+
150
+ <table><tr><td>method</td><td>C13→C05</td><td>C13→C08</td><td>C13→C09</td><td>C13→C14</td><td>C14→C05</td><td>C14→C08</td><td>C14→C09</td><td>C14→C13</td><td>Ave.ranking</td></tr><tr><td>Source Only</td><td>50.79± 0.33</td><td>45.90± 0.50</td><td>40.04±0.40</td><td>59.68± 0.29</td><td>60.03±0.55</td><td>36.80± 0.61</td><td>40.11 ±0.50</td><td>60.57± 0.36</td><td>16.08</td></tr><tr><td>1-NN CORAL</td><td>33.21 54.89 ± 0.52</td><td>37.01</td><td>34.45</td><td>48.79 68.90± 0.35</td><td>47.44</td><td>28.24</td><td>30.86</td><td>44.86</td><td>17.00</td></tr><tr><td>DANN</td><td>57.86± 0.41</td><td>48.90±0.48 50.30 ± 0.43</td><td>40.30±0.53 45.30± 0.50</td><td>70.68 ± 0.35</td><td>59.98 ± 0.45 57.20± 0.45</td><td>40.63±0.55 40.22±0.55</td><td>40.80 ±0.53 40.77 ± 0.45</td><td>65.11 ± 0.45 70.50± 0.55</td><td>11.95 9.92</td></tr><tr><td>ADDA</td><td>64.83±0.69</td><td>63.20±0.45</td><td>55.48 ±0.65</td><td>74.25±0.55</td><td>73.62 ± 0.75</td><td>43.56±0.95</td><td>38.68 ±0.95</td><td>72.84±0.75</td><td>9.33</td></tr><tr><td>C-ADDA</td><td>59.20±0.25</td><td>30.70±0.63</td><td>53.20±0.40</td><td>68.33±0.35</td><td>65.88±0.38</td><td>30.60±0.61</td><td>45.34±0.48</td><td>64.30±0.40</td><td>11.50</td></tr><tr><td>DTN</td><td>63.78±0.29</td><td>60.45±0.35</td><td>60.55±0.35</td><td>72.60±0.25</td><td>70.67±0.30</td><td>41.55±0.65</td><td>41.45 ± 0.45</td><td>70.67±0.45</td><td></td></tr><tr><td>c-DTN</td><td>57.53 ± 0.42</td><td>55.24 ± 0.45</td><td>57.14 ± 0.39</td><td>65.16 ± 0.35</td><td>63.80 ±0.42</td><td>38.97 ± 0.71</td><td>39.80 ± 0.65</td><td>62.10 ± 0.45</td><td>8.75 10.92</td></tr><tr><td>PixelDA</td><td>45.68± 0.52</td><td>44.95± 0.42</td><td>44.45±0.55</td><td>90.50± 0.25</td><td>46.28±0.60</td><td>45.89±0.61</td><td>44.45± 0.51</td><td>69.15 ± 0.45</td><td>9.95</td></tr><tr><td>UNIT</td><td>44.14±0.10</td><td>44.47 ± 0.11</td><td>44.21 ±0.12</td><td>44.47 ± 0.11</td><td>43.03 ±0.1</td><td>44.44 ±0.15</td><td>44.47 ± 0.15</td><td>44.47 ± 0.05</td><td>11.07</td></tr><tr><td>DSN</td><td>64.15± 0.30</td><td>57.70±0.38</td><td>49.15± 0.45</td><td>80.75±0.27</td><td>82.20±0.28</td><td>38.75±0.53</td><td>45.00± 0.25</td><td>80.50± 0.35</td><td></td></tr><tr><td>c-DSN</td><td>57.34±0.45</td><td>31.63 ±0.60</td><td>51.17 ±0.40</td><td>74.52 ±0.37</td><td>82.01 ± 0.35</td><td>34.25±0.58</td><td>42.63 ± 0.55</td><td>79.42 ±0.35</td><td>5.15 8.20</td></tr><tr><td>1p-DSN</td><td>55.84± 0.50</td><td>30.03 ± 0.50</td><td>49.06 ± 0.38</td><td>72.11 ± 0.50</td><td>81.22 ±0.45</td><td>33.33 ± 0.58</td><td>42.03 ±0.24</td><td>78.78±0.57</td><td>8.63</td></tr><tr><td>mp-DSN</td><td>55.20±0.46</td><td>30.40±0.50</td><td>47.80±0.35</td><td>75.30 ± 0.25</td><td>80.75±0.20</td><td>30.20 ±0.55</td><td>43.00±0.35</td><td>79.02±0.40</td><td>8.88</td></tr><tr><td>s-MTDA-ITA</td><td>70.10± 0.27</td><td>58.90±0.25</td><td>58.10±0.27</td><td>80.12±0.15</td><td>82.05±0.18</td><td>45.90±0.30</td><td>52.67±0.30</td><td>81.60±0.24</td><td></td></tr><tr><td>c-MTDA-ITA</td><td>60.34 ± 0.17</td><td>55.67 ± 0.21</td><td>57.10 ± 0.23</td><td>73.50 ± 0.20</td><td>76.80 ±0.10</td><td>43.10 ±0.12</td><td>48.10 ± 0.14</td><td>80.90 ± 0.11</td><td>3.65</td></tr><tr><td>MTDA-ITA</td><td>78.40 ± 0.2</td><td>66.70 ± 0.17</td><td>70.30± 0.14</td><td>85.49 ± 0.11</td><td>87.20±0.10</td><td>61.40±0.14</td><td>60.05 ±0.13</td><td>86.70 ± 0.10</td><td>5.01 1.20</td></tr></table>
151
+
152
+ Table 2: Classification results on Multi-PIE dataset. Last column shows the average rank of each method over all adaptation pairs. The best is shown in red.
153
+
154
+ # 4.3 ABLATION STUDIES
155
+
156
+ We performed an ablation study on the proposed model measuring impact of various terms on the model’s performance. To this end, we conducted additional experiments for the digit datasets with different components ablation, i.e., training without the reconstruction loss (denoted as MTDA-woR) by setting $\lambda _ { r } = 0$ , training without the classifier entropy loss (denoted as MTDA-woE) by setting $\lambda _ { c } = 0$ , training without the multidomain separation loss (denoted as MTDA-woD) by setting $\lambda _ { d } = 0$ .
157
+
158
+ As can be seen from fig. 4, disabling each of the above components leads to degraded performance. More precisely, the average drop by disabling the classifier entropy loss is $\approx 3 . 5 \%$ . Similarly, by disabling the reconstruction loss and the multi-domain separation loss, we have $\approx 4 . 5 \%$ and $\approx 2 2 \%$ average drop in performance, respectively. Clearly, by disabling the multi-domain separation loss, the accuracy drops significantly due to the severe data distribution mismatch between different domains. The figure also demonstrates that leveraging the unlabeled data from multiple target domains during training enhances the generalization ability of the model that leads to higher performance. In addition, the performance drop caused by removing the reconstruction loss , i.e., without the private encoder/decoder, indicates (i) the benefit of modeling the latent features as the combination of shared and private features, (ii) the ability of the model’s domain adversarial loss to effectively learn those features.
159
+
160
+ In order to examine the effect of the private features on the model’s classification performance, we took the MTDA-ITA and trained it without the private encoder (denoted as MTDA-woP). As fig. 4 shows, without the private features, the model performed consistently worse $\approx 2 \%$ average drop in performance) in all scenarios. This demonstrates explicitly modeling what is unique to each domain can improve the model’s ability to extract domain–invariant features. In summary, this ablation study showed that the individual components bring complimentary information to achieve the best classification results.
161
+
162
+ # 4.4 FEATURE VISUALIZATION
163
+
164
+ We use t-SNE (Maaten & Hinton (2008)) on Digit dataset to visualize shared and private feature representations from different domains. Fig. 6 shows shared and private features from source (SVHN) and target domains before (a),(b) and after adaptation (c),(d). MTDA-ITA significantly reduces the domain mismatch for the shared features (circle markers in fig. 6d, strong mixing of domain labels in this cluster, fig. 6c) and increases it for the private features (triangle markers, pure and well-separated domain clusters in fig. 6c). This is partially due to the proposed multi-domain separation loss through the use of the domain classifier $D$ , which penalizes the domain mismatch for the shared features and rewards the mismatch for the private features. Moreover, as supported by the quantitative results in tab. 1, joint adaptation of related domains and the classifier, accomplished through the model, leads to superior class separability, compared to original features. This is depicted in fig. 6d, where the points in the shared space (large cluster) are grouped into class-specific subgroups (color indicates class label), while they are mixed in private spaces (smaller clusters). This is in contrast to fig. 6b, where original features show no class-specificity.
165
+
166
+ We also show the learned shared and private features for the models MTDA-woE, MTDA-woP, MTDAwoR, and MTDA-woD, in figs. 6e to 6l. Note that since the private encoder $E _ { p }$ is disabled for MTDA-woR, and MTDA-woP, no private features are depicted in figs. $6 \mathrm { g }$ to 6j. The class label separation in the shared space for MTDA-woE, MTDA-woP, and MTDA-woR, figs. 6f, 6h and 6j, is still evident but not as strong as in the full model, fig. 6d, corroborating the small loss in classification accuracy observed in fig. 4a. On the other hand, MTDA-woD has significant mixing of class labels in the shared space, fig. 6l, more so than MTDA-woE, MTDA-woR, and MTDA-woP, implying worse classification prediction in fig. 4a due to the severe mismatch between different domains. Since our model uses one private encoder for all target domains, we also contrasted the visualization of DSN model with one private encoder 1p-DSN in Appendix H.
167
+
168
+ # 5 CONCLUSION
169
+
170
+ This paper presented an information theoretic end-to-end approach to uDA in the context of a single source and multiple target domains that share a common task or properties. The proposed method learns feature representations invariant under multiple domain shifts and simultaneously discriminative for the learning task. This is accomplished by explicitly separating representations private to each domain and shared between source and target domains using a novel discrimination strategy. Our use of a single private domain encoder results in a highly scalable model, easily optimized using established back-propagation approaches. Results on three benchmark datasets for image classification show superiority of the proposed method compared to the state-of-the-art methods for unsupervised domain adaptation of visual domain categories.
171
+
172
+ # REFERENCES
173
+
174
+ M Ehsan Abbasnejad, Anthony Dick, and Anton van den Hengel. Infinite variational autoencoder for semi-supervised learning. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 781–790. IEEE, 2017.
175
+
176
+ Alessandro Achille and Stefano Soatto. Information dropout: Learning optimal representations through noisy computation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018.
177
+
178
+ Alexander Alemi, Ben Poole, Ian Fischer, Joshua Dillon, Rif A Saurous, and Kevin Murphy. Fixing a broken elbo. In International Conference on Machine Learning, pp. 159–168, 2018a.
179
+
180
+ Alexander A Alemi, Ian Fischer, Joshua V Dillon, and Kevin Murphy. Deep variational information bottleneck. International Conference on Learning Representation (ICLR), 2016.
181
+
182
+ Alexander A Alemi, Ian Fischer, and Joshua V Dillon. Uncertainty in the variational information bottleneck. arXiv preprint arXiv:1807.00906, 2018b.
183
+
184
+ Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. ICLR Workshops, 2017.
185
+
186
+ David Barber and Felix Agakov. The im algorithm: a variational approach to information maximization. In Advances in Neural Information Processing Systems (NIPS), pp. 201–208. MIT Press, 2003.
187
+
188
+ Sagie Benaim and Lior Wolf. One-sided unsupervised domain mapping. In Advances in Neural Information Processing Systems (NIPS), pp. 752–762, 2017.
189
+
190
+ Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. In Advances in Neural Information Processing Systems (NIPS), pp. 343–351, 2016.
191
+
192
+ Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 1, pp. 7, 2017.
193
+
194
+ Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
195
+
196
+ John S Bridle. Probabilistic interpretation of feedforward classification network outputs, with relationships to statistical pattern recognition. In Neurocomputing, pp. 227–236. Springer, 1990.
197
+
198
+ Matthew Chalk, Olivier Marre, and Gasper Tkacik. Relevant sparse codes with variational information bottleneck. In Advances in Neural Information Processing Systems (NIPS), pp. 1957–1965, 2016.
199
+
200
+ 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. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 1711, 2017.
201
+
202
+ Nicolas Courty, Rémi Flamary, Amaury Habrard, and Alain Rakotomamonjy. Joint distribution optimal transportation for domain adaptation. In Advances in Neural Information Processing Systems (NIPS), pp. 3733–3742, 2017.
203
+
204
+ Gabriela Csurka. A comprehensive survey on domain adaptation for visual applications. pp. 1–35. Springer, 2017.
205
+
206
+ Basura Fernando, Amaury Habrard, Marc Sebban, and Tinne Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In IEEE International Conference on Computer Vision (ICCV), pp. 2960–2967, 2013.
207
+
208
+ Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. International Conference on Machine Learning (ICML), 2015.
209
+
210
+ Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096–2030, 2016.
211
+
212
+ Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2066–2073, 2012.
213
+
214
+ Guang-Yuan Hao, Hong-Xing Yu, and Wei-Shi Zheng. Mixgan: Learning concepts from different domains for mixture generation. arXiv preprint arXiv:1807.01659, 2018.
215
+
216
+ Hirokazu Kameoka, Takuhiro Kaneko, Kou Tanaka, and Nobukatsu Hojo. Stargan-vc: Non-parallel manyto-many voice conversion with star generative adversarial networks. arXiv preprint arXiv:1806.02169, 2018.
217
+
218
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representation (ICLR), 2015.
219
+
220
+ Elyor Kodirov, Tao Xiang, Zhenyong Fu, and Shaogang Gong. Unsupervised domain adaptation for zero-shot learning. In IEEE International Conference on Computer Vision (ICCV), pp. 2452–2460, 2015.
221
+
222
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
223
+
224
+ Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In IEEE International Conference on Computer Vision (ICCV), pp. 5543–5551. IEEE, 2017.
225
+
226
+ Jianhua Lin. Divergence measures based on the shannon entropy. IEEE Transactions on Information theory, 37(1):145–151, 1991.
227
+
228
+ Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems (NIPS), pp. 469–477. Curran Associates, Inc., 2016.
229
+
230
+ Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems (NIPS), pp. 700–708, 2017.
231
+
232
+ Mingsheng Long, Jianmin Wang, Guiguang Ding, Jiaguang Sun, and Philip S Yu. Transfer joint matching for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1410–1417, 2014.
233
+
234
+ Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. International Conference on Machine Learning (ICML), 2015.
235
+
236
+ Mingsheng Long, Jianmin Wang, Yue Cao, Jiaguang Sun, and S Yu Philip. Deep learning of transferable representation for scalable domain adaptation. IEEE Transactions on Knowledge and Data Engineering, 28(8):2027–2040, 2016.
237
+
238
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008.
239
+
240
+ Shakir Mohamed and Danilo Jimenez Rezende. Variational information maximisation for intrinsically motivated reinforcement learning. In Advances in neural information processing systems (NIPS), pp. 2125–2133, 2015.
241
+
242
+ Saeid Motiian, Quinn Jones, Seyed Iranmanesh, and Gianfranco Doretto. Few-shot adversarial domain adaptation. In Advances in Neural Information Processing Systems (NIPS), pp. 6673–6683, 2017.
243
+
244
+ Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
245
+
246
+ Yuchen Pu, Weiyao Wang, Ricardo Henao, Liqun Chen, Zhe Gan, Chunyuan Li, and Lawrence Carin. Adversarial symmetric variational autoencoder. In Advances in Neural Information Processing Systems (NIPS), pp. 4330–4339, 2017.
247
+
248
+ Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems (NIPS), pp. 506–516, 2017.
249
+
250
+ Kuniaki Saito, Yoshitaka Ushiku, and Tatsuya Harada. Asymmetric tri-training for unsupervised domain adaptation. International Conference on Machine Learning (ICML), 2017.
251
+
252
+ Mathieu Salzmann, Carl Henrik Ek, Raquel Urtasun, and Trevor Darrell. Factorized orthogonal latent spaces. In International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 701–708, 2010.
253
+
254
+ Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European Conference on Computer Vision (ECCV), pp. 443–450. Springer, 2016.
255
+
256
+ Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. Thirtieth AAAI Conference on Artificial Intelligence, 2016.
257
+
258
+ Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In IEEE Information Theory Workshop (ITW), pp. 1–5. IEEE, 2015.
259
+
260
+ Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 1, pp. 4, 2017.
261
+
262
+ Hongliang Yan, Yukang Ding, Peihua Li, Qilong Wang, Yong Xu, and Wangmeng Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
263
+
264
+ Donggeun Yoo, Namil Kim, Sunggyun Park, Anthony S Paek, and In So Kweon. Pixel-level domain transfer. In European Conference on Computer Vision (ECCV), pp. 517–532, 2016.
265
+
266
+ Werner Zellinger, Thomas Grubinger, Edwin Lughofer, Thomas Natschläger, and Susanne Saminger-Platz. Central moment discrepancy (cmd) for domain-invariant representation learning. International Conference on Learning Representation (ICLR), 2017.
267
+
268
+ Jing Zhang, Wanqing Li, and Philip Ogunbona. Joint geometrical and statistical alignment for visual domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
269
+
270
+ Xu Zhang, Felix Xinnan Yu, Shih-Fu Chang, and Shengjin Wang. Deep transfer network: Unsupervised domain adaptation. arXiv preprint arXiv:1503.00591, 2015.
271
+
272
+ Han Zhao, Shanghang Zhang, Guanhang Wu, João P. Costeira, Jose Moura, and Geoffrey J. Gordon. Multiple source domain adaptation with adversarial training of neural networks. International Conference on Learning Representation (ICLR) workshops, 05 2017.
273
+
274
+ # A CONNECTION TO INFORMATION THEORETIC REPRESENTATION LEARNING
275
+
276
+ The idea of using information theoretic (IT) objectives for representation learning was originally introduced in (Tishby & Zaslavsky (2015)). Since their approach for optimizing the IT objective functions relied on the iterative Blahut Arimoto algorithm (Tishby & Zaslavsky (2015)), it is not feasible to apply to deep neural network (DNN) frameworks. Similar to our approach, there have been some recent works (Mohamed & Rezende (2015); Chalk et al. (2016); Alemi et al. (2018b; 2016; 2018a)) to approximate the MI by applying variational bounds on MI, though not in the context of domain adaptation.
277
+
278
+ Mohamed & Rezende (2015) utilized the variational bounds on MI, and apply it to DNNs in the context of reinforcement learning. Chalk et al. (2016) and Alemi et al. (2016), developed the same variational lower bound In the context of Information Bottleneck (IB) principle (Tishby & Zaslavsky (2015)), where the former applied it to sparse coding problems, and used the kernel trick to achieve nonlinear mappings, whereas the latter applied it to DNNs to handle large datasets thanks to the SGD algorithm. Achille & Soatto (2018) proposed a variational bound on the MI in the context of IB, from the perspective of variational dropout and demonstrated its utility in learning disentangled representations for variational autoencoders.
279
+
280
+ The main difference between our method and the above methods is that these methods throw away the information in the data not related to the task by minimizing the mutual information between the data points and the latent representations that may lead to ignoring the individual characteristics (private features) of the datasets in a multiple dataset regime, whereas our method explicitly models what is unique to each domain (dataset) that improves the model’s ability to extract domain–invariant features.
281
+
282
+ In the unsupervised representation learning literature, our work is also related to the VAE-based models (Bowman et al. (2015)). However, we propose to tackle the task using our IT approach using deterministic mappings instead of the traditional evidence lower bound (ELBO) optimization with stochastic mappings. In contrast to the unsupervised representation learning approaches, our setting also allows us to further improve the latent representation using the labeled data in the source domain while leveraging the sharing of dependencies across different target domains.
283
+
284
+ # B CONNECTION TO MULTIPLE DOMAIN TRANSFER NETWORKS
285
+
286
+ Recent studies have shown remarkable success in multiple domain transfer (MDT) (Choi et al. (2017); Anoosheh et al. (2017); Kameoka et al. (2018); Hao et al. (2018)) though not in the context of the image classification, rather in the context of image generation. Choi et al. (2017) proposed StarGAN, a generative adversarial network capable of learning mappings among multiple domains in the contest of image to image translation framework. The goal of StarGAN is to train a single generator $G$ though this requires passing in a vector along with each input to the generator specifying the output domain desired, that learns mappings among multiple domains. To achieve this, $G$ is trained to translate an input image $_ { \textbf { \em x } }$ into an output image $\mathbf { x } ^ { \prime }$ conditioned on the target domain label $^ d$ , $G ( \pmb { x } , \pmb { d } ) \pmb { x } ^ { \prime }$ . Similar to our domain classifier module $D$ , they introduce an auxiliary classifier that allows a single discriminator to control multiple domains.
287
+
288
+ Anoosheh et al. (2017) introduced ComboGAN, which decouples the domains and networks from each other. Similar to our encoder/decoder modules, ComboGAN’s generator networks contain encoder/decoders assigning each encoder and decoder to a domain. They combine the encoders and decoders of the trained model like building blocks, taking as input any domain and outputting any other. For example during inference, to transform an image $_ { \textbf { \em x } }$ from an arbitrary domain $\mathbf { X }$ to $\mathbf { x } ^ { \prime }$ from domain $\mathbf { X } ^ { \prime }$ , they simply perform $\pmb { x } ^ { \prime } = G _ { \mathbf { X } ^ { \prime } , \mathbf { X } } ( \pmb { x } ) = D e c o d e r _ { X ^ { \prime } } ( E n c o d e r _ { X } ( \pmb { x } ) )$ . The result of $E n c o d e r _ { X } ( { \pmb x } )$ can even be cached when translating to other domains as not to repeat computation.
289
+
290
+ The main differences between the MDT methods and ours is that, unlike our method which does domain alignment in feature space, MDT methods adapt representations not in feature space but rather in raw pixel space; translating samples from one domain to the “style” of a other domains. This works well for limited domain shifts where the domains are similar in pixel-space, but can be too limiting for settings with larger domain shifts that results in poor performance in significant structural change of the samples in different domains.
291
+
292
+ # C CONNECTION TO DOMAIN SEPARATION NETWORKS
293
+
294
+ The method closest to our work is Domain Separation Networks (DSN) (Bousmalis et al. (2016)), which use the notion of auto-encoders to explicitly separate the feature representations private to each source/target domain from those that are shared between the domains. Although extending DSN to multiple domains might seem trivial, DSN requires an autoencoder per domain, making the model impractical in the case of more than a couple of domains.
295
+
296
+ The overall loss of DSN consists of a reconstruction loss for each domain modeled by a shared decoder, a similarity loss such as MMD, which encourages domain invariance modeled by a shared encoder, and a dissimilarity loss modeled by two private encoders: one for the source domain and one for the target domain. While one could attempt to generalize DSN to multiple target domains by having individual per-target domain private encoders, doing so would prove problematic when the number of target domains is large — each private encoder would require a large "private" dataset to learn the private parameters. Precisely, for multiple $\bar { ( \cal M ) }$ target domains, we could train a DSN model with one shared encoder, $M + 1$ private encoder (one for each domain), and one shared decoder. This leads to $M + 3$ models to train that implies the number of models increases linearly with the number of domains, as does the required training time. Second, DSN uses an orthogonality constraint among the shared and the private representations which may not be strong enough to remove redundancy and enforce disentangling among different private spaces. Precisely, DSN defines the loss via a soft subspace orthogonality constraint between the private and shared representation of each domain. However, it does not enforce the private representation of different domains to be different that may result in redundancy of different private spaces.
297
+
298
+ In addition, DSN enforces separation of spaces using the notion of Euclidean orthogonality, e.g., $\| z _ { s } - z _ { p } \| ^ { 2 }$ . In case of multiple target domains, this would result in learning of all pairs of private spaces independently. To address those deficiencies, we first explicitly couple different private encoders into a single private encoder model, $E _ { \theta _ { p } }$ of fig. 2 , which allows us to generalize to an arbitrary number of target domains. To assure that the information among the private and shared spaces is not shared (i.e., "orthogonal"), we define an informationtheoretic criteria enforced by a domain classifier, $\mathcal { D } _ { \psi }$ of fig. 2, which aims to segment the private space into clusters that correspond to individual target domains. By using $D _ { \psi }$ within the adversarial framework, MTDA-ITA learns simultaneously the shared and private features from different domains (see fig. 6). We showed in Sec. 4 that our model performs better than the trivial extension of DSNs to the multi-domain case.
299
+
300
+ # D NETWORK ARCHITECTURE
301
+
302
+ The network architecture used for the experiments is given in tab. 3. We use the following abbreviation for ease of presentation: ${ \bf N } =$ Neurons, $\mathbf { K } { = }$ Kernel size, ${ \mathrm { S } } { = } { }$ Stride size, $\begin{array} { r } { \boldsymbol { \mathrm { D } } \boldsymbol { = } } \end{array}$ Number of Domains, $\mathbf { C } =$ number of Classes. The transposed convolutional layer is denoted by DCONV. The residual basic block is denoted as RESBLK.
303
+
304
+ Table 3: Network architecture for the experiments.
305
+
306
+ <table><tr><td>Layer</td><td>Encoders (shared,private)</td></tr><tr><td>1</td><td>CONV-(N16,K7,S1), ReLU</td></tr><tr><td>2</td><td>CONV-(N32,K3,S2), ReLU</td></tr><tr><td>3</td><td>CONV-(N64,K3,S2), ReLU</td></tr><tr><td>4</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>5</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>6</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>7</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>Layer</td><td>Decoder</td></tr><tr><td>1</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>2</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>3</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>4</td><td>RESBLK-(N64,K3,S1)</td></tr><tr><td>5</td><td>DCONV-(N32,K3,S2), ReLU</td></tr><tr><td>6</td><td>DCONV-(N16,K3,S2), ReLU</td></tr><tr><td>7</td><td>DCONV-(N1,K1,S1), Tanh</td></tr><tr><td>Layer</td><td>Discriminator</td></tr><tr><td>1</td><td>CONV-(N4,K3,S1),ReLU</td></tr><tr><td>2</td><td>CONV-(N8,K3,S1),ReLU</td></tr><tr><td>3</td><td>CONV-(N16,K3,S1),ReLU</td></tr><tr><td>4</td><td>CONV-(N32,K3,S1),ReLU</td></tr><tr><td>5</td><td>CONV-(N1,K3,S1),ReLU</td></tr><tr><td>6</td><td>DENSE-(ND), Softmax</td></tr><tr><td>Layer</td><td>Classifier</td></tr><tr><td>1</td><td>CONV-(N4,K3,S1),ReLU</td></tr><tr><td>2</td><td>CONV-(N8,K3,S1), ReLU</td></tr><tr><td>3</td><td>CONV-(N16,K3,S1), ReLU</td></tr><tr><td>4</td><td>CONV-(N32,K3,S1),ReLU</td></tr><tr><td>5</td><td>CONV-(N1,K3,S1),ReLU</td></tr><tr><td>6</td><td>DENSE-(NC), Softmax</td></tr></table>
307
+
308
+ # E PROPOSED MODEL’S ALGORITHM
309
+
310
+ The detailed optimization process of the proposed model is shown in Algorithm 1.
311
+
312
+ # F ADDITIONAL EXPERIMENTS FOR DIGIT AND MULTI-PIE DATASETS
313
+
314
+ The additional experiments for Digit dataset where we set MNIST-M and USPS as source domain is available in tab. 4. The additional experiments for Multi-PIE dataset where we set $C 0 5$ , $C 0 8$ and $C 0 9$ as source domain is available in tabs. $5 \& 6$ .
315
+
316
+ # G PACS DATASET
317
+
318
+ This dataset contains 9991 images $2 2 7 \times 2 2 7 \times 3$ dimension) across 7 categories (‘dog’, ‘elephant’, ‘giraffe’,‘guitar’, ‘house’, ‘horse’ and ‘person’) and 4 domains of different stylistic depictions (‘Photo’, ‘Art painting’, ‘Cartoon’ and ‘Sketch’). The very diverse depiction styles provide a significant gap between domains, coupled with the small number of data samples, making it extremely challenging for domain adaptation. Consequently, the dataset was originally used for multi-source to single target domain adaptation (Li et al. (2017)). Instead, we tackle a significantly more challenging problem of single-source to multiple target adaptation. Tab. 7 shows the classification accuracy of various methods. MTDA-ITA consistently
319
+
320
+ ![](images/18facd59a83865bc6e26c98e1f1fdea84883eb0fbbf03a8444befb1f847d7fe4.jpg)
321
+ Figure 4: Ablation of MTDA-ITA on Digit dataset. We show that each component of our method, Reconstruction loss, Classifier entropy loss with separating shared/private features, contributes to the overall performance.
322
+
323
+ Table 4: Classification results on digit datasets. M: MNIST; MM: MNIST-M, S: SVHN, U: USPS. The best is shown in red. c-X: combining all target domains into a single one and train it using X. s-MTDA-ITA: training multiple MTDA-ITA where each one correspond to a source-target pair. mp-DSN: extended DSN with multiple private encoder. $\bf \Pi ^ { * } U N I T$ trains with the extended SVHN $> 5 0 0 \mathrm { K }$ images vs ours 72K). $^ *$ PixelDA uses $( \approx 1 , 0 0 0 )$ of labeled target domain data as a validation set for tuning the hyper-parameters.
324
+
325
+ <table><tr><td>method</td><td>MM→S</td><td>MM→M</td><td>MM→U</td><td>U→S</td><td>U→M</td><td>U→MM</td></tr><tr><td>Source Only</td><td>40.00±0.61</td><td>84.46 ± 0.29</td><td>80.43± 0.50</td><td>23.41± 0.52</td><td>50.64 ± 0.37</td><td>41.45±0.38</td></tr><tr><td>1-NN</td><td>21.45</td><td>82.13</td><td>36.90</td><td>15.34</td><td>38.45</td><td>18.54</td></tr><tr><td>CORAL (Sun &amp; Saenko (2016))</td><td>40.20 ±0.60</td><td>84.90 ± 0.70</td><td>87.54 ± 0.44</td><td>38.90 ± 0.96</td><td>85.01 ± 0.61</td><td>60.45 ± 0.70</td></tr><tr><td>DANN (Ganin et al. (2016))</td><td>51.80 ± 0.91</td><td>61.05 ± 0.71</td><td>85.34 ± 0.64</td><td>35.50± 0.84</td><td>77.40 ± 0.64</td><td>61.60 ± 0.64</td></tr><tr><td>ADDA (Tzeng et al. (2017))</td><td>40.64 ± 0.86</td><td>92.82 ± 0.48</td><td>80.70±0.48</td><td>41.23 ± 0.78</td><td>90.10± 0.58</td><td>56.21 ± 0.79</td></tr><tr><td>c-ADDA</td><td>35.43 ± 0.94</td><td>88.47 ± 0.61</td><td>74.19 ± 0.58</td><td>39.36 ± 0.99</td><td>84.67 ± 0.94</td><td>52.54 ± 0.88</td></tr><tr><td>DTN (Zhang et al. (2015)) c-DTN</td><td>48.80± 0.66</td><td>88.80±0.38</td><td>90.68 ± 0.35</td><td>42.43 ± 0.61</td><td>89.04 ± 0.36</td><td>55.78 ± 0.40</td></tr><tr><td>UNIT (Liu et al. (2017))</td><td>44.21 ± 0.61</td><td>83.60 ± 0.54</td><td>84.98 ± 0.41</td><td>39.75 ± 0.64</td><td>85.04 ± 0.45</td><td>48.86 ± 0.54</td></tr><tr><td>DSN (Bousmalis et al. (2016))</td><td>1 51.50 ± 0.64</td><td></td><td>/</td><td></td><td>90.60</td><td></td></tr><tr><td>c-DSN</td><td>47.10 ± 0.50</td><td>90.20± 0.31</td><td>89.95± 0.29</td><td>48.20 ± 0.59</td><td>91.40 ± 0.30</td><td>60.45 ± 0.35</td></tr><tr><td>1p-DSN</td><td>45.00 ± 0.60</td><td>84.60 ± 0.40</td><td>84.80 ±0.39</td><td>40.50 ± 0.61</td><td>86.05 ± 0.46</td><td>56.25 ± 0.50</td></tr><tr><td>mp-DSN</td><td>47.15 ± 0.64</td><td>81.96 ± 0.60</td><td>83.03 ±0.49</td><td>39.30 ± 0.51</td><td>84.55 ± 0.56</td><td>55.03 ± 0.60</td></tr><tr><td>s-MTDA-ITA</td><td></td><td>85.51 ± 0.54</td><td>83.24± 0.24</td><td>38.30 ± 0.74</td><td>87.40 ± 0.35</td><td>55.47 ± 0.44</td></tr><tr><td>c-MTDA-ITA</td><td>50.55± 0.18 47.32±0.19</td><td>94.82±0.21</td><td>89.05 ±0.28</td><td>40.13±0.30</td><td>87.10 ± 0.25</td><td>61.01 ± 0.24</td></tr><tr><td>MTDA-ITA</td><td>53.50 ± 0.22</td><td>90.20 ±0.30 98.20 ± 0.10</td><td>90.01 ± 0.24 94.10 ± 0.11</td><td>41.10 ± 0.35 46.00 ± 0.48</td><td>85.35 ± 0.28 91.50 ± 0.23</td><td>60.31± 0.34 67.30 ± 0.15</td></tr></table>
326
+
327
+ Table 5: Classification results on Multi-PIE dataset. The best is shown in red.
328
+
329
+ <table><tr><td>method</td><td>C05 →C08</td><td>C05→C09</td><td>C05→C13</td><td>C05→C14</td></tr><tr><td>Source Only</td><td>31.56 ± 0.40</td><td>40.67 ± 0.36</td><td>39.89 ± 0.22</td><td>54.70± 0.25</td></tr><tr><td>1-NN CORAL (Sun &amp; Saenko (2016))</td><td>27.28 36.55 ± 0.66</td><td>31.22 38.60 ± 0.67</td><td>33.66</td><td>47.04 55.29 ± 0.47</td></tr><tr><td></td><td></td><td></td><td>40.60 ± 0.58</td><td></td></tr><tr><td>DANN (citeganin2016domain)</td><td>40.30 ± 0.60</td><td>41.20 ± 0.65</td><td>40.12 ± 0.60</td><td>58.90 ± 0.38</td></tr><tr><td>ADDA (Tzeng et al. (2017)) C-ADDA</td><td>33.21 ± 0.81</td><td>30.86 ± 0.90</td><td>52.44± 0.80</td><td>70.18 ± 0.60</td></tr><tr><td></td><td>46.88 ± 0.65</td><td>36.38 ± 0.88</td><td>39.14 ± 0.85</td><td>65.41 ± 0.69</td></tr><tr><td>DTN (Zhang et al. (2015))</td><td>38.50 ± 0.51</td><td>30.56 ± 0.46</td><td>55.78 ± 0.36</td><td>68.90 ± 0.31</td></tr><tr><td>c-DTN</td><td>41.70 ± 0.42</td><td>31.10 ± 0.48</td><td>50.19 ± 0.45</td><td>60.34 ± 0.35</td></tr><tr><td>PixelDA (Bousmalis et al. (2017))</td><td>44.93 ±0.42</td><td>44.75 ± 0.45</td><td>45.18 ± 0.45</td><td>46.88 ± 0.49</td></tr><tr><td>UNIT (Liu et al. (2017))</td><td>44.47 ± 0.21</td><td>44.47 ± 0.21</td><td>44.47 ± 0.20</td><td>44.51 ± 0.28</td></tr><tr><td>DSN (Bousmalis et al. (2016))</td><td>45.12 ± 0.46</td><td>44.35± 0.49</td><td>48.12 ± 0.53</td><td>75.00 ± 0.39</td></tr><tr><td>c-DSN</td><td>42.52 ± 0.48</td><td>38.54 ± 0.64</td><td>34.15 ± 0.64</td><td>69.45 ± 0.55</td></tr><tr><td>1p-DSN</td><td>41.64 ± 0.58</td><td>37.84 ± 0.63</td><td>34.65 ± 0.44</td><td>68.75 ± 0.85</td></tr><tr><td>mp-DSN</td><td>41.30 ± 0.28</td><td>35.14 ± 0.35</td><td>34.40 ± 0.35</td><td>65.70 ± 0.27</td></tr><tr><td>s-MTDA-ITA</td><td>44.40 ± 0.23</td><td>44.60 ± 0.25</td><td>47.65 ± 0.27</td><td>80.20 ± 0.13</td></tr><tr><td>c-MTDA-ITA</td><td>40.49 ± 0.25</td><td>40.70 ± 0.25</td><td>42.80 ± 0.25</td><td>71.60 ± 0.10</td></tr><tr><td>MTDA-ITA</td><td>49.01 ± 0.20</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>48.20± 0.27</td><td>53.13 ±0.22</td><td>84.29 9±0.10</td></tr></table>
330
+
331
+ # Algorithm 1 MDTA-ITA Algorithm
332
+
333
+ Require: $\{ \mathbf { X } , \mathbf { Y } , \mathbf { D } \} { : \mathrm { M } }$ domain datasets.
334
+ $\lambda _ { r } , \lambda _ { c } , \lambda _ { d }$ : Model hyper-parameters.
335
+ Ensure: $\theta _ { s } , \theta _ { p } , \theta _ { c } , \phi , \psi$ : Model parameters.
336
+ 1: Initialize $\bar { \theta } _ { s } , \theta _ { p } , \theta _ { c } , \phi , \psi$ ;
337
+ 2: repeat 3: Sample a mini-batch from each of source/target domain datasets.
338
+ 4: Update $\{ \theta _ { s } \}$ by minimizing $\mathcal { L } _ { s }$ in Eq.(10) through the gradient descent: $\begin{array} { r } { \theta _ { s } = \theta _ { s } - \eta \frac { \partial \mathcal { L } _ { s } } { \partial \theta _ { s } } } \end{array}$ .
339
+ 5: Update {θp} by minimizing Lp in Eq.(9) through the gradient descent:θp = θp − η ∂Lp∂θp .
340
+ 6: Update $\{ \theta _ { c } \}$ by minimizing $\mathcal { L } _ { c }$ in Eq.(8) through the gradient descent: $\begin{array} { r } { \theta _ { c } = \theta _ { c } - \eta \frac { \partial \mathcal { L } _ { c } } { \partial \theta _ { c } } } \end{array}$ 7: Update $\{ \phi \}$ by minimizing $\mathcal { L } _ { \phi }$ in Eq.(6) through the gradient descent: $\phi = \phi - \eta \frac { \partial \mathcal { L } _ { \phi } } { \partial \phi }$ .
341
+ 8: Update $\{ \psi \}$ by minimizing $\mathcal { L } _ { \psi }$ in Eq.(5) through the gradient descent: $\begin{array} { r } { \psi = \psi - \eta \frac { \partial \mathcal { L } _ { s } } { \partial \psi } } \end{array}$ .
342
+ 9: until Convergence;
343
+ 10: return $\{ \theta _ { s } , \theta _ { p } , \theta _ { c } , \phi , \psi \}$ .
344
+
345
+ achieves the best performance for all transfer tasks. Evaluations were obtained by training all models (ADDA, DSN, and ours) from scratch on the PACS dataset. Note that the overall performance figures are low due to the extreme difficulty of the transfer task, induced by large differences among domains.
346
+
347
+ # H ANALYSIS OF SHARED/PRIVATE SPACE EMBEDDING
348
+
349
+ In the experiments conducted, we showed that our approach is able to achieve better performance than the competing methods including the extended DSN with one private encoder (1p-DSN) which is the most similar method to ours.
350
+
351
+ ![](images/07d4618a501cd10a00bd625bd5df1054e718feb2cb44cd9581d0cca9092af8f0.jpg)
352
+ Figure 5: Feature visualization for embedding of digit datasets using t-SNE algorithm. The first and the second columns show the domains and classes, respectively, with color indicating domain and class membership. (a),(b) Original features. (c),(d) learned features for MTDA-ITA (triangle marker: private features, circle marker: shared features). Large clusters in the right column represent points from the shared space, while the smaller ones are from the private spaces. (e),(f) learned features for 1p-DSN.
353
+
354
+ Indeed, fig. 5 depicts the embedding of the MTDA-ITA learned private/shared features, those of 1p-DSN and the original features from different domains for Digit datasets (SVHN is the source).
355
+
356
+ Notice that both MTDA-ITA and 1p-DSN reduces the domain mismatch for the shared features (circle markers in fig. 5) and separate the shared features from private features. On the other hand, MTDA-ITA increases the domain separation for the private features (triangle markers, pure and well-separated domain clusters in fig. 5c) while 1p-DSN is unable to enforce the private representation of different domains to be different (fig. 5e) that may result in redundancy of different private spaces. This is partially due to the proposed multi-domain separation loss through the use of the domain classifier $D$ , which penalizes the domain mismatch for the shared features and rewards the mismatch for the private features, something the 1p-DSN fails to account for. Moreover, as supported by the quantitative results in tab. 1, the class label separation in
357
+
358
+ <table><tr><td>method</td><td>C08→C05</td><td>C08→C09</td><td>C08→C13</td><td>C08→C14</td><td>C09→C05</td><td>C09→C08</td><td>C09→C13</td><td>C09→C14</td></tr><tr><td>Source Only</td><td>33.70±0.33</td><td>50.10±0.28</td><td>50.80±0.32</td><td>40.13±0.26</td><td>33.32±0.44</td><td>48.24±0.32</td><td>49.24±0.30</td><td>36.19±0.27</td></tr><tr><td>1-NN</td><td>28.75</td><td>35.39</td><td>39.79</td><td>32.13</td><td>26.82</td><td>35.30</td><td>34.26</td><td>28.41</td></tr><tr><td>CORAL (Sun &amp; Saenko (2016))</td><td>35.89 ± 0.44</td><td>55.79±0.50</td><td>60.00 ±0.29</td><td>40.67 ± 0.48</td><td>35.89 ± 0.40</td><td>51.56±0.43</td><td>50.45 ± 0.41</td><td>40.67± 0.35</td></tr><tr><td>DANN (Ganin et al. (2016))</td><td>40.20±0.50</td><td>56.89 ± 0.39</td><td>55.83 ±0.40</td><td>43.25±0.41</td><td>50.63±0.38</td><td>58.40 ± 0.51</td><td>55.81 ± 0.53</td><td>48.90 ±0.43</td></tr><tr><td>ADDA(Tzeng et al. (2017))</td><td>37.40±0.68</td><td>58.40±0.73</td><td>60.40±0.83</td><td>42.10±0.48</td><td>29.40±0.70</td><td>53.30±0.49</td><td>45.30± 0.53</td><td>38.30±0.63</td></tr><tr><td>c-ADDA</td><td>41.60±0.64</td><td>39.65 ±0.70</td><td>50.00 ±0.52</td><td>46.25±0.52</td><td>45.01±0.63</td><td>52.14 ± 0.53</td><td>37.43 ± 0.60</td><td>43.26±0.58</td></tr><tr><td>DTN (Zhang et al. (2015))</td><td>44.13 ± 0.41</td><td>57.42 ± 0.42</td><td>55.89±0.48</td><td>45.76± 0.39</td><td>44.53± 0.49</td><td>57.34±0.35</td><td>52.43±0.38</td><td>51.55 ± 0.40</td></tr><tr><td>c-DTN</td><td>45.10 ±0.44</td><td>49.78±0.50</td><td>47.43 ±0.46</td><td>45.79 ±0.48</td><td>49.80±0.40</td><td>55.69 ± 0.35</td><td>50.10 ± 0.38</td><td>52.31 ±0.29</td></tr><tr><td>PixelDA (Bousmalis et al. (2017))</td><td>46.45 ± 0.45</td><td>44.33±0.38</td><td>44.87 ± 0.41</td><td>46.83±0.29</td><td>45.63±0.34</td><td>16.37 ± 0.27</td><td>45.43 ± 0.35</td><td>47.00± 0.49</td></tr><tr><td>UNIT (Liu et al. (2017))</td><td>43.88±0.18</td><td>43.99±0.23</td><td>44.47±0.19</td><td>44.47 ± 0.24</td><td>44.47 ± 0.17</td><td>43.95± 0.21</td><td>44.64±0.22</td><td>44.47 ±0.19</td></tr><tr><td>DSN (Bousmalis et al. (2016)) c-DSN</td><td>46.25± 0.53</td><td>47.50±0.60</td><td>62.15 ± 0.58</td><td>39.72± 0.55</td><td>45.85±0.48</td><td>56.65±0.50</td><td>56.5±0.38</td><td>42.87±0.43</td></tr><tr><td></td><td>45.82 ± 0.53</td><td>44.64± 0.42</td><td>45.60 ± 0.48</td><td>46.32±0.52</td><td>45.18 ± 0.47</td><td>45.52 ± 0.55</td><td>44.79 ± 0.53</td><td>47.37 ± 0.48</td></tr><tr><td>1p-DSN</td><td>44.12 ± 0.73</td><td>44.14 ± 0.20</td><td>45.00 ±0.38</td><td>45.62 ± 0.42</td><td>44.78 ±0.47</td><td>45.02 ±0.65</td><td>44.21 ± 0.48</td><td>46.97 ± 0.38</td></tr><tr><td>mp-DSN</td><td>42.19±0.46</td><td>44.70±0.53</td><td>42.47 ± 0.48</td><td>40.50±0.39</td><td>45.00±0.51</td><td>43.80±0.50</td><td>45.79±0.48</td><td>42.39 ±0.49</td></tr><tr><td>s-MTDA-ITA</td><td>44.77±0.19</td><td>45.61±0.18</td><td>60.00±0.27</td><td>46.70±0.28</td><td>49.06±0.24</td><td>55.33±0.22</td><td>59.90±0.30</td><td>50.64± 0.26</td></tr><tr><td>c-MTDA-ITA MTDA-ITA</td><td>44.35± 0.27</td><td>42.67 ± 0.24</td><td>58.90 ±0.26</td><td>44.32 ± 0.26</td><td>46.74 ±0.22</td><td>54.11 ± 0.21</td><td>56.89 ± 0.23</td><td>49.64 ± 0.19</td></tr><tr><td></td><td>46.30 ± 0.25</td><td>60.60 ± 0.18</td><td>60.50±0.19</td><td>50.40±0.20</td><td>55.59± 0.25</td><td>57.80±0.21</td><td>64.20 ±0.18</td><td>56.34 ± 0.20</td></tr></table>
359
+
360
+ Table 6: Classification results on Multi-PIE dataset. The best (red).
361
+
362
+ <table><tr><td>method</td><td>P→A</td><td>P→C</td><td>P→S</td><td>A→P</td><td>A→C</td><td>A→S</td></tr><tr><td>1-NN</td><td>15.28</td><td>18.16</td><td>25.60</td><td>22.70</td><td>19.75</td><td>22.70</td></tr><tr><td>ADDA(Tzeng et al. (2017))</td><td>24.35 ± 2.37</td><td>20.12 ± 2.50</td><td>22.45 ± 2.11</td><td>32.57 ± 2.70</td><td>17.68 ± 2.04</td><td>18.90 ± 2.48</td></tr><tr><td>DSN (Bousmalis et al. (2016))</td><td>28.42 ±2.12</td><td>21.14 ± 2.08</td><td>2.04 ± 1.90</td><td>29.54 ± 1.95</td><td>25.89 ± 1.88</td><td>24.69 ± 2.08</td></tr><tr><td>s-MTDA-ITA</td><td>28.02 ± 1.59</td><td>21.64±1.24</td><td>26.24 ± 1.60</td><td>31.06 ± 1.50</td><td>25.09±1.40</td><td>25.89±1.03</td></tr><tr><td>c-MTDA-ITA</td><td>25.35 ± 1.80</td><td>20.24 ± 1.39</td><td>23.64 ± 1.60</td><td>26.54 ± 1.33</td><td>20.30 ± 1.29</td><td>22.38 ± 1.45</td></tr><tr><td>MTDA-ITA</td><td>31.40 ±1.55</td><td>23.05 ±1.04</td><td>28.24 ±1.78</td><td>35.74 ± 1.50</td><td>27.00 ±1.25</td><td>28.90 ±1.60</td></tr></table>
363
+
364
+ Table 7: Classification results on PACS dataset classification. A:Art-painting, C:Cartoon, S:Sketch, P:Photo. The best (red).
365
+
366
+ the shared space for 1p-DSN, fig. 5f, is still evident but not as strong as in the MTDA-ITA, fig. 5d. This can be attributed to the lack of redundancy in the private space that helps MTDA-ITA to learn more disentangled shared features and usage of the target samples during training, something the 1p-DSN fails to account for.
367
+
368
+ ![](images/f7a643eee7751386eefa467035b5bfae216f67ec9df6317cb9b21d6dd8832516.jpg)
369
+ Figure 6: Feature visualization for embedding of digit datasets using t-SNE algorithm. The first and the second columns show the domains and classes, respectively, with color indicating domain and class membership. (a),(b) Original features. (c),(d) learned features for MTDA-ITA (triangle marker: private features, circle marker: shared features). Large clusters21 in the right column represent points from the shared space, while the smaller ones are from the private spaces. The remaining figures depict the learned features without: (e),(f) the classifier entropy loss, MTDA-woE; (g),(h) the private encoder, MTDA-woP; (i),(j) the reconstruction loss/decoder, MTDA-woR; and (k),(l) the multi-domain separation loss, MTDA-woD.
parse/train/BJxLH2AcYX/BJxLH2AcYX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJxLH2AcYX/BJxLH2AcYX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJxLH2AcYX/BJxLH2AcYX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkSmc8qll/BkSmc8qll.md ADDED
@@ -0,0 +1,451 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DYNAMIC NEURAL TURING MACHINE WITH CONTINUOUS AND DISCRETE ADDRESSING SCHEMES
2
+
3
+ Caglar Gulcehre∗, Sarath Chandar∗, Kyunghyun Cho†, Yoshua Bengio∗
4
+
5
+ ∗ University of Montreal, name.lastname@umontreal.ca † New York University, name.lastname@nyu.edu
6
+
7
+ # ABSTRACT
8
+
9
+ In this paper, we extend neural Turing machine (NTM) into a dynamic neural Turing machine (D-NTM) by introducing a trainable memory addressing scheme. This addressing scheme maintains for each memory cell two separate vectors, content and address vectors. This allows the D-NTM to learn a wide variety of location-based addressing strategies including both linear and nonlinear ones. We implement the D-NTM with both continuous, differentiable and discrete, non-differentiable read/write mechanisms. We investigate the mechanisms and effects for learning to read and write to a memory through experiments on Facebook bAbI tasks using both a feedforward and GRU-controller. The D-NTM is evaluated on a set of Facebook bAbI tasks and shown to outperform NTM and LSTM baselines. We also provide further experimental results on sequential MNIST, associative recall and copy tasks.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Designing general-purpose learning algorithms is one of the long-standing goals of artificial intelligence. Despite the success of deep learning in this area (see, e.g., (Goodfellow et al., 2016)) there are still a set of complex tasks that are not well addressed by conventional neural networks. Those tasks often require a neural network to be equipped with an explicit, external memory in which a larger, potentially unbounded, set of facts need to be stored. They include, but are not limited to, episodic question-answering (Weston et al., 2015b; Hermann et al., 2015; Hill et al., 2015), compact algorithms (Zaremba et al., 2015), dialogue (Serban et al., 2016; Vinyals & Le, 2015) and video caption generation (Yao et al., 2015).
14
+
15
+ Recently two promising approaches based on neural networks to this type of tasks have been proposed. Memory networks (Weston et al., 2015b) explicitly store all the facts, or information, available for each episode in an external memory (as continuous vectors) and use the attention-based mechanism to index them when returning an output. On the other hand, neural Turing machines (NTM, (Graves et al., 2014)) read each fact in an episode and decides whether to read, write the fact or do both to the external, differentiable memory.
16
+
17
+ A crucial difference between these two models is that the memory network does not have a mechanism to modify the content of the external memory, while the NTM does. In practice, this leads to easier learning in the memory network, which in turn resulted in it being used more in real tasks (Bordes et al., 2015; Dodge et al., 2015). On the contrary, the NTM has mainly been tested on a series of small-scale, carefully-crafted tasks such as copy and associative recall. The NTM, however is more expressive, precisely because it can store and modify the internal state of the network as it processes an episode.
18
+
19
+ The original NTM supports two modes of addressing (which can be used simultaneously.) They are content-based and location-based addressing. We notice that the location-based strategy is based on linear addressing. The distance between each pair of consecutive memory cells is fixed to a constant. We address this limitation, in this paper, by introducing a learnable address vector for each memory cell of the NTM with least recently used memory addressing mechanism, and we call this variant a dynamic neural Turing machine (D-NTM).
20
+
21
+ We evaluate the proposed D-NTM on the full set of Facebook bAbI task (Weston et al., 2015b) using either continuous, differentiable attention or discrete, non-differentiable attention (Zaremba & Sutskever, 2015) as an addressing strategy. Our experiments reveal that it is possible to use the discrete, non-differentiable attention mechanism, and in fact, the D-NTM with the discrete attention and GRU controller outperforms the one with the continuous attention. After we published our paper on arXiv, a new extension of NTM called DNC (Graves et al., 2016) has also provided results on bAbI task as well.
22
+
23
+ We also provide results on sequential-MNIST and algorithmic tasks proposed by (Graves et al., 2014) in order to investigate the ability of our model when dealing with long-term dependencies.
24
+
25
+ # Our Contributions
26
+
27
+ 1. We propose a generalization of Neural Turing Machine called a dynamic neural Turing machine (D-NTM) which employs a learnable and location-based addressing.
28
+ 2. We demonstrate the application of neural Turing machines on a more natural and less toyish task: episodic question-answering besides the toy tasks. We provide detailed analysis of our model on this task.
29
+ 3. We propose to use the discrete attention mechanism and empirically show that, it can outperform the continuous attention based addressing for episodic QA task.
30
+ 4. We propose a curriculum strategy for our model with the feedforward controller and discrete attention that improves our results significantly.
31
+
32
+ # 2 DYNAMIC NEURAL TURING MACHINE
33
+
34
+ The proposed dynamic neural Turing machine (D-NTM) extends the neural Turing machine (NTM, (Graves et al., 2014)) which has a modular design. The NTM consists of two main modules, a controller and, a memory. The controller, which is often implemented as a recurrent neural network, issues a command to the memory so as to read, write to and erase a subset of memory cells. Although the memory was originally envisioned as an integrated module, it is not necessary, and the memory may be an external, black box (Zaremba & Sutskever, 2015).
35
+
36
+ # 2.1 CONTROLLER
37
+
38
+ At each time step $t$ , the controller (1) receives an input value $\mathbf { x } ^ { t }$ , (2) addresses and reads the memory and creates the content vector $\phi ^ { t }$ , (3) erases/writes a portion of the memory, (4) updates its own hidden state $\mathbf { h } _ { t }$ , and (5) outputs a value $\mathbf { y } ^ { t }$ (if needed.) In this paper, we use both a gated recurrent unit (GRU, (Cho et al., 2014)) and a feedforward-controller to implement the controller such that for a GRU controller
39
+
40
+ $$
41
+ \mathbf { h } ^ { t } = \mathbf { G } \mathbf { R } \mathbf { U } ( \mathbf { x } ^ { t } , \mathbf { h } ^ { t - 1 } , \boldsymbol { \phi } ^ { t } )
42
+ $$
43
+
44
+ or for a feedforward-controller
45
+
46
+ $$
47
+ \mathbf { h } ^ { t } = \sigma ( \mathbf { x } ^ { t } , \phi ^ { t } ) .
48
+ $$
49
+
50
+ # 2.2 MEMORY
51
+
52
+ We use a rectangular matrix $\mathbf { M } \in \mathbb { R } ^ { N \times ( d _ { c } + d _ { a } ) }$ to denote $N$ memory cells. Unlike the original NTM, we partition each memory cell vector into two parts:
53
+
54
+ $$
55
+ \mathbf { M } = \left[ \mathbf { A } ; \mathbf { C } \right] .
56
+ $$
57
+
58
+ The first part $\mathbf { A } \in \mathbb { R } ^ { N \times d _ { a } }$ is a learnable address matrix, and the second $\mathbf { C } \in \mathbb { R } ^ { N \times d _ { c } }$ a content matrix. In other words, each memory cell $\mathbf { m } _ { i }$ is now
59
+
60
+ $$
61
+ \mathbf { m } _ { i } = \left[ \mathbf { a } _ { i } ; \mathbf { c } _ { i } \right] .
62
+ $$
63
+
64
+ The address part ${ \bf a } _ { i }$ is considered a model parameter that is updated during training. During inference, the address part is not overwritten by the controller and remains constant. On the other hand, the content part $\mathbf { c } _ { i }$ is both read and written by the controller both during training and inference. At the beginning of each episode, the content part of the memory is refreshed to be an all-zero matrix, $\mathbf { C } ^ { 0 } = \mathbf { 0 }$ . This introduction of the learnable address portion for each memory cell allows the model to learn sophisticated location-based addressing strategies. A similar addressing mechanism is also explored in (Reed & de Freitas, 2015) in the context of learning program traces.
65
+
66
+ # 2.3 MEMORY ADDRESSING
67
+
68
+ Memory addressing in the D-NTM is equivalent to computing an $N$ -dimensional address vector. The DNTM computes three such vectors for respectively reading $\mathbf { w } ^ { t } \in \mathbb { R } ^ { N }$ , erasing $\mathbf { e } ^ { t } \in \mathbb { R } ^ { d _ { c } }$ and writing $\mathbf { u } ^ { t } \in$ $\mathbb { R } ^ { N }$ . Specifically for writing, the controller further computes a candidate memory content vector $\bar { \mathbf { c } } ^ { t } \in$
69
+
70
+ ![](images/e74c8fe56f94d776f121ec40a19574de3775bfc3a8c2b406e74e9fa626fad5ca.jpg)
71
+ Figure 1: A graphical illustration of the proposed dynamic neural Turing machine with the recurrent-controller. The controller receives the fact as a continuous vector encoded by a recurrent neural network, computes the read and write weights for addressing the memory. If the D-NTM automatically detects that a query has been received, it returns an answer and terminates.
72
+
73
+ $\mathbb { R } ^ { d _ { c } }$ based on its current hidden state of the controller $\mathbf { h } ^ { t } \in \mathbb { R } ^ { d _ { h } }$ and the input of the controller scaled with a scalar gate $\alpha ^ { t }$ which is a function of the hidden state and the input of the controller as well, see Eqn 4.
74
+
75
+ $$
76
+ \begin{array} { l } { { \boldsymbol { \alpha } } ^ { t } = \mathbf { f } ( \mathbf { h } ^ { t } , \mathbf { x } ^ { t } ) , } \\ { { \bar { \mathbf { c } } } ^ { t } = \mathrm { R e L U } ( \mathbf { W } _ { m } \mathbf { h } ^ { t } + { \boldsymbol { \alpha } } ^ { t } \mathbf { W } _ { x } \mathbf { x } ^ { t } + \mathbf { b _ { m } } ) . } \end{array}
77
+ $$
78
+
79
+ Reading With the read vector $\mathbf { w } ^ { t }$ , the content vector read from the memory $\phi ^ { t } \in \mathbb { R } ^ { d _ { a } + d _ { c } }$ is retrieved by
80
+
81
+ $$
82
+ \begin{array} { r } { \phi ^ { t } = ( \mathbf { w } ^ { t } ) ^ { \top } \mathbf { M } ^ { t - 1 } , } \end{array}
83
+ $$
84
+
85
+ where $\mathbf { w } ^ { t }$ is a row vector.
86
+
87
+ Erasing and Writing Given the erase, write and candidate memory content vectors $( \mathbf { e } ^ { t } , u _ { j } ^ { t }$ , and $\bar { \mathbf { c } } ^ { t }$ respectively) generated by a simple MLP conditioned on the hidden state of the controller $\mathbf { h } ^ { t }$ , the memory matrix is updated by,
88
+
89
+ $$
90
+ \mathbf { C } ^ { t } [ j ] = ( 1 - \mathbf { e } ^ { t } u _ { j } ^ { t } ) \odot \mathbf { C } ^ { t - 1 } [ j ] + u _ { j } ^ { t } \bar { \mathbf { c } } ^ { t } .
91
+ $$
92
+
93
+ where the subscript $j$ in $\mathbf { C } ^ { t } [ j ]$ denotes the $j$ -th row of the content part $\mathbf { C } ^ { t }$ of the memory matrix $\mathbf { M } ^ { t }$ .
94
+
95
+ No Operation (NOP) As found in (Joulin & Mikolov, 2015), an additional NOP action might be beneficial for the controller not to access the memory once in a while. We model this situation by designating one memory cell as a NOP cell. Reading or writing from this memory cell is ignored.
96
+
97
+ # 2.4 LEARNING
98
+
99
+ Once the proposed D-NTM is executed, it returns the output distribution $p ( \mathbf { y } | \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { T } )$ . As a result, we define a cost function as the negative log-likelihood:
100
+
101
+ $$
102
+ C ( \boldsymbol { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } - \log p ( \mathbf { y } ^ { n } | \mathbf { x } _ { 1 } ^ { n } , \ldots , \mathbf { x } _ { T } ^ { n } ) ,
103
+ $$
104
+
105
+ where $\theta$ is a set of all the parameters. As the proposed D-NTM, just like the original NTM, is fully end-to-end differentiable, we can compute the gradient of this cost function by using backpropagation and learn the parameters of the model with a gradient-based optimization algorithm, such as stochastic gradient descent, to train it end-to-end.
106
+
107
+ # 3 ADDRESSING MECHANISM
108
+
109
+ # 3.1 ADDRESS VECTORS
110
+
111
+ Each of the address vectors (both read and write) is computed in the same way. The way they are computed are very similar to the content based addressing in (Graves et al., 2014). First, the controller computes a key vector:
112
+
113
+ $$
114
+ \mathbf { k } ^ { t } = \mathbf { W } _ { k } ^ { \top } \mathbf { h } ^ { t } + \mathbf { b } _ { k } ,
115
+ $$
116
+
117
+ where $\mathbf { W } _ { k } \ \in \ \mathbb { R } ^ { N \times ( d _ { a } + d _ { c } ) }$ and $\mathbf { b } _ { k } \ \in \ \mathbb { R } ^ { d _ { a } + d _ { c } }$ if the read head is being computed, otherwise $\mathbf { W } _ { k } \in \mathbb { R } ^ { N \times d _ { c } }$ and $\mathbf { b } _ { k } \in \mathbb { R } ^ { d _ { c } }$ if the write head weights are being computed. They can be the parameters for a specific head (either read or write.) Also, the sharpening factor $\beta _ { t } \in \mathbb { R } ^ { \ge 1 }$ is computed as:
118
+
119
+ $$
120
+ \begin{array} { c } { { \mathrm { s o f t p l u s } ( x ) = \log ( \exp ( x ) + 1 ) } } \\ { { \beta _ { t } = \mathrm { s o f t p l u s } ( \mathbf { u } _ { \beta } ^ { \top } \mathbf { h } ^ { t } + b _ { \beta } ) + 1 . } } \end{array}
121
+ $$
122
+
123
+ $\mathbf { u } _ { \beta }$ and $b _ { \beta }$ are the parameters of the sharpening $\beta _ { t }$ .
124
+
125
+ The address vector is then computed by,
126
+
127
+ $$
128
+ \begin{array} { c } { { z _ { i } ^ { t } = \beta ^ { t } S \left( \mathbf { k } ^ { t } , \mathbf { m } _ { i } ^ { t } \right) } } \\ { { w _ { i } ^ { t } = \displaystyle \frac { \exp ( z _ { i } ^ { t } ) } { \sum _ { j } \exp ( z _ { j } ^ { t } ) } , } } \end{array}
129
+ $$
130
+
131
+ where the similarity function $S \in \mathbb { R } ^ { \geq 0 }$ is defined as
132
+
133
+ $$
134
+ S ( \mathbf { x } , \mathbf { y } ) = \frac { \mathbf { x } \cdot \mathbf { y } } { ( | | \mathbf { x } | | | \mathbf { y } | | + \epsilon ) } .
135
+ $$
136
+
137
+ # 3.2 MULTI-STEP ADDRESSING
138
+
139
+ At each time-step, controller may require more than one-step for accessing to the memory. The original NTM addresses this by implementing multiple sets of read, erase and write heads. In this paper, we explore an option of allowing each head to operate more than once at each time step, similar to the multi-hop mechanism from the end-to-end memory network (Sukhbaatar et al., 2015).
140
+
141
+ # 3.3 DYNAMIC LEAST RECENTLY USED ADDRESSING
142
+
143
+ We introduce a memory addressing schema that can learn to put more emphasis on the least recently used (LRU) memory locations. As observed in (Santoro et al., 2016; Rae et al., 2016), we find it easier to learn the write operations with the use of LRU addressing.
144
+
145
+ To learn a LRU based addressing, first we compute the exponentially moving averages of the logits $\left( \mathbf { z } _ { t } \right)$ as $\mathbf { v } _ { t }$ , $\mathbf { v } _ { t } ~ = ~ 0 . 1 \mathbf { v } _ { t - 1 } + 0 . 9 \mathbf { z } _ { t }$ . We rescale the accumulated $\mathbf { v } _ { t }$ with $\gamma _ { t }$ , such that the controller adjusts the influence of how much previously written memory locations should effect the attention weights of a particular time-step. Next, we subtract $\mathbf { v } _ { t }$ from $\mathbf { z } _ { t }$ in order to reduce the weights of previously read or written memory locations. $\gamma _ { t }$ is a shallow MLP with a scalar output and it is conditioned on the hidden state of the controller. $\gamma _ { t }$ is parametrized with the parameters $\mathbf { u } _ { \gamma }$ and ${ \bf { b } } _ { \gamma }$ ,
146
+
147
+ $$
148
+ \begin{array} { r } { \gamma _ { t } = \operatorname { s i g m o i d } ( \mathbf { u } _ { \gamma } ^ { \top } \mathbf { h } _ { t } + \mathbf { b } _ { \gamma } ) , } \\ { \mathbf { w } _ { t } = \operatorname { s o f t m a x } \bigl ( \mathbf { z } _ { t } - \gamma _ { t } \mathbf { v } _ { t - 1 } \bigr ) . } \end{array}
149
+ $$
150
+
151
+ This addressing method increases the weights of the least recently used rows of the memory. The magnitude of the influence of the least-recently used memory locations is being learned and adjusted with $\gamma _ { t }$ . Our LRU addressing is dynamic due to the model’s ability to switch between pure content-based addressing and LRU. During the training, we do not backpropagate through $\mathbf { v } _ { t }$ . Due to the dynamic nature of this addressing mechanism, it can be used for both read and write operations. If needed, the model will automatically learn to disable LRU while reading from the memory.
152
+
153
+ # 4 GENERATING DISCRETE ADDRESS VECTORS
154
+
155
+ In this section, we describe the discrete attention based addressing strategy.
156
+
157
+ Discrete Addressing Let us use w to denote an address vector (either read, write or erase) at time $t$ . By definition in Eq. (10), every element in this address vector is positive and sums up to one. In other words, we can treat this vector as the probabilities of a categorical distribution $\mathcal C ( \mathbf w )$ with $\dim ( \mathbf { w } )$ choices:
158
+
159
+ $$
160
+ p ( j ) = w _ { j } ,
161
+ $$
162
+
163
+ where $w _ { j }$ is the $j$ -th element of w. We can readily sample from this categorical distribution and form an one-hot vector w˜ such that
164
+
165
+ $$
166
+ \tilde { w } _ { k } = I ( k = j ) ,
167
+ $$
168
+
169
+ where $j \sim \mathcal { C } ( \mathbf { w } )$ , and $I$ is an indicator function.
170
+
171
+ Training We use this sampling-based strategy for all the heads during training. This clearly makes the use of backpropagation infeasible to compute the gradient, as the sampling procedure is not differentiable. Thus, we use REINFORCE (Williams, 1992) together with the three variance reduction techniques–global baseline, input-dependent baseline and variance normalization– suggested in (Mnih & Gregor, 2014).
172
+
173
+ Let us define $R ( { \bf x } ) = \log p ( { \bf y } | { \bf x } _ { 1 } , \ldots , { \bf x } _ { T } )$ as a reward. We first center and re-scale the reward by
174
+
175
+ $$
176
+ \tilde { R } ( { \bf x } ) = \frac { R ( { \bf x } ) - b } { \sqrt { \sigma ^ { 2 } + \epsilon } } ,
177
+ $$
178
+
179
+ where $b$ and $\sigma$ is running average and standard deviation of $R$ . We can further center it for each input $\mathbf { x }$ separately, i.e.,
180
+
181
+ $$
182
+ \tilde { R } ( \mathbf { x } ) \gets \tilde { R } ( \mathbf { x } ) - b ( \mathbf { x } ) ,
183
+ $$
184
+
185
+ where $b ( \mathbf x )$ is computed by a baseline network which takes as input $\mathbf { x }$ and predicts its estimated reward. The baseline network is trained to minimize the Huber loss (Huber, 1964) between the true reward $\tilde { R } ( { \bf x } ) ^ { * }$ and the predicted reward $b ( \mathbf { x } )$ . We use the Huber loss, which is defined by
186
+
187
+ $$
188
+ H _ { \delta } ( x ) = { \left\{ \begin{array} { l l } { x ^ { 2 } } & { { \mathrm { f o r ~ } } | x | \leq \delta , } \\ { \delta ( 2 | x | - \delta ) , } & { { \mathrm { o t h e r w i s e } } , } \end{array} \right. }
189
+ $$
190
+
191
+ due to its robustness. As a further measure to reduce the variance, we regularize the negative entropy of all those category distributions to facilitate a better exploration during training (Xu et al., 2015).
192
+
193
+ Then, the cost function for each training example is approximated as
194
+
195
+ $$
196
+ \begin{array} { r l } & { C ^ { n } ( \boldsymbol { \theta } ) = - \log p ( \mathbf { y } | \mathbf { x } _ { 1 : T } , \tilde { w } _ { 1 : J } , \tilde { u } _ { 1 : J } , \tilde { e } _ { 1 : J } ) } \\ & { \qquad - \displaystyle \sum _ { j = 1 } ^ { J } \tilde { R } ( \mathbf { x } ^ { n } ) ( \log p ( \tilde { w } _ { j } | \mathbf { x } _ { 1 : T } ) + \log p ( \tilde { u } _ { j } | \mathbf { x } _ { 1 : T } ) + \log p ( \tilde { e } _ { j } | \mathbf { x } _ { 1 : T } ) ) } \\ & { \qquad - \lambda _ { H } \displaystyle \sum _ { j = 1 } ^ { J } ( \mathcal { H } ( w _ { j } | \mathbf { x } _ { 1 : T } ) + \mathcal { H } ( u _ { j } | \mathbf { x } _ { 1 : T } ) + \mathcal { H } ( e _ { j } | \mathbf { x } _ { 1 : T } ) ) . } \end{array}
197
+ $$
198
+
199
+ where $J$ is the number of addressing steps, $\lambda _ { H }$ is the entropy regularization coefficient, and $\mathcal { H }$ denotes the entropy.
200
+
201
+ Inference Once training is over, we switch to a deterministic strategy. We simply choose an element of w with the largest value to be the index of the target memory cell, such that
202
+
203
+ $$
204
+ \tilde { w } _ { k } = \mathbf { I } ( k = \operatorname { a r g m a x } ( \mathbf { w } ) ) .
205
+ $$
206
+
207
+ Curriculum Learning for the Discrete Attention Training discrete attention with feed-forward controller and REINFORCE is challenging. We propose to use a curriculum strategy for training with the discrete attention in order to tackle this problem. For each minibatch, we sample $\pi$ from a binomial distribution with the probability $p ^ { t }$ , $\pi ^ { t } \sim \mathrm { B i n } ( p ^ { t } )$ . The model will either use the discrete or the continuous-attention based on the $\pi ^ { t }$ . We start the training procedure with $p ^ { 0 } = 1$ and during the training $p ^ { t }$ is annealed to 0 by setting $\begin{array} { r } { p ^ { t } = \frac { p ^ { 0 } } { \sqrt { 1 + t } } } \end{array}$ .
208
+
209
+ We can rewrite the weights $\mathbf { w } _ { t }$ as in Equation 14, where it is expressed as the combination of continuous attention weights $\hat { \mathbf { w } } ^ { t }$ and discrete attention weights $\tilde { \mathbf { w } } ^ { t }$ with $\mathit { \Pi } _ { \pi ^ { t } }$ being a binary variable that chooses to use one of them,
210
+
211
+ $$
212
+ \mathbf { w } ^ { t } \pi ^ { t } \bar { \mathbf { w } } ^ { t } + ( 1 - \pi ^ { t } ) \tilde { \mathbf { w } } ^ { t } .
213
+ $$
214
+
215
+ By using this curriculum learning strategy, at the beginning of the training, the model learns to use the memory mainly with the continuous attention. As we anneal the $p ^ { t }$ , the model will rely more on the discrete attention.
216
+
217
+ # 5 REGULARIZING DYNAMIC NEURAL TURING MACHINES
218
+
219
+ When the controller of D-NTM is a powerful recurrent neural network, it is important to regularize training of the D-NTM so as to avoid suboptimal solutions in which the D-NTM ignores the memory and works as a simple recurrent neural network.
220
+
221
+ Read-Write Consistency Regularizer One such suboptimal solution we have observed in our preliminary experiments with the proposed D-NTM is that the D-NTM uses the address part A of the memory matrix simply as an additional weight matrix, rather than as a means to accessing the content part C. We found that this pathological case can be effectively avoided by encouraging the read head to point to a memory cell which has also been pointed by the write head. This can be implemented as the following regularization term:
222
+
223
+ $$
224
+ R _ { \mathrm { r w } } ( \mathbf { w } , \mathbf { u } ) = \lambda \sum _ { t ^ { \prime } = 1 } ^ { T } | | 1 - ( \frac { 1 } { t ^ { \prime } } \sum _ { t = 1 } ^ { t ^ { \prime } } \mathbf { u } _ { t } ) ^ { \top } \mathbf { w } _ { t ^ { \prime } } | | _ { 2 } ^ { 2 }
225
+ $$
226
+
227
+ In the equations above, $\mathbf { u } _ { t }$ is the write and $\mathbf { w } _ { t }$ is the read weights.
228
+
229
+ Next Input Prediction as Regularization Temporal structure is a strong signal that should be exploited by the controller based on a recurrent neural network. We exploit this structure by letting the controller predict the input in the future. We maximize the predictability of the next input by the controller during training. This is equivalent to minimizing the following regularizer:
230
+
231
+ $$
232
+ R _ { \mathrm { p r e d } } ( \mathbf { W } ) = - \log p ( \mathbf { f } _ { t + 1 } | \mathbf { f } _ { t } , \mathbf { w } _ { t } , \mathbf { u } _ { t } , \mathbf { M } _ { t } ; \mathbf { W } ) )
233
+ $$
234
+
235
+ where $f _ { t }$ is the current input and $f _ { t + 1 }$ is the input at next timestep. We found this regularizer to be effective in our preliminary experiments and use it for bAbI tasks.
236
+
237
+ # 6 RELATED WORK
238
+
239
+ A recurrent neural network (RNN), which is used as a controller in the proposed D-NTM, has an implicit memory in the form of recurring hidden states. Even with this implicit memory, a vanilla RNN is however known to have difficulties in storing information for long time-spans (Bengio et al., 1994; Hochreiter, 1991). Long short-term memory (LSTM, (Hochreiter & Schmidhuber, 1997)) and gated recurrent units (GRU, (Cho et al., 2014)) have been found to address this issue. However all these models based solely on RNNs have been found to be limited when they are used to solve, e.g., algorithmic tasks and episodic question-answering.
240
+
241
+ In addition to the finite random access memory of the neural Turing machine, based on which the D-NTM is designed, other data structures have been proposed as external memory for neural networks. In (Sun et al., 1997; Grefenstette et al., 2015; Joulin & Mikolov, 2015), a continuous, differentiable stack was proposed. In (Zaremba et al., 2015; Zaremba & Sutskever, 2015), grid and tape storages are used. These approaches differ from the NTM in that their memory is unbounded and can grow indefinitely. On the other hand, they are often not randomly accessible.
242
+
243
+ Memory networks (Weston et al., 2015b) form another family of neural networks with external memory. In this class of neural networks, information is stored explicitly as it is (in the form of its continuous representation) in the memory, without being erased or modified during an episode. Memory networks and their variants have been applied to various tasks successfully (Sukhbaatar et al., 2015; Bordes et al., 2015; Dodge et al., 2015; Xiong et al., 2016). Miller et al. (2016) have also independently proposed the idea of having separate key and value vectors for memory networks.
244
+
245
+ Another related family of models is the attention-based neural networks. Neural networks with continuous or discrete attention over an input have shown promising results on a variety of challenging tasks, including machine translation (Bahdanau et al., 2015; Luong et al., 2015), speech recognition (Chorowski et al., 2015), machine reading comprehension (Hermann et al., 2015) and image caption generation (Xu et al., 2015).
246
+
247
+ The latter two, the memory network and attention-based networks, are however clearly distinguishable from the D-NTM by the fact that they do not modify the content of the memory.
248
+
249
+ # 7 EXPERIMENTS
250
+
251
+ We provide experimental results to demonstrate the abilities of our model, first on Facebook bAbI task (Weston et al., 2015a). We give detailed analysis and experimental results on this task. We also compare different variations of NTM on bAbI tasks. We have performed experiments on sequential permuted MNIST (Le et al., 2015) and on toy tasks to compare other published models on these tasks with a recurrent controller. The details of our experiments are provided in the supplementary material.
252
+
253
+ # 7.1 EPISODIC QUESTION-ANSWERING: BABI TASKS
254
+
255
+ In this section, we evaluate the proposed D-NTM on the recently proposed episodic question-answering task called Facebook bAbI. We use the dataset with 10k training examples per sub-task provided by Facebook.1 For each episode, the D-NTM reads a sequence of factual sentences followed by a question, all of which are given as natural language sentences. The D-NTM is expected to store and retrieve relevant information in the memory in order to answer the question based on the presented facts. Exact implementation details and hyper-parameter settings are provided in the appendix.
256
+
257
+ # 7.1.1 GOALS
258
+
259
+ The goal of this experiment is three-fold. First, we present for the first time the performance of a memory-based network that can both read and write dynamically on the Facebook bAbI tasks2. We aim to understand whether a model that has to learn to write an incoming fact to the memory, rather than storing it as it is, is able to work well, and to do so, we compare both the original NTM and proposed D-NTM against an LSTM-RNN.
260
+
261
+ Second, we investigate the effect of having to learn how to write. The fact that the NTM needs to learn to write likely has adverse effect on the overall performance, when compared to, for instance, end-to-end memory networks (MemN2N, (Sukhbaatar et al., 2015)) and dynamic memory network $\mathrm { ( D M N + }$ , (Xiong et al., 2016)) both of which simply store the incoming facts as they are. We quantify this effect in this experiment. Lastly, we show the effect of the proposed learnable addressing scheme.
262
+
263
+ We further explore the effect of using a feedforward controller instead of the GRU controller. In addition to the explicit memory, the GRU controller can use its own internal hidden state as the memory. On the other hand, the feedforward controller must solely rely on the explicit memory, as it is the only memory available.
264
+
265
+ # 7.1.2 RESULTS AND ANALYSIS
266
+
267
+ In Table 1, we first observe that the NTMs are indeed capable of solving this type of episodic question-answering better than the vanilla LSTM-RNN. Although the availability of explicit memory in the NTM has already suggested this result, we note that this is the first time neural Turing machines have been used in this specific task.
268
+
269
+ All the variants of NTM with the GRU controller outperform the vanilla LSTM-RNN. However, not all of them perform equally well. First, it is clear that the proposed dynamic NTM (D-NTM) using the GRU controller outperforms the original NTM with the GRU controller (NTM, CBA only NTM vs. continuous D-NTM, Discrete D-NTM). As discussed earlier, the learnable addressing scheme of the D-NTM allows the controller to access the memory slots by location in a potentially nonlinear way. We expect it to help with tasks that have non-trivial access patterns, and as anticipated, we see a large gain with the D-NTM over the original NTM in the tasks of, for instance, 12 - Conjunction and 17 - Positional Reasoning.
270
+
271
+ Among the recurrent variants of the proposed D-NTM, we notice significant improvements by using discrete addressing over using continuous addressing. We conjecture that this is due to certain types of tasks that require precise/sharp retrieval of a stored fact, in which case continuous addressing is in disadvantage over discrete addressing. This is evident from the observation that the D-NTM with discrete addressing significantly outperforms that with continuous addressing in the tasks of 8 -
272
+
273
+ <table><tr><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">DMN+</td><td rowspan="2">L</td><td rowspan="2">1-step CBA</td><td rowspan="2">1-step Soft D-NTM</td><td rowspan="2">1-step Discrete D-NTM</td><td rowspan="2">3-steps LBA* NTM</td><td rowspan="2">3-steps CBA NTM</td><td rowspan="2">3-steps Soft D-NTM</td><td rowspan="2">3-steps Discrete D-NTM</td></tr><tr><td></td></tr><tr><td>Task 1</td><td>LSTM 0.00</td><td>MemN2N 0.00</td><td>0.00</td><td>NTM 16.30</td><td>NTM 16.88</td><td>5.41</td><td>6.66</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>2</td><td>81.90</td><td>0.30</td><td>0.30</td><td>57.08</td><td>55.70</td><td>58.54</td><td>56.04</td><td>61.67</td><td>59.38</td><td>46.66</td><td>62.29</td></tr><tr><td>3</td><td>83.10</td><td>2.10</td><td>1.10</td><td>74.16</td><td>55.00</td><td>74.58</td><td>72.08</td><td>83.54</td><td>65.21</td><td>47.08</td><td>41.45</td></tr><tr><td>4</td><td>0.20</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>5</td><td>1.20</td><td>0.80</td><td>0.50</td><td>1.46</td><td>20.41</td><td>1.66</td><td>1.04</td><td>0.83</td><td>1.46</td><td>1.25</td><td>1.45</td></tr><tr><td>6</td><td>51.80</td><td>0.10</td><td>0.00</td><td>23.33</td><td>21.04</td><td>40.20</td><td>44.79</td><td>48.13</td><td>54.80</td><td>20.62</td><td>11.04</td></tr><tr><td>7</td><td>24.90</td><td>2.00</td><td>2.40</td><td>21.67</td><td>21.67</td><td>19.16</td><td>19.58</td><td>7.92</td><td>37.70</td><td>7.29</td><td>5.62</td></tr><tr><td>8</td><td>34.10</td><td>0.90</td><td>0.00</td><td>25.76</td><td>21.05</td><td>12.58</td><td>18.46</td><td>25.38</td><td>8.82</td><td>11.02</td><td>0.74</td></tr><tr><td>9</td><td>20.20</td><td>0.30</td><td>0.00</td><td>24.79</td><td>24.17</td><td>36.66</td><td>34.37</td><td>37.80</td><td>0.00</td><td>39.37</td><td>32.50</td></tr><tr><td>10</td><td>30.10</td><td>0.00</td><td>0.00</td><td>41.46</td><td>33.13</td><td>52.29</td><td>50.83</td><td>56.25</td><td>23.75</td><td>20.00</td><td>20.83</td></tr><tr><td>11</td><td>10.30</td><td>0.10</td><td>0.00</td><td>18.96</td><td>31.88</td><td>31.45</td><td>4.16</td><td>3.96</td><td>0.28</td><td>30.62</td><td>16.87</td></tr><tr><td>12</td><td>23.40</td><td>0.00</td><td>0.00</td><td>25.83</td><td>30.00</td><td>7.70</td><td>6.66</td><td>28.75</td><td>23.75</td><td>5.41</td><td>4.58</td></tr><tr><td>13</td><td>6.10</td><td>0.00</td><td>0.00</td><td>6.67</td><td>5.63</td><td>5.62</td><td>2.29</td><td>5.83</td><td>83.13</td><td>7.91</td><td>5.00</td></tr><tr><td>14</td><td>81.00</td><td>0.10</td><td>0.20</td><td>58.54</td><td>59.17</td><td>60.00</td><td>63.75</td><td>61.88</td><td>57.71</td><td>58.12</td><td>60.20</td></tr><tr><td>15</td><td>78.70</td><td>0.00</td><td>0.00</td><td>36.46</td><td>42.30</td><td>36.87</td><td>39.27</td><td>35.62</td><td>21.88</td><td>36.04</td><td>40.26</td></tr><tr><td>16</td><td>51.90</td><td>51.80</td><td>45.30</td><td>71.15</td><td>71.15</td><td>49.16</td><td>51.35</td><td>46.15</td><td>50.00</td><td>46.04</td><td>45.41</td></tr><tr><td>17</td><td>50.10</td><td>18.60</td><td>4.20</td><td>43.75</td><td>43.75</td><td>17.91</td><td>16.04</td><td>43.75</td><td>56.25</td><td>21.25</td><td>9.16</td></tr><tr><td>18</td><td>6.80</td><td>5.30</td><td>2.10</td><td>3.96</td><td>47.50</td><td>3.95</td><td>3.54</td><td>47.50</td><td>47.50</td><td>6.87</td><td>1.66</td></tr><tr><td>19</td><td>90.30</td><td>2.30</td><td>0.00</td><td>75.89</td><td>71.51</td><td>73.74</td><td>64.63</td><td>61.56</td><td>63.65</td><td>75.88</td><td>76.66</td></tr><tr><td>20</td><td>2.10</td><td>0.00</td><td>0.00</td><td>1.25</td><td>0.00</td><td>2.70</td><td>3.12</td><td>0.40</td><td>0.00</td><td>3.33</td><td>0.00</td></tr><tr><td>Avg.Err.</td><td>36.41</td><td>4.24</td><td>2.81</td><td>31.42</td><td>33.60</td><td>29.51</td><td>27.93</td><td>32.85</td><td>32.76</td><td>24.24</td><td>21.79</td></tr></table>
274
+
275
+ Table 1: Test error rates $( \% )$ on the 20 bAbI QA tasks for models using 10k training examples with the GRU and feedforward controller. FF stands for the experiments that are conducted with feedforward controller. Let us, note that $\mathrm { L B A ^ { * } }$ refers to NTM that uses both LBA and CBA. In this table, we compare multi-step vs single-step addressing, original NTM with location based+content based addressing vs only content based addressing, and discrete vs continuous addressing on bAbI.
276
+
277
+ Lists/Sets and 11 - Basic Coreference. Furthermore, this is in line with an earlier observation in (Xu et al., 2015), where discrete addressing was found to generalize better in the task of image caption generation.
278
+
279
+ In Table 2, we also observe that the D-NTM with the feedforward controller and discrete attention performs worse than LSTM and D-NTM with continuous-attention. However, when the proposed curriculum strategy from Sec. 4 is used, the average test error drops from 68.30 to 37.79.
280
+
281
+ We empirically found training of the feedforward controller more difficult than that of the recurrent controller. We train our feedforward controller based models four times longer (in terms of the number of updates) than the recurrent controller based ones in order to ensure that they are converged for most of the tasks. On the other hand, the models trained with the GRU controller overfit on bAbI tasks very quickly. For example, on tasks 3 and 16 the feedforward controller based model underfits (i.e., high training loss) at the end of the training, whereas with the same number of units the model with the GRU controller can overfit on those tasks after 3,000 updates only.
282
+
283
+ When our results are compared to the variants of the memory network Weston et al. (2015b) (MemN2N and $\mathrm { D M N + }$ ), we notice a significant performance gap. We attribute this gap to the difficulty in learning to manipulate and store a complex input.
284
+
285
+ Table 2: Test error rates $( \% )$ on the 20 bAbI QA tasks for models using 10k training examples with feedforward controller.
286
+
287
+ <table><tr><td>Task</td><td>FF Soft D-NTM</td><td>FF Discrete D-NTM</td><td>FF Discrete* D-NTM</td></tr><tr><td>1</td><td>4.38</td><td>81.67</td><td>14.79</td></tr><tr><td>2</td><td>27.5</td><td>76.67</td><td>76.67</td></tr><tr><td>3</td><td>71.25</td><td>79.38</td><td>70.83</td></tr><tr><td>4</td><td>0.00</td><td>78.65</td><td>44.06</td></tr><tr><td>5</td><td>1.67</td><td>83.13</td><td>17.71</td></tr><tr><td>6</td><td>1.46</td><td>48.76</td><td>48.13</td></tr><tr><td>7</td><td>6.04</td><td>54.79</td><td>23.54</td></tr><tr><td>8</td><td>1.70</td><td>69.75</td><td>35.62</td></tr><tr><td>9</td><td>0.63</td><td>39.17</td><td>14.38</td></tr><tr><td>10</td><td>19.80</td><td>56.25</td><td>56.25</td></tr><tr><td>11</td><td>0.00</td><td>78.96</td><td>39.58</td></tr><tr><td>12</td><td>6.25</td><td>82.5</td><td>32.08</td></tr><tr><td>13</td><td>7.5</td><td>75.0</td><td>18.54</td></tr><tr><td>14</td><td>17.5</td><td>78.75</td><td>24.79</td></tr><tr><td>15</td><td>0.0</td><td>71.42</td><td>39.73</td></tr><tr><td>16</td><td>49.65</td><td>71.46</td><td>71.15</td></tr><tr><td>17</td><td>1.25</td><td>43.75</td><td>43.75</td></tr><tr><td>18</td><td>0.24</td><td>48.13</td><td>2.92</td></tr><tr><td>19</td><td>39.47</td><td>71.46</td><td>71.56</td></tr><tr><td>20</td><td>0.0</td><td>76.56</td><td>9.79</td></tr><tr><td>Avg.Err.</td><td>12.81</td><td>68.30</td><td>37.79</td></tr></table>
288
+
289
+ We also provide further experiments investigating different extensions on D-NTM in the appendix.
290
+
291
+ # 7.2 SEQUENTIAL pMNIST
292
+
293
+ In sequential MNIST task, the pixels of the MNIST digits are provided to the model in scan line order, left to right and top to bottom (Le et al., 2015). At the end of sequence of pixels, the model predicts the label of the digit in the sequence of pixels. We experiment D-NTM on the variation of sequential MNIST where the order of the pixels is randomly shuffled, we call this task as permuted MNIST $( p \mathrm { M N I S T } )$ . An important contribution of this task to our paper, in particular, is to measure the model’s ability to perform well when dealing with long-term dependencies. We report our results in Table $3 ^ { 3 }$ , we observe improvements over other models that we compare against. In Table 3, ”discrete addressing with MAB” refers to D-NTM model using REINFORCE with baseline computed from moving averages of the reward. Discrete addressing with IB refers to D-NTM using REINFORCE with input-based baseline.
294
+
295
+ # 7.3 NTM TOY TASKS
296
+
297
+ We explore the possibility of using D-NTM to solve algorithmic tasks such as copy and associative recall tasks. We train our model on the same lengths of sequences that is experimented in (Graves et al., 2014). We report our results in Table 4. We find out that D-NTM using continuous-attention can successfully learn the ”Copy” and ”Associative Recall” tasks.
298
+
299
+ In Table 4, we train our model on sequences of the same length as the experiments in (Graves et al., 2014) and test the model on the sequences of the maximum length seen during the training. We consider model to be successful on copy or associative recall if its validation cost (binary cross-entropy) is lower than 0.02 over the sequences of maximum length seen during the training. We set the threshold to 0.02 to determine whether a model is successful on a task. Because empirically we observe that the models have higher validation costs perform badly in terms of generalization over the longer sequences. ”D-NTM discrete” model in this table is trained with REINFORCE using moving averages to estimate the baseline.
300
+
301
+ Table 3: Sequential $p { \mathrm { M N I S T } } .$ .
302
+
303
+ <table><tr><td></td><td>Test Acc</td></tr><tr><td>D-NTMdiscrete MAB</td><td>89.6</td></tr><tr><td>D-NTMdiscrete IB</td><td>92.3</td></tr><tr><td>Soft D-NTM</td><td>93.4</td></tr><tr><td>NTM</td><td>90.9</td></tr><tr><td>I-RNN (Le et al., 2015)</td><td>82.0</td></tr><tr><td>Zoneout (Krueger et al.,2016)</td><td>93.1</td></tr><tr><td>LSTM (Krueger et al., 2016)</td><td>89.8</td></tr><tr><td>Unitary-RNN (Arjovsky et al., 2015)</td><td>91.4</td></tr><tr><td>Recurrent Dropout (Krueger et al., 2016)</td><td>92.5</td></tr></table>
304
+
305
+ Table 4: NTM Toy Tasks.
306
+
307
+ <table><tr><td></td><td>Copy Tasks</td><td>Associative Recall</td></tr><tr><td>Soft D-NTM</td><td>Success</td><td>Success</td></tr><tr><td>D-NTMdiscrete</td><td>Success</td><td>Failure</td></tr><tr><td>NTM</td><td>Success</td><td>Success</td></tr></table>
308
+
309
+ # 8 CONCLUSION AND FUTURE WORK
310
+
311
+ In this paper we extend neural Turing machines (NTM) by introducing a learnable addressing scheme which allows the NTM to be capable of performing highly nonlinear location-based addressing. This extension, to which we refer by dynamic NTM (D-NTM), is extensively tested with various configurations, including different addressing mechanisms (continuous vs. discrete) and different number of addressing steps, on the Facebook bAbI tasks. This is the first time an NTM-type model was tested on this task, and we observe that the NTM, especially the proposed D-NTM, performs better than vanilla LSTM-RNN. Furthermore, the experiments revealed that the discrete, discrete addressing works better than the continuous addressing with the GRU controller, and our analysis reveals that this is the case when the task requires precise retrieval of memory content.
312
+
313
+ Our experiments show that the NTM-based models can be weaker than other variants of memory networks which do not learn but have an explicit mechanism of storing incoming facts as they are. We conjecture that this is due to the difficulty in learning how to write, manipulate and delete the content of memory. Despite this difficulty, we find the NTM-based approach, such as the proposed D-NTM, to be a better, future-proof approach, because it can scale to a much longer horizon (where it becomes impossible to explicitly store all the experiences.)
314
+
315
+ On $p \mathrm { M N I S T }$ task, we show that our model can outperform other similar type of approaches proposed to deal with the long-term dependencies. On copy and associative recall tasks, we show that our model can solve the algorithmic problems that are proposed to solve with NTM type of models.
316
+
317
+ The success of both the learnable address and the discrete addressing scheme suggests two future research directions. First, we should try both of these schemes in a wider array of memory-based models, as they are not specific to the neural Turing machines. Second, the proposed D-NTM needs to be evaluated on a diverse set of applications, such as text summarization (Rush et al., 2015), visual questionanswering (Antol et al., 2015) and machine translation, in order to make a more concrete conclusion.
318
+
319
+ # REFERENCES
320
+
321
+ Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. VQA: visual question answering. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pp. 2425–2433, 2015.
322
+ Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. arXiv preprint arXiv:1511.06464, 2015.
323
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings Of The International Conference on Representation Learning (ICLR 2015), 2015.
324
+ Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994.
325
+ Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston. Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075, 2015.
326
+ Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
327
+ Jan Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-based models for speech recognition. arXiv preprint arXiv:1506.07503, 2015.
328
+ Tim Cooijmans, Nicolas Ballas, Cesar Laurent, and Aaron Courville. Recurrent batch normalization. ´ arXiv preprint arXiv:1603.09025, 2016.
329
+ Jesse Dodge, Andreea Gane, Xiang Zhang, Antoine Bordes, Sumit Chopra, Alexander Miller, Arthur Szlam, and Jason Weston. Evaluating prerequisite qualities for learning end-to-end dialog systems. CoRR, abs/1511.06931, 2015.
330
+ Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep learning. Book in preparation for MIT Press, 2016. URL http://www.deeplearningbook.org.
331
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
332
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, et al. ´ Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626): 471–476, 2016.
333
+ Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pp. 1819–1827, 2015.
334
+ Caglar Gulcehre, Marcin Moczulski, Misha Denil, and Yoshua Bengio. Noisy activation functions. arXiv preprint arXiv:1603.00391, 2016.
335
+ Karl Moritz Hermann, Toma´s Ko ˇ cisk ˇ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa \` Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. arXiv preprint arXiv:1506.03340, 2015.
336
+
337
+ Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. arXiv preprint arXiv:1511.02301, 2015.
338
+
339
+ Sepp Hochreiter. Untersuchungen zu dynamischen neuronalen netzen. Diploma, Technische Universitat¨ Munchen ¨ , pp. 91, 1991.
340
+
341
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
342
+
343
+ Peter J. Huber. Robust estimation of a location parameter. Ann. Math. Statist., 35(1):73–101, 03 1964.
344
+
345
+ Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems, pp. 190–198, 2015.
346
+
347
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.
348
+
349
+ David Krueger, Tegan Maharaj, Janos Kram ´ ar, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary ´ Ke, Anirudh Goyal, Yoshua Bengio, Hugo Larochelle, Aaron Courville, et al. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016.
350
+
351
+ Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015.
352
+
353
+ Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attention-based neural machine translation. In Proceedings Of The Conference on Empirical Methods for Natural Language Processing (EMNLP 2015), 2015.
354
+
355
+ Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. CoRR, abs/1606.03126, 2016. URL http://arxiv.org/abs/1606.03126.
356
+
357
+ Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. arXiv preprint arXiv:1402.0030, 2014.
358
+
359
+ Jack W Rae, Jonathan J Hunt, Tim Harley, Ivo Danihelka, Andrew Senior, Greg Wayne, Alex Graves, and Timothy P Lillicrap. Scaling memory-augmented neural networks with sparse reads and writes. In Advances in NIPS. 2016.
360
+
361
+ Scott Reed and Nando de Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015.
362
+
363
+ Alexander M. Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, EMNLP 2015, Lisbon, Portugal, September 17-21, 2015, pp. 379–389, 2015.
364
+
365
+ Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. One-shot learning with memory-augmented neural networks. arXiv preprint arXiv:1605.06065, 2016.
366
+
367
+ Iulian V Serban, Alessandro Sordoni, Yoshua Bengio, Aaron Courville, and Joelle Pineau. Building end-to-end dialogue systems using generative hierarchical neural network models. In Proceedings of the 30th AAAI Conference on Artificial Intelligence (AAAI-16), 2016.
368
+
369
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. arXiv preprint arXiv:1503.08895, 2015.
370
+
371
+ Guo-Zheng Sun, C. Lee Giles, and Hsing-Hen Chen. The neural network pushdown automaton: Architecture, dynamics and training. In Adaptive Processing of Sequences and Data Structures, International Summer School on Neural Networks, pp. 296–345, 1997.
372
+
373
+ Oriol Vinyals and Quoc Le. A neural conversational model. arXiv preprint arXiv:1506.05869, 2015.
374
+
375
+ Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question answering: a set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698, 2015a.
376
+
377
+ Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings Of The International Conference on Representation Learning (ICLR 2015), 2015b. In Press.
378
+
379
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992.
380
+ Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. CoRR, abs/1603.01417, 2016.
381
+ Kelvin Xu, Jimmy Ba, Ryan Kiros, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings Of The International Conference on Representation Learning (ICLR 2015), 2015.
382
+ Li Yao, Atousa Torabi, Kyunghyun Cho, Nicolas Ballas, Christopher Pal, Hugo Larochelle, and Aaron Courville. Describing videos by exploiting temporal structure. In Computer Vision (ICCV), 2015 IEEE International Conference on. IEEE, 2015.
383
+ Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. CoRR, abs/1505.00521, 2015.
384
+ Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. arXiv preprint arXiv:1511.07275, 2015.
385
+
386
+ # A EXPERIMENTAL DETAILS
387
+
388
+ A.1 MODEL AND TRAINING DETAILS FOR BABI
389
+
390
+ We use the same hyperparameters for all the tasks for a given model.
391
+
392
+ # A.1.1 FACT REPRESENTATION
393
+
394
+ We use a recurrent neural network with GRU units to encode a variable-length fact into a fixed-size vector representation. This allows the D-NTM to exploit the word ordering in each fact, unlike when facts are encoded as bag-of-words vectors.
395
+
396
+ # A.1.2 CONTROLLER
397
+
398
+ We experiment with both a recurrent and feedforward neural network as the controller that generates the read and write weights. The controller has 180 units. We train our feed-forward controller using noisy-tanh activation function (Gulcehre et al., 2016) since we were experiencing training difficulties with sigmoid and tanh activation functions. We use both single-step and three-steps addressing with our GRU controller.
399
+
400
+ # A.1.3 MEMORY
401
+
402
+ The memory contains 120 memory cells. Each memory cell consists of a 16-dimensional address part and 28-dimensional content part.
403
+
404
+ # A.1.4 TRAINING DETAILS
405
+
406
+ We set aside a random $1 0 \%$ of the training examples as a validation set for each sub-task and use it for early-stopping and hyperparameter search. We train one D-NTM for each sub-task, using Adam (Kingma & Ba, 2014) with its learning rate set to 0.003 and 0.007 respectively for GRU and Feedforward controller. The size of each minibatch is 160, and each minibatch is constructed uniform-randomly from the training set.
407
+
408
+ # A.2 MODEL AND TRAINING DETAILS FOR SEQUENTIAL MNIST
409
+
410
+ On sequential MNIST task we try to keep the capacity of our model to be close to our baselines. We use 100 GRU units in the controller and each content vector of size 8 and with address vectors of size 8. We use a learning rate of $1 e - 3$ and trained the model with adam optimizer. We did not use the read and write consistency regularization in any of our models.
411
+
412
+ # A.3 MODEL AND TRAINING DETAILS FOR TOY TASKS
413
+
414
+ On both copy and associative recall tasks, we try to keep the capacity of our model to be close to our baselines. We use 100 GRU units in the controller and each content vector of has a size of 8 and using address vector of size 8. We use a learning rate of $1 e - 3$ and trained the model with adam optimizer. We did not use the read and write consistency regularization in any of our models. For the model with the discrete attention we use REINFORCE with baseline computed using moving averages.
415
+
416
+ # B VISUALIZATION OF DISCRETE ATTENTION
417
+
418
+ We visualize the attention of D-NTM with GRU controller with discrete attention in Figure 2. From this example, we can see that D-NTM has learned to find the correct supporting fact even without any supervision for the particular story in the visualization.
419
+
420
+ # C LEARNING CURVES FOR THE RECURRENT CONTROLLER
421
+
422
+ In Figure 3, we compare the learning curves of the continuous and discrete attention D-NTM model with recurrent controller on Task 1. Surprisingly, the discrete attention D-NTM converges faster than the continuous-attention model. The main difficulty of learning continuous-attention is due to the fact that learning to write with continuous-attention can be challenging.
423
+
424
+ ![](images/13f6be6816a8ab4ad76006098fb07e79c29ffd5f83dd209f067809e9e7421ce0.jpg)
425
+ Figure 2: An example view of the discrete attention over the memory slots for both read (left) and write heads(right). $\mathbf { X }$ -axis the denotes the memory locations that are being accessed and y-axis corresponds to the content in the particular memory location. In this figure, we visualize the discrete-attention model with 3-reading steps and on task-20. It is easy to see that the NTM with discrete-attention accesses to the relevant part of the memory. We only visualize the last-step of the 3-steps writing. Because with discrete attention usually the model just reads the empty slots of the memory.
426
+
427
+ ![](images/750ba06aa86f2fcf7b1b8477065761e178ba6d5f4dd1a6aa03704d44c0632dbd.jpg)
428
+ Figure 3: A visualization for the learning curves of continuous and discrete D-NTM models trained on Task 1 using 3 steps. In most tasks, we observe that the discrete attention model with GRU controller does converge faster than the continuous-attention model.
429
+
430
+ # D A COMPARISON BETWEEN THE LEARNINGCURVES OF INPUT BASED BASELINE AND REGULAR BASELINE ON $p$ MNIST
431
+
432
+ In Figure 4, we show the learning curves of input-based-baseline (ibb) and regular REINFORCE with moving averages baseline (mab) on the $p \mathrm { M N I S T }$ task. We observe that input-based-baseline in general is much easier to optimize and converges faster as well. But it can quickly overfit to the task as well.
433
+
434
+ # E TRAINING WITH CONTINUOUS-ATTENTION AND TESTING WITH DISCRETE-ATTENTION
435
+
436
+ In Table 5, we provide results investigating the effects of using discrete attention model at the test-time for a model trained with feed-forward controller and continuous attention. Discrete∗ D-NTM model bootstraps the discrete attention with the continuous attention, using the curriculum method that we have introduced in Section ”Curriculum Learning for the Discrete Attention”. Discrete† D-NTM model is the continuous-attention model which uses discrete-attention at the test time. We observe that the Discrete† D-NTM model which is trained with continuous-attention outperforms Discrete D-NTM model.
437
+
438
+ ![](images/858347b800db4692b6c99c985fab4630eac6e5ffb7ee526a7c12130eaa865972.jpg)
439
+ Figure 4: We compare the learning curves of our D-NTM model using discrete attention on $p \mathrm { M N I S T }$ task with input-based baseline and regular REINFORCE baseline. The $\mathbf { X }$ -axis is the loss and y-axis is the number of epochs.
440
+
441
+ <table><tr><td rowspan=1 colspan=1>Task</td><td rowspan=1 colspan=1>continuousD-NTM</td><td rowspan=1 colspan=1>DiscreteD-NTM</td><td rowspan=1 colspan=1>Discrete*D-NTM</td><td rowspan=1 colspan=1>Discrete†D-NTM</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>4.38</td><td rowspan=1 colspan=1>81.67</td><td rowspan=1 colspan=1>14.79</td><td rowspan=6 colspan=1>72.2881.6778.9579.6968.5431.6749.17</td></tr><tr><td rowspan=2 colspan=1>234</td><td rowspan=1 colspan=1>27.571.25</td><td rowspan=2 colspan=1>76.6779.3878.65</td><td rowspan=2 colspan=1>76.6770.8344.06</td></tr><tr><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>1.67</td><td rowspan=1 colspan=1>83.13</td><td rowspan=1 colspan=1>17.71</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>1.46</td><td rowspan=1 colspan=1>48.76</td><td rowspan=1 colspan=1>48.13</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>6.04</td><td rowspan=1 colspan=1>54.79</td><td rowspan=1 colspan=1>23.54</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>1.70</td><td rowspan=1 colspan=1>69.75</td><td rowspan=1 colspan=1>35.62</td><td rowspan=13 colspan=1>79.3237.7125.6382.0874.3847.0877.0873.9653.0230.4211.4676.0513.96</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>0.63</td><td rowspan=1 colspan=1>39.17</td><td rowspan=1 colspan=1>14.38</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>19.80</td><td rowspan=1 colspan=1>56.25</td><td rowspan=1 colspan=1>56.25</td></tr><tr><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>78.96</td><td rowspan=1 colspan=1>39.58</td></tr><tr><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>6.25</td><td rowspan=1 colspan=1>82.5</td><td rowspan=1 colspan=1>32.08</td></tr><tr><td rowspan=1 colspan=1>13</td><td rowspan=1 colspan=1>7.5</td><td rowspan=1 colspan=1>75.0</td><td rowspan=1 colspan=1>18.54</td></tr><tr><td rowspan=1 colspan=1>14</td><td rowspan=1 colspan=1>17.5</td><td rowspan=1 colspan=1>78.75</td><td rowspan=1 colspan=1>24.79</td></tr><tr><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>71.42</td><td rowspan=1 colspan=1>39.73</td></tr><tr><td rowspan=1 colspan=1>16</td><td rowspan=1 colspan=1>49.65</td><td rowspan=1 colspan=1>71.46</td><td rowspan=1 colspan=1>71.15</td></tr><tr><td rowspan=1 colspan=1>17</td><td rowspan=1 colspan=1>1.25</td><td rowspan=1 colspan=1>43.75</td><td rowspan=1 colspan=1>43.75</td></tr><tr><td rowspan=1 colspan=1>18</td><td rowspan=1 colspan=1>0.24</td><td rowspan=1 colspan=1>48.13</td><td rowspan=3 colspan=1>2.9271.569.79</td></tr><tr><td rowspan=2 colspan=1>1920</td><td rowspan=1 colspan=1>39.47</td><td rowspan=2 colspan=1>71.4676.56</td></tr><tr><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>Avg</td><td rowspan=1 colspan=1>12.81</td><td rowspan=1 colspan=1>68.30</td><td rowspan=1 colspan=1>37.79</td><td rowspan=1 colspan=1>57.21</td></tr></table>
442
+
443
+ Table 5: Test error rates $( \% )$ on the 20 bAbI QA tasks for models using 10k training examples with the feedforward controller. Discrete∗ D-NTM model bootstraps the discrete attention with the continuous attention, using the curriculum method that we have introduced in Section 4. Discrete† D-NTM model is the continuous-attention model which uses discrete-attention at the test time.
444
+
445
+ # F D-NTM WITH BOW FACT REPRESENTATION
446
+
447
+ In Table 6, we provide results for D-NTM using BoW with positional encoding (PE) Sukhbaatar et al. (2015) as the representation of the input facts. The facts representations are provided as an input to the GRU controller. In agreement to our results with the GRU fact representation, with the BoW fact representation we observe improvements with multi-step of addressing over single-step and discrete addressing over continuous addressing.
448
+
449
+ Table 6: Test error rates $( \% )$ on the 20 bAbI QA tasks for models using 10k training examples with the GRU controller and representations of facts are obtained with $\mathrm { B o W }$ using positional encoding.
450
+
451
+ <table><tr><td rowspan=1 colspan=1>Task</td><td rowspan=1 colspan=1>SoftD-NTM(1-step)</td><td rowspan=1 colspan=1>DiscreteD-NTM(1-step)</td><td rowspan=1 colspan=1>SoftD-NTM(3-steps)</td><td rowspan=1 colspan=1>DiscreteD-NTM(3-steps)</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=3 colspan=1>234</td><td rowspan=1 colspan=1>61.04</td><td rowspan=1 colspan=1>59.37</td><td rowspan=1 colspan=1>56.87</td><td rowspan=1 colspan=1>55.62</td></tr><tr><td rowspan=1 colspan=1>55.62</td><td rowspan=1 colspan=1>57.5</td><td rowspan=1 colspan=1>62.5</td><td rowspan=1 colspan=1>57.5</td></tr><tr><td rowspan=1 colspan=1>27.29</td><td rowspan=1 colspan=1>24.89</td><td rowspan=1 colspan=1>26.45</td><td rowspan=1 colspan=1>27.08</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>13.55</td><td rowspan=1 colspan=1>12.08</td><td rowspan=1 colspan=1>15.83</td><td rowspan=1 colspan=1>14.78</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>13.54</td><td rowspan=1 colspan=1>14.37</td><td rowspan=1 colspan=1>21.87</td><td rowspan=1 colspan=1>13.33</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>8.54</td><td rowspan=1 colspan=1>6.25</td><td rowspan=1 colspan=1>8.75</td><td rowspan=1 colspan=1>14.58</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>1.69</td><td rowspan=1 colspan=1>1.36</td><td rowspan=1 colspan=1>3.01</td><td rowspan=1 colspan=1>3.02</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>17.7</td><td rowspan=1 colspan=1>16.66</td><td rowspan=1 colspan=1>37.70</td><td rowspan=1 colspan=1>17.08</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>26.04</td><td rowspan=1 colspan=1>27.08</td><td rowspan=1 colspan=1>26.87</td><td rowspan=3 colspan=1>23.952.294.16</td></tr><tr><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>20.41</td><td rowspan=1 colspan=1>3.95</td><td rowspan=1 colspan=1>2.5</td></tr><tr><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>0.41</td><td rowspan=1 colspan=1>0.83</td><td rowspan=1 colspan=1>0.20</td></tr><tr><td rowspan=1 colspan=1>13</td><td rowspan=1 colspan=1>3.12</td><td rowspan=1 colspan=1>1.04</td><td rowspan=1 colspan=1>4.79</td><td rowspan=1 colspan=1>5.83</td></tr><tr><td rowspan=1 colspan=1>14</td><td rowspan=1 colspan=1>62.08</td><td rowspan=1 colspan=1>58.33</td><td rowspan=1 colspan=1>61.25</td><td rowspan=2 colspan=1>60.620.05</td></tr><tr><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>31.66</td><td rowspan=1 colspan=1>26.25</td><td rowspan=1 colspan=1>0.62</td></tr><tr><td rowspan=1 colspan=1>16</td><td rowspan=1 colspan=1>54.47</td><td rowspan=1 colspan=1>48.54</td><td rowspan=1 colspan=1>48.95</td><td rowspan=3 colspan=1>48.9530.6236.04</td></tr><tr><td rowspan=1 colspan=1>17</td><td rowspan=1 colspan=1>43.75</td><td rowspan=1 colspan=1>31.87</td><td rowspan=1 colspan=1>43.75</td></tr><tr><td rowspan=1 colspan=1>18</td><td rowspan=1 colspan=1>33.75</td><td rowspan=1 colspan=1>39.37</td><td rowspan=1 colspan=1>36.66</td></tr><tr><td rowspan=2 colspan=1>1920</td><td rowspan=1 colspan=1>64.63</td><td rowspan=1 colspan=1>69.21</td><td rowspan=1 colspan=1>67.23</td><td rowspan=1 colspan=1>65.46</td></tr><tr><td rowspan=1 colspan=1>1.25</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>1.45</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Avg</td><td rowspan=1 colspan=1>27.02</td><td rowspan=1 colspan=1>24.98</td><td rowspan=1 colspan=1>26.36</td><td rowspan=1 colspan=1>24.05</td></tr></table>
parse/train/BkSmc8qll/BkSmc8qll_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkSmc8qll/BkSmc8qll_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkSmc8qll/BkSmc8qll_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkgYPREtPr/images/066175af26ade87ef420ad40c58c4452f8ece88a66ac76e90f88a068840ebd7c.jpg ADDED

Git LFS Details

  • SHA256: deaf4c8f7ea1f716f31f48097b45f85aa5f0b872c6a1c3b9172f05b7d0820b9e
  • Pointer size: 129 Bytes
  • Size of remote file: 9.61 kB
parse/train/BkgYPREtPr/images/12567491105ff78e397b8e0bafd6d07f4e0f00fdf6a056fc29a9afb37e1011a1.jpg ADDED

Git LFS Details

  • SHA256: a0f379cc0964e50fc37e7878ee12029649cfdca9cb5bd69c6e811681be80c181
  • Pointer size: 129 Bytes
  • Size of remote file: 3.93 kB
parse/train/BkgYPREtPr/images/1d5eaa40baa0a9adb3bdfa97f37c5c61623ab810e84ef379d09259709df9b0e4.jpg ADDED

Git LFS Details

  • SHA256: 57122517f705adf0582127a4c2f48633e735cd17c5b7d0d5d6fe9ee7841ab62c
  • Pointer size: 130 Bytes
  • Size of remote file: 36.5 kB
parse/train/BkgYPREtPr/images/211aef153d54559dad958c17bfa2018004136b7685bc3cf6e29b51a98cb37382.jpg ADDED

Git LFS Details

  • SHA256: 9aeda9217875a448d5a7daeb85cd1bfd8da21e6fd9ec3f11788ffad3b8261826
  • Pointer size: 129 Bytes
  • Size of remote file: 4.73 kB
parse/train/BkgYPREtPr/images/244d9eb4162103278e38ebcf9f6c3fae6a695441df234562e62e061229592d61.jpg ADDED

Git LFS Details

  • SHA256: 08d1f902fbf8a19054f84348de02bac58e9c39177ffd5fe8fefaa43b67e632ef
  • Pointer size: 130 Bytes
  • Size of remote file: 37.4 kB
parse/train/BkgYPREtPr/images/2d14d0e2b29edf052b00c5624104bc69a4b813db77c87f132af3872ca1e0df83.jpg ADDED

Git LFS Details

  • SHA256: c1dbf741e3c92eb0bd460760d3ba31cc7d87a54b137dd5aa4ad433dde676e275
  • Pointer size: 129 Bytes
  • Size of remote file: 9.57 kB
parse/train/BkgYPREtPr/images/3dbd1f5d1f519066236c9331cb51d2898b592d20f173cbb2c0c144ea285f871f.jpg ADDED

Git LFS Details

  • SHA256: c85a9a6523106894512a3ba245df0c1c5b2e8b267eab70480144ae2abb83e173
  • Pointer size: 130 Bytes
  • Size of remote file: 80.3 kB
parse/train/BkgYPREtPr/images/46b7091903c117c2e472c306df82dac9b9b1ce8fccf50a4d154ed5cd567dd5b0.jpg ADDED

Git LFS Details

  • SHA256: 03735df05f421223e9a61874a0fb51c06b149a0613db1ee8980850ca871f9d69
  • Pointer size: 129 Bytes
  • Size of remote file: 7.29 kB
parse/train/BkgYPREtPr/images/47e66723c86bd642f34030c67e03d7d775c0518e6669ae9c9d21c25fdc0fa895.jpg ADDED

Git LFS Details

  • SHA256: 402aadb800ef5df93c55ea084afa2195519a5d1d864e548e4b054fa79e3be6ae
  • Pointer size: 129 Bytes
  • Size of remote file: 5.26 kB
parse/train/BkgYPREtPr/images/58eef280515505d2d2a197f0815c1b5e745e524840a019420424404c881865fc.jpg ADDED

Git LFS Details

  • SHA256: a238a3004ec78c45454e06bc287781a5846f2fcddae1753f3533f80bff593aff
  • Pointer size: 130 Bytes
  • Size of remote file: 33.1 kB
parse/train/BkgYPREtPr/images/5c1db73dcb5b3fc5e3ef840365db4876bb70b01e700a39d154afa83332a0b7a8.jpg ADDED

Git LFS Details

  • SHA256: 87eebd251a584591bf0c6b112a874928aeed7bc94883464a5409b677685a662c
  • Pointer size: 129 Bytes
  • Size of remote file: 2.98 kB
parse/train/BkgYPREtPr/images/604b4047c708aa608825994b79054dc45866f894e762b2dea61dbb1e5d78f317.jpg ADDED

Git LFS Details

  • SHA256: 5d411adebd1402bce9b8002cc07f0280c80551e93dfa49b0e402d613c6863dd1
  • Pointer size: 129 Bytes
  • Size of remote file: 6.42 kB
parse/train/BkgYPREtPr/images/69faf379f7b86e81a31ac7cde5d9a6d26b838717c5ed192578fa109d9039f679.jpg ADDED

Git LFS Details

  • SHA256: a0478d8b0cad04d82780ab7ccd26be9a464f2c6e4e17647f771d1720cc775216
  • Pointer size: 130 Bytes
  • Size of remote file: 53.6 kB
parse/train/BkgYPREtPr/images/7674f229951c2cac24c31140a8aaae74f4f711ada20d1e1d4b4ad44b0f8351dd.jpg ADDED

Git LFS Details

  • SHA256: 5cc218e8378bf6e8b271644bd98e84dc917487f7447e07105f9b02b9a5f7b1e4
  • Pointer size: 130 Bytes
  • Size of remote file: 34.6 kB
parse/train/BkgYPREtPr/images/7d83acaa24389edd2280bbbaeec81b83c93918316c7c749434afef3ec1fa4a2e.jpg ADDED

Git LFS Details

  • SHA256: 752c2fe535d696e43477cf970b46418ba2ed6078ae9805a7e086bdea7f812fb4
  • Pointer size: 130 Bytes
  • Size of remote file: 33.5 kB
parse/train/BkgYPREtPr/images/82006e85767afeac6b04f57786af22c9d5f9daee7cfe8516652bd6de02ac6884.jpg ADDED

Git LFS Details

  • SHA256: b72b6d182c7998f1b1d79f3dffdcb8d9fef6eda027944894100838f6adee6646
  • Pointer size: 129 Bytes
  • Size of remote file: 3.08 kB
parse/train/BkgYPREtPr/images/83b5660a973c4dc436d8959be4cf1868b47997b26d7f9f5e681925629384c6b3.jpg ADDED

Git LFS Details

  • SHA256: f3d529ed82abac2d8080f38c4235e7912e4973a4883fa44bc4ca49aa458cfd6c
  • Pointer size: 130 Bytes
  • Size of remote file: 52.7 kB
parse/train/BkgYPREtPr/images/8d1b84cee8f0bdd381c9e9b27d07f884439873a400ac83b5561d904c15297b6a.jpg ADDED

Git LFS Details

  • SHA256: a506650c7aad27f5829b8445cbda014caa97a7f4be803db03d83a064418032d6
  • Pointer size: 129 Bytes
  • Size of remote file: 6.44 kB
parse/train/BkgYPREtPr/images/8e9d95c519606a34e4b13b0a5a508d99139fce19b7ab0939cd5f87effadb965c.jpg ADDED

Git LFS Details

  • SHA256: a9513fb35ccee689642abb857bb377c377a98b41bf91bdbcf5b6ec9e1813457b
  • Pointer size: 130 Bytes
  • Size of remote file: 17.3 kB
parse/train/BkgYPREtPr/images/928b160a39136b7a95f56e26b6408e07ac879442583ef9c027670d3a898e4e6e.jpg ADDED

Git LFS Details

  • SHA256: 19a31fa90d202f0068b8e7803a9105ab6cff827a9d4882115370f514314fef17
  • Pointer size: 129 Bytes
  • Size of remote file: 4.49 kB
parse/train/BkgYPREtPr/images/9a21ffa9e2d59c98ed0251c75ddf083c188ef56ae61e6a4c1d5a34cc6c2f612a.jpg ADDED

Git LFS Details

  • SHA256: b6635d9f5e141d633a879db494b6c6955d7b783a1e9232c63d7a83ff797a5410
  • Pointer size: 130 Bytes
  • Size of remote file: 34.9 kB
parse/train/BkgYPREtPr/images/a692b4e7c3b0e871013011cf7c192888522d08c6ef52db13d5aace12288d8481.jpg ADDED

Git LFS Details

  • SHA256: 990cdf11f790d5d4f706ec6f067e56228ab6a99355e5737d09b533fe47db5a0a
  • Pointer size: 130 Bytes
  • Size of remote file: 20.1 kB
parse/train/BkgYPREtPr/images/b984b2d7fc940f0c081de21685e85cab62c13266e79dfd784038cb20f8d48b4d.jpg ADDED

Git LFS Details

  • SHA256: 3974978cc5b4c6cea30eb0272d94f48e4a8719ded8ca429a1e30bae825951335
  • Pointer size: 130 Bytes
  • Size of remote file: 33.9 kB
parse/train/BkgYPREtPr/images/ba13579af38b65d9adb43b36d245df8956ec780539b558ba49a9813db37afa1a.jpg ADDED

Git LFS Details

  • SHA256: b5c038833bd1352e1f08395a32fbf652690d0cb2d267ee48a83c8ec4c99f80e2
  • Pointer size: 130 Bytes
  • Size of remote file: 35 kB
parse/train/BkgYPREtPr/images/bb84020d14394637248edf3dde128a9af425810b173e863d12de5f7badcf873f.jpg ADDED

Git LFS Details

  • SHA256: d79c95778a3695230caf4b393bed6cc1e0ddeee19ab9cf3c6af8cf82a7d84801
  • Pointer size: 130 Bytes
  • Size of remote file: 35.8 kB
parse/train/BkgYPREtPr/images/c70f8eea76b7d41e606bd8ff096251202e2055959db8d56f7de1010669a612ae.jpg ADDED

Git LFS Details

  • SHA256: 9d4b2438754a7db6554cb7a5717e63ad7a460ec01e7e28b453762efa3e73ce41
  • Pointer size: 129 Bytes
  • Size of remote file: 3.98 kB
parse/train/BkgYPREtPr/images/d01575285c4fe0dbbb50cf80c42081c9b34cbce99ee011dfeae65ad2b7853cac.jpg ADDED

Git LFS Details

  • SHA256: 8a449b9967348d643aae150712162025664262e0bb0f4f9eea94610120281734
  • Pointer size: 130 Bytes
  • Size of remote file: 35.7 kB
parse/train/BkgYPREtPr/images/d79ed8533c2414feaafacaffc61ee1cf39bf13c3bc22d69b657dfa347093f1b7.jpg ADDED

Git LFS Details

  • SHA256: 02e037d995b12ccb2bad1676449f05ce2c1d4964f0f2ba92456ade82f5d7bb0f
  • Pointer size: 130 Bytes
  • Size of remote file: 36.6 kB
parse/train/BkgYPREtPr/images/d8edef04ebcaf8356a642dab32e6e9738edbcd86e2f6c04891aa9dd60b00e959.jpg ADDED

Git LFS Details

  • SHA256: d6435c69e336721fa772ddfcb0d561d558878952f08f71138a8b7b51426456f3
  • Pointer size: 130 Bytes
  • Size of remote file: 53.7 kB
parse/train/BkgYPREtPr/images/d97e59307a592699aa87a2c136a20f8f58f31165ceb40016c1a9bfa840d010cb.jpg ADDED

Git LFS Details

  • SHA256: 779b00ed4a5dd97ea376a03412919c286664691f40ed89ad77d4a3cd1eefd9a2
  • Pointer size: 130 Bytes
  • Size of remote file: 63.5 kB
parse/train/BkgYPREtPr/images/da0653d940a2d7564549b2253a7aafae4fd8d9cbaa3f2890e6ccf4c2cc261742.jpg ADDED

Git LFS Details

  • SHA256: 61c87a8431aa0b6f4de77e073d61083fede731e28962e96e95996df593f23088
  • Pointer size: 129 Bytes
  • Size of remote file: 3.56 kB
parse/train/BkgYPREtPr/images/e8c24983c3fed7cf6a51524359b7491dbc3fe35a3d656cc0408f581fb320a6a0.jpg ADDED

Git LFS Details

  • SHA256: e3b92a5d3518539bfafe09344bc8ac574182e2e80bd17ae9f4018a1ef7aec7fb
  • Pointer size: 130 Bytes
  • Size of remote file: 37.8 kB
parse/train/BkgYPREtPr/images/eee0d8f6c04f4bfdbfb00b4d5eeb875bdcd1f04d436115517315983e6d9cad88.jpg ADDED

Git LFS Details

  • SHA256: 954d96d88c211cef832c5472825b3af4bdce1a6de90c5d09a9f0dc02f5eb65aa
  • Pointer size: 130 Bytes
  • Size of remote file: 56.2 kB
parse/train/BkgYPREtPr/images/f39b053fb4377ba51e492d655adf677dbfc95921a2904d29437cf470b644fd76.jpg ADDED

Git LFS Details

  • SHA256: d311fa55baad7acd2e1d3de7b04380cf42e2cbc9bbc700665c5a60001659543a
  • Pointer size: 130 Bytes
  • Size of remote file: 50.2 kB