C OMPOSITIONAL L ANGUAGES E MERGE IN A N EURAL I TERATED L EARNING M ODEL
A BSTRACT
The principle of compositionality, which enables natural language to represent complex concepts via a structured combination of simpler ones allows us to convey an open-ended set of messages using a limited vocabulary.
If compositionality is indeed a natural property of language, we may expect it to appear in communication protocols that are created by neural agents in language games.
In this paper we propose an effective neural iterated learning (NIL) algorithm that, when applied to interacting neural agents facilitates the emergence of a more structured type of language.
Indeed, these languages provide learning speed advantages to neural agents during training, which can be incrementally ampliﬁed via NIL.
We provide a probabilistic model of NIL and an explanation of why the advantage of compositional language exist.
Our experiments conﬁrm our analysis and also demonstrate that the emerged languages largely improve the generalizing power of the neural agent communication
I NTRODUCTION
Natural language understanding (NLU), which is exempliﬁed by challenging problems such as machine reading comprehension, question answering and machine translation, plays a crucial role in artiﬁcial intelligence systems.
So far, most of the existing methods focus on building statistical associations between textual inputs and semantic representations, e.g. using ﬁrst-order logic (Manning et al., 1999) or other types of representations such as abstract meaning representation (Banarescu et al., 2013).
Recently, grounded language learning has gradually attracted attention in various domains, inspired by the hypothesis that early language learning was focused on problemsolving (Kirby & Hurford, 2002).
While related to NLU, it focuses on the pragmatics (Clark, 1996) of learning natural language, as it implies learning language from scratch, grounded in experience.
This research is often practiced through the development of neural agents which are made to communicate with each other to accomplish speciﬁc tasks (for example, playing a game).
During this process, the agents build mappings between the concepts they wish to communicate about and the symbols used to represent them.
These mappings are usually referred to as ‘emergent language’.
So far, an array of recent work (Havrylov & Titov, 2017; Mordatch & Abbeel, 2018; Kottur et al., 2017; Foerster et al., 2016) has shown that in many game settings, the neural agents can use their emergent language to exchange useful coordinating information.
While the best way to design games to favour language emergence is still open to debate, there is a consensus on the fact that we should gear these emergent languages towards sharing similarities with natural language.
Among the properties of natural language, compositionality is considered to be critical, because it enables representation of complex concepts through the combinination of several simple ones.
While work on incorporating compositionality into emergent languages is still in its early stage, several experiments have already demonstrated that by properly choosing the maximum message length and vocabulary size, the agents can be brought together to develop a compositional language that shares similarities with natural language (Li & Bowling, 2019; Lazaridou et al., 2018; Cogswell et al., 2019).
In a different body of language research literature, evolutionary linguists have already studied the origins of compositionality for decades (Kirby & Hurford, 2002; Kirby et al., 2014; 2015).
They proposed a cultural evolutionary account of the origins of compositionality and designed a framework called iterated learning to simulate the language evolution process, based on the idea that the simulated language must be learned by new speakers at each generation, while also being used for communication.
Their experiments show that highly compositional languages may indeed emerge through iterated learning.
However, the models they introduced were mainly studied by means of experiments with human participants, in which the compositional languages is favored by the participants because human brain favors structure.
Hence, directly applying this framework to ground language learning is not straightforward: we should ﬁrst verify the existence of the preference of compositional language at the neural agent, and then design an effective training procedure for the neural agent to amplify such an advantage.
In this project, we analyze whether and how the learning speed advantage of the highly compositional languages exists in the context of communication between neural agents playing a game.
Then we propose a three-phase neural iterated learning algorithm (NIL) and a probabilistic explanation of it.
The experimental results demonstrate that our algorithm can signiﬁcantly enhance the topological similarity (Brighton & Kirby, 2006) between the emergent language and the original meaning space in a simple referential game (Lewis, 1969).
Such highly compositional languages also generalize better, because they perform well on a held-out validation set.
We highlight our contribution as:
(cid:15)
We discover the learning speed advantages of languages with high topological similarity for neural agents communicating in order to play a
referential
game.
(cid:15)
We propose the NIL based on those advantages, which is quite robust compared to most of the related works.
(cid:15)
We propose a probabilistic framework to explain the mechanisms of NIL.
B ACKGROUND 2. R EFERENTIAL G AME
We analyze a typical and straightforward object selection game, in which a speaking agent (Alice, or speaker) and a listening agent (Bob, or listener) must cooperate to accomplish a task.
In each round of the game, we show Alice a target object x selected from an object space X and let her send a discrete-sequence message m to Bob.
We then show Bob c different objects ( x must be one of them) and use c 1 ; :::; c c 2 X to represent these candidates.
Bob must use the message received from
Alice to select the object that Alice refers among the c candidates.
If Bob’s selection (cid:22) c is correct, both Alice and Bob are rewarded.
The objects are shufﬂed and candidates are randomly selected in each round to avoid the agents recognizing the objects using their order of presentation.
In our game, each object in X has N a attributes (color and shape are often used in the literature), and each attribute has N v possible values.
To represent objects, similarly to the settings chosen in (Kottur et al., 2017), we encode each attribute as a one-hot vector and concatenate the N a one-hot vectors to represent one object.
The message delivered by Alice is a ﬁxed-length discrete sequence m =
( m 1 ; :::; m N L ) , in which each m i is selected from a ﬁxed size meaningless vocabulary V .
2. N EURAL A GENT S TRUCTURES
Neural agents usually have separate modules for speaking and listening, which we name Alice and
Bob.
Their architectures, shown in Figure 1, are similar to those studied in (Havrylov & Titov, 2017) and (Lazaridou et al., 2018).
Alice ﬁrst applies a multi-layer perceptron (MLP) to encode x into an embedding, then feeds it to an encoding LSTM (Hochreiter & Schmidhuber, 1997).
Its output will go through a softmax layer, which we use to generate the message m 1 ; m 2 ; (cid:1) (cid:1) (cid:1) .
Bob uses a decoding LSTM to read the message and uses a MLP to encode c 1 ; :::; c c into embeddings.
Bob then takes the dot product between the hidden states of the decoding LSTM and the embeddings to generate scores s c for each object.
These scores are then used to calculate the cross-entropy loss when training Bob.
When Alice and Bob are trained using reinforcement learning, we can use p A ( m j x ; (cid:18) A ) and p B ((cid:22) c j m ; c 1 ; :::; c c ; (cid:18) B ) to represent their respective policies, where (cid:18)
A and (cid:18) B contain the parameters of each of the neural agents.
When the agents are trained to play the game together, we use the REINFORCE algorithm (Williams, 1992) to maximize the expected reward under their policies, and add the entropy regularization term to encourage exploration during training, as explained in (Mnih et al., 2016).
The gradients of the objective function J ( (cid:18) A ; (cid:18) B ) are:
[Equation]
where R ((cid:22) c; x ) = 1 ((cid:22) c; x ) is the reward function, H is the standard entropy function, and (cid:21) A ; (cid:21) B >are hyperparameters.
A formal deﬁnition of the agents can be found in Appendix C.
2. M EASURING C OMPOSITIONALITY
Compositionality is a crucial feature of natural languages, allowing us to use small building blocks (e.g., words, phrases) to generate more complex structures (e.g., sentences), with the meaning of the larger structure being determined by the meaning of its parts (Clark, 1996).
However, there is no consensus on how to quantitatively assess it.
Besides a subjective human evaluation, topological similarity has been proposed as a possible quantitative measure (Brighton & Kirby, 2006).
To deﬁne topological similarity, we ﬁrst deﬁne the language studied in this work as L ( (cid:1) ) :
X 7!
M .
Then we need to measure the distances between pairs of objects: ∆ ij X =
d X ( x i ; x j ) , where d X ( (cid:1) ) is a distance in X .
Similarly, we compute the corresponding quantity for the associated messages m i
=
L ( x i ) in the message space M with ∆ ij M =
d M ( m i ; m j ) , where d M ( (cid:1) ) is a distance in M .
Then the topological similarity (i.e., (cid:26) ) is deﬁned as the correlation between these quantities across X .
Following the setup of (Lazaridou et al., 2018) and (Li & Bowling, 2019), we use the negative cosine similarity in the object space and Levenshtein distances (Levenshtein, 1966) in the message space.
We provide an example in Appendix B to give a better intuition about this metric.
N EURAL I TERATED L EARNING M ODEL
The idea of iterated learning requires the agent in current generation be partially exposed to the language used in the previous generation.
Even this idea is proven to be effective when experimenting with human participants, directly applying it to games played by neural agents is not trivial: for example, we are not sure where to ﬁnd the preference for high- (cid:26) languages for the neural agents.
Besides, we must carefully design an algorithm that can simulate the “partially exposed” procedure, which is essential for the success of iterated learning.
3. L EARNING S PEED A DVANTAGE FOR THE N EURAL A GENTS
As mentioned before, the preference of high- (cid:26) language by the learning agents is essential for the success of iterated learning.
In language evolution, highly compositional languages are favored because they are structurally simple and hence are easier to learn (Carr et al., 2017).
We believe that a similar phenomenon applies to communication between neural agents:
Hypothesis 1: High topological similarity improves the learning speed of the speaking neural agent.
We speculate that high- (cid:26) languages are easier to emulate for a neural agent than low- (cid:26) languages.
Concretely, that means that Alice, when pre-trained with object-message pairs describing a high-
(cid:26) language at a given generation, will be faster to successfully output the right message for each object.
Intuitively, this is because the structured mapping described by a language with high (cid:26) is smoother, and hence has a lower sample complexity, which makes resulting examples easier to learn for the speaker agent (Vapnik, 2013).
Hypothesis 2: High topological similarity allows the listening agent to successfully recognize more concepts, using less samples.
We speculate that high- (cid:26) languages are easier for a neural agent to recognize.
That means that Bob, when pre-trained with message-object pairs corresponding to a high- (cid:26) language, will be faster to successfully choose the right object.
Intuitively, the lower topological similarity is, the more difﬁcult it will be to infer unseen object-message pairs from seen examples.
The more complex mapping of a low- (cid:26) language implies that more object-message pairs need to be provided to describe it.
This translates as an inability for the listening agent to generalize the information it obtained from one object-message associated to a low- (cid:26) language to other examples.
Thus, the general performance of Bob on any example will improve much faster when trained with pairs corresponding to a high- (cid:26) language than with a low- (cid:26) language.
We provide experimental results in section 4.1 to verify our hypotheses.
We also provide a detailed example in Appendix D to illustrate our reasoning.
3. N EURAL I TERATED L EARNING AND P ROBABILISTIC A NALYSIS
We design the NIL algorithm to exploit these advantages in a robust manner, as detailed in Algorithm 1.
The algorithm runs for I generations: at the beginning of each generation i , both the agents are reinitialized.
As Alice and Bob have different structures, they are then pre-trained differently (see line 5-7 for Alice and line 8-12 for Bob): this is the learning phase .
Alice is pre-trained via categorical cross-entropy, using the data generated at the previous generation, which we denote D i .
Bob is pretrained with REINFORCE, learning from the pre-trained Alice.
We note I a
and I b their respective number of pre-training iterations.
With hypothesis 1, the expected (cid:26) of the language spoken by Alice should be higher than that of D i .
Meanwhile, Bob shold be more “familiar with” the language with a higher (cid:26) than D i , as stated by hypothesis 2.
Alice and Bob then play the game together for I g rounds in the interacting phase , in which both agents are updated via REINFORCE.
In this phase, the languages used by them are ﬁltered to be more unambiguous — their language must deliver information accurately to accomplish the task.
Finally, in the transmitting phase , we feed all objects to Alice and let it output the corresponding messages to be stored in D i +1 for the learning phase of the next generation.
To better understand how NIL enhances the expected (cid:26) of the languages generation by generation, we propose a probabilistic model for NIL in Appendix C, as well as a probabilistic analysis of the role played by Alice and Bob in every phase.
Intuitively, at the beginning of each generation, the expected (cid:26) of language used by Alice (denoted by E L [ (cid:26) ( L )] ) is quite low because of the random initialization.
Then during the learning phase, Alice learns from D i and expected to have the same E
L [ (cid:26) ( L )] with D i if it perfectly learns that data set.
However, as the high- (cid:26) language is favored by neural agent during training, the E L [ (cid:26) ( L )] of the weakly pre-trained Alice should be higher than that of D i .
A similar thing may happen when pre-training Bob.
Then in the interacting phase, as the game performance has no preference for language with different (cid:26) , E L [ (cid:26) ( L )] will not change in this phase.
Finally, in the transmitting phase, D i +1 is sampled based on the language with current E
L [ (cid:26) ( L )] , which is expected to be higher than that of D i .
In other words, E L [ (cid:26) ( L )] would increase generation by generation (the details for derivations are provided in Appendix C):
[Equation]
E XPERIMENTS AND D ISCUSSIONS
In this section, we ﬁrst verify hypotheses 1 and 2 by directly feeding languages with different (cid:26) to Alice and Bob.
Then we examine the behavior and performance of the neural agents, as well as the expected (cid:26) of languages, at each generation.
We conduct an ablation study, to examine the effect of pre-training Alice and Bob separately.
We then investigate more thoroughly the advantages
Randomly initialize brought by high- (cid:26) languages, and highlight the ‘interval of advantage’ in pre-training rounds, which could help in selecting reasonable I a
and I b .
Finally, we conduct a series of experiments on a held-out validation set to highlight the positive effect of high- (cid:26) languages on the neural agents generalization ability — which shows the potential of iterated learning for NLU tasks.
Details about our experimental setup and our choice of hyper-parameters can be found in Appendix A.
More experiments about the robustness of NIL are presented in Appendix E.
4. L EARNING S PEED A DVANTAGES
We ﬁrst use the experimental results in Figure 2 to verify hypotheses 1 and 2.
In these experiments, we randomly initialize one Alice and feed languages with different expected (cid:26) for it to learn (and repeat the same procedure for Bob).
We generate a perfect high- (cid:26) language ( (cid:26)
= 1 ) using the method proposed in (Kirby et al., 2015), and randomly permute the messages to generate a low- (cid:26) language with (cid:26) = 0 : 21 .
The other languages are intermediate languages generated during NIL.
Note that there is no interacting nor transmitting phase in the experiment in this subsection: we only test the learning behavior of a randomly initialized Alice (or Bob) separately.
From the result in Figure 2-(a) and (b), we see that the high- (cid:26) languages indeed has the learning speed advantage at both the speaker and the listener side.
One important ﬁnding is in Figure 2-(c), which record the expected (cid:26) , i.e., E L [ (cid:26) ( L )] , during Alice’s learning.
From this ﬁgure, we ﬁnd that when learning a language with low expected (cid:26) , the value of E L [ (cid:26) ( L )] will ﬁrst increase, and ﬁnally converge to the (cid:26) of D .
This phenomenon, caused by the learning speed advantage, makes the weak pre-train the essential design for the success of NIL: if I a is correctly chosen, we may expect a higher E L [ (cid:26) ( L )] than that of the data set it learns from.
4. P ERFORMANCE OF NIL
In this part, we record the game performance (i.e., the rate of successful object selections) and mean (cid:26) of the object-message pairs exchanged by the neural agents every 20 rounds.
We run the simulation 10 times, with a different random number seed each time.
Although the results are different, they
[Figure] [Figure]
these experiments, I =80 and
I g =4000, with all other hyper-parameters following Table 3.
all follow the same trend.
In this ﬁrst series of experiments, we compare the following 4 different methods:
(cid:15) Iterated learning, with resetting both Alice and Bob at the beginning of each generation.
(cid:15)
Iterated learning, only resetting Alice at the beginning of each generation; (cid:15) Iterated learning, only resetting Bob at the beginning of each generation; (cid:15) No iterated learning: neither Alice nor Bob are reset during training.
From Figure 3-(a), we can see that for the 3 displayed variants of the procedure, neural agents can play the game almost perfectly after a few generations.
The curve of the no-reset method will directly converge while the curves of the other two iterated learning procedures will show a loss of accuracy at the beginning of each generation.
That is because one or both agents are reset, and are not able to completely re-learn from the data kept from the previous generation during the pre-training phase.
However, at the end of each generation, all these algorithms can ensure a perfect game performance.
While the use of NIL has little effect on the game performance, given a sufﬁcient number of rounds, these procedures have a clear positive effect on topological similarity.
In Figure 3-(b), we can see that the no-reset case has the lowest average (cid:26) while the iterated learning cases all have higher means (and increasing).
We provide extra experiments in Appendix E, which demonstrate the robustness of NIL under different scenarios.
The discussion on the speciﬁc impact of each agent and why the reset-Alice and reset-Bob behave differently is in Section 5.
4. H IGH T OPOLOGICAL S IMILARITY AND I NTERVAL OF A DVANTAGE
In this section, we explore further the phenomenon caused by the learning speed advantage on NIL.
From the discussion in section 3.1 and the experimental results in section 4.1, we know that I a and
I b play an important role in NIL: they should not be too large nor too small.
Intuitively, if I a is too small, Alice will learn nothing from the previous generation, hence the NIL amounts to playing
[Table]
only one interacting phase.
If I a is too large, from the trend in Figure 2-(c), we may expect that the increase of expected (cid:26) should be small in each generation, because Alice will perfectly learn D i , and hence have a (cid:26) similar to its predecessor.
Hence we speculate that the value of I a should have a “bottleneck” effect, i.e., a too large one or a too small one will both harm the performance of NIL.
A similar argument can also applied in the selection of I b .
To verify our argument, we run NIL with different values of I a and I b , examining the behavior of the following 3 different quantitive metrics:
(cid:15) E [ r 71:80 ] : The average reward of the last ten generations (game performance); (cid:15) E [ (cid:26) 1:10 ] : The average value of (cid:26) for the ﬁrst ten generations (converging speed); (cid:15) E
[ (cid:26) 71:80 ] : The average value of (cid:26) for the last ten generations (converged (cid:26) ).
From the results presented in Table 1, we can see the importance of the number of pre-training rounds not being too large nor too small.
The suitable I a
and I b are shown in bold.
Furthermore, combining Figure 2 and Table 1, the interval of suitable I a lies between 1000 to 2000 while it lies between 100 to 200 for I b , which provides us an effective way to choosing hyper-parameters.
4. T OPOLOGICAL S IMILARITY AND V ALIDATION P ERFORMANCE
In this last series of experiments, we aim to explore the relationship between topological similarity and the generalisation ability of our neural agents, which can also indirectly reﬂect the expressivity of a language.
We measure this ability by looking at their validation game performance: we restrict the training examples to a limited numbers of objects (i.e., the training set), and look at how good are the agents at playing the game on the others (i.e., the validation set).
Figure 4-(a) demonstrates the strength of the iterated learning procedure in a validation setting.
To illustrate the relationship between (cid:26) and validation performance, we randomly choose I a 2 [60 ; 4000] and I b 2 [5 ; 200] and conduct a series of experiments.
Those for which I a
and I b are not in their optimal range will yield a worse performance on both validation test and topological similarity.
In Figure 4-(b), we record the results from different experimental settings and draw the zero-shot performance given the topological similarity of the emergent language.
This shows the linear correlation between these two metrics, and a signiﬁcance test conﬁrms it: the correlation coefﬁcient is 0 : 928 , and the associated p -value is 3 : 8 (cid:3) 10 (cid:0) 104 .
Hence, under various experimental settings, the validation performance and the topological similarity are strongly correlated.
Table 2 shows that when the size of validation set increases, using iterated learning can always improve the validation performance: in all the cases, both-reset algorithm always yields the best performance.
The fact that the Alice-reset setting performs better than the Bob-reset setting also matches our analysis well.
D ISCUSSION : A PARALLEL WITH L ANGUAGE E VOLUTION
We can observe an interesting phenomenon in Figure 3-(b): 2 the topological similarity of the emergent language always increases at ﬁrst, whether we use iterated learning or not.
This is akin to the effect apparent for (cid:26) in Figure 2-(c): continuing training will imply ﬁne-tuning to examples that
[Table]
[Figure]
leads to the evolution of languages which allow agents to perform well on unseen items.
are not necessarily of good quality.
However, through the generational resets and limited number of pre-training examples, iterated learning allows small generational improvements: this is because constraining the agent to learn with smaller amounts of data at each generation — through a ‘bottleneck’ (Kirby & Hurford, 2002) — forces the emergence of a more structured language.
This limitation on the amounts of data available corresponds in our algorithm to limiting the number of pre-training rounds of the agents, to a number in what we denoted as the ‘interval of advantage’.
In
NIL, we use the weak pre-training to simulate this bottleneck, and achieve a good result: the values of I a and I b have an effect similar to the bottleneck studied in (Kirby et al., 2015) (more details are provided in Appendix D).
Extending this parallel with the evolution of natural language, we can relate the learning speed advantage provided by high- (cid:26) languages to the speaking agent to the compressibility pressure (Kirby et al., 2015), and the better ability to generalize provided by high- (cid:26) languages to the listening agent to the expressivity pressure (Kirby et al., 2015).
This comparison allows us to address one important difference between our neural iterated learning algorithm and the original version: our speaking and listening agents are not identical.
Actually, the speaking module and listening module of human are also not identical, but the works on traditional iterated learning do not pay much attention to such differences.
From Figure 3-(b) and Figure 4-(a), it is clear that Alice and Bob are affected differently by the generational resets, and thus do not offer the same contribution to the ﬁnal performance.
3 From this parallel, we retain that iterated learning is also linked to the emergence of a certain form of compositionality when applied to neural agents.
Besides, we believe that the correlation between topological similarity and validation performance that we highlight in Section 4.4 is another argument in favor of a relationship between compositionality and generalization, which has recently been explored (Kottur et al., 2017; Choi et al., 2018; Andreas, 2019).
C ONCLUSION
In this paper, we ﬁnd and articulate the existence of the learning speed advantages offered by high topological similarity, with which, we propose the NIL algorithm to encourage the dominance of high compositional language in a multi-agent communication game.
We show that our procedure, consisting in resetting neural agents playing a referential game and pre-training them on data generated by their predecessors, can incrementally advantage emergent languages with high topological similarity.
We demonstrate its interest by obtaining large performance improvements in a validation setting, linking compositionality and ability to generalize to new examples.
The robustness of the algorithm is also veriﬁed in various experimental settings.
Finally, we hope the proposed probabilistic model of NIL could inspire the application of NIL in more complex neural-agents-based systems.
A CKNOWLEDGEMENT
We show our sincere gratitude to Kenny Smith, Ivan Titov, Stella Frank and Serhii Havrylov for their helpful discussion and comments that greatly improved the manuscript.
We would also like to thank the members from Prof. Jun Zhao’s team at Institute of Automation,
Chinese Academy of Sciences, e g. Dr. Kang Liu, Xiang Zhang and Xinyu Zuo, for sharing computing resources to run some experiments as well as sharing their pearls of wisdom with us during the course of this research, and we thank 3 anonymous reviewers for their insights and comments.
APPENDIX A: PARAMETER SETTINGS
Unless speciﬁcally stated
[Table]
the experiments mentioned in this paper use the hyper-parameters given in Table 3.
The code is available at https://github.com/Joshua-Ren/Neural_
Iterated_Learning .
[Table]
APPENDIX B: DIFFERENT TYPES OF LANGUAGES: A TOY EXAMPLE
[Table] [Table]
[Figure]
[Table]
[Figure]
To better understand how topological similarity can measure the compositionality of one language, and to give some intuitions on how languages having different (cid:26) would like, we provide and illustrate a toy example in this appendix.
In this example, the object space is X = f blue box, blue circle, red box, red circle g and the message space is M = f aa; ab; ba; bb g .
Any set of mappings from four distinct objects to four messages (not necessarily distinct, i.e. same message could correspond to different objects) forms a language.
Hence, there exist 4 4 = 256 possible languages in this toy example.
Following the principles provided in (Kirby et al., 2015), we deﬁne the following concepts for describing a language:
(cid:15) Unambiguous language .
A type of language that can unambiguously describe all objects in X .
In other words, the mappings between X and M are bijectional.
In this example, there exist 4 (cid:2) 3 (cid:2) 2 (cid:2) 1 = 24 such languages.
(cid:15) Compositional language .
A type of unambiguous language that exhibits systematic compositional structure when forming messages.
Such languages can use different symbols to represent different attributes of meaning and combine these symbols in a systematic way to form a message such that the meaning of the whole message is formed from a simple combination of the meaning of its parts.
For example, following the rules of S !
XY
and X : blue !
b ; X : red : !
b ; Y : box !
a ; X : circle : !
b , we can derive a compositional language like the example in Table 4.
In this example, we have 4 + 4 = 8 such languages.
(cid:15) Holistic language .
A type of unambiguous language but does not exhibits full systematic structures.
In other words, holistic languages are those unambiguous language who are not compositional languages.
In this example, we have 24 (cid:0) 8 = 16 such languages.
(cid:15) Degenerate language .
A type of ambiguous language that maps all objects to the same message.
In this example, we have 4 such languages.
(cid:15) Degenerate component .
Any ambiguous language having degenerate component, i.e., there may be more than one objects mapping to the same message.
The existence of degenerate component makes the language ambiguous.
Note that the number of unambiguous languages is usually much smaller than that of ambiguous languages, and the number of compositional languages is usually smaller than that of holistic languages.
Using permutation and combination, we can calculate the numbers of all possible languages, unambiguous language, compositional language and holistic language as:
[Equation]
From the above equation, it is easy to see that the gap between the number of compositional languages and holistic languages would become larger when N v , N a , N L and j V j increase.
Further, this means that it becomes even harder to pick a compositional language when randomly sample a language.
That could explain why the expected topological similarity of the emergent language may increase when smaller N L and j V j are applied, as illustrated in (Lazaridou et al., 2018; Cogswell et al., 2019).
Besides the numbers of different languages, another key difference among these languages is the topological similarity (i.e., (cid:26) ), as illustrated in section 2.3.
As the language studied in this paper is deﬁned as a mapping function from a meaning (i.e., an object) to a message, a compositional language must ensure that the meaning of a symbol is a function of the meaning of its parts.
In other words, compositional languages are neighborhood related: nearby meanings tend to be mapped to nearby signals.
Or to say, nearby meanings that share similar attributes are likely to share similar message symbols (Brighton & Kirby, 2006).
Thus, as the difference between messages are measured by edit distance, the compositional languages will have a higher (cid:26) than the holistic ones.
However, the existence of degenerate component also change the value of (cid:26) : the (cid:26) of a degenerate language might be higher than that of a holistic language.
From the above discussions, we ﬁnd that making the highly compositional languages dominate is a challenging task: it occupies a really small portion among all possible languages, and only using topological similarity also cannot tell them apart from those who are highly degenerate.
However, the proposed algorithm can solve this problem almost perfectly: it uses the learning speed advantage caused by high topological similarity to increase the posterior probability of high- (cid:26) languages, and uses the interacting phase to rule out the degenerate components.
The details of how the probability of languages changes in different phase of our algorithm are illustrated in Appendix C.
APPENDIX C: PROBABILISTIC MODEL OF THE SYSTEM
Probabilistic Model of Emergent Languages:
In section 2.3, we deﬁne a language as a mapping function from object space X to the message space M , i.e., L ( (cid:1) ) :
X 7!
M .
Here we discuss how to describe the probability of a speciﬁc language, i.e., P ( L ) .
Suppose that we have N possible different objects ( x 1 ; x 2 ; :::; x N ), where N = N N a v , and the messages are conditionally independent given an object x n (where n 2 [1 ; 2 ; : : : ; N ] ), i.e.:
P ( L ) = P ( m 1 ; :::; m N j x 1 ; :::; x N ) =
[Equation]
Assume that messages are uniformly sampled from M whose size is M = j V j N L , we could have
P ( m n j x n ) = 1 M ; 8 n 2 f 1 ; 2 ; :::; N g .
Hence the initial probability (or prior probability) of any possible language is (
M ) N .
We deﬁne the posterior distribution of languages as the distribution after our neural iterated learning algorithm (NIL), i.e. P ( Lj NIL ) .
Then, our goal is to enhance the posterior probability of the high- (cid:26) languages, which is equivelant to enhance the expectation of (cid:26) , i.e.:
[Equation]
It is obvious that E L [ (cid:26) ( L )] , the expected topological similarity of languages following the prior probability, is quite low, as the high- (cid:26) languages only occupy an extremely small fraction.
Deﬁnition of the Agents:
Following the structure provided in Figure 1, we deﬁne the speaking agent (Alice) and listening agent (Bob) formally here.
Alice is a bunch of neural networks that can map any input object x to a discrete message m .
So we deﬁne it as m = h ( x ) ; h : X 7!
M .
As Alice generate discrete messages with softmax layers, the probabilistic distribution of different words in m n can be obtained.
In the example provided in Figure 1, we can have P ( m 1 j x ) and P ( m 2 j x; m 1 ) by reading the distribution from softmax layers.
In more general cases, we could obtain P ( m l j x; m l (cid:0) 1 ; m l (cid:0) 2 ; : : : ) following the same method.
Thus, we can directly calculate the probability of speciﬁc m given x for Alice as follow:
[Equation]
If we feed all possible x to Alice and calculate the corresponding P ( m j x ) , we then could calculate the probability distribution of all languages after training Alice, following equation (8) and (9).
Then, we can state our goal as to obtain a high E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] by using NIL to update the parameters of the neural network.
In our setting, the posterior probability of languages is decided by Alice with its softmax layers.
Bob plays a role of assistant to ensure the robustness of NIL, which will be further illustrated in
Appendix D and E. From Figure 1, we could see that the inputs of Bob are a discrete message m and c different objects.
As Bob will calculate a score s c for each object c c , we can denote its function as s = f
( m ; x ) ; f : M (cid:2)
X 7!
R 1 .
Probabilistic Description of Language Evolution in NIL:
[Figure]
To avoid confusion, we specify all the probabilities involved in NIL in the left corner of Figure 6.
In the ﬁgure, the shadow regions with different colors represent the three phases of NIL in ONE generation.
Thus, one generation of NIL could be described as:
Initialization :
At the beginning of generation t , the initial probability of Alice[i] is P 0 ( L ) , which is same as the prior probability of P ( L ) mentioned before, as Alice[i] is always randomly initialized.
The initial function of Bob[i] is represented as f 0 ( m ; x ) .
Learning Phase : Then following Algorithm 1, Alice[i] will be pre-trained using the data sampled from the previous generation, i.e. D i .
The pre-trained probability of languages is deﬁned as P i
( Lj D i ) .
Bob[i] will then be pre-trained using the sample generated by P
i
( Lj D i ) , using REINFORCE procedure, after which, its function becomes f i ( m ; x ) .
Interacting Phase : The pre-trained Alice[i] and Bob[i] then interact and update their parameters together following the REINFORCE procedure described in section 3.2.
In each round of the game, Alice[i] would ﬁrst use argmax to select m with the highest probability given a randomly selected object x , both agents would then update their parameters if R = 1 , i
e. the data pair ⟨ m ; x ⟩ could assist them to accomplish the referential game successfully.
We argure that this process has the same effect as the following procedure: we ﬁrst sample a data set D (cid:3) (cid:24) P i ( Lj D i ) , and then delete the data pairs that cannot unambiguously deliver information to form a reﬁned data set R i .
Then, the interacted probability of Alice[i] can be represented by P
i
Lj D i ; R i ) .
As Bob also update its parameters in this phase, we deﬁne its interacted function as f i (cid:3) ( m ; x ) .
Transmitting Phase : Finally, in the transmitting phase, we sample D i +
(cid:24) P
i
Lj D i ; R i ) by: i)randomly feeding x n to Alice[i]; ii) sample a message m n (cid:24) P i ( m j x n ; D i ; R i ) .
Note that Bob[i] is not involved in this phase.
From all sections above, we argue that Alice plays an important role in all the phases in NIL while
Bob only helps to make the languages effective during interaction phases.
As we will discuss the role of Alice and Bob in further details in Appendix E, we only provide an intuition of how the language changes in NIL in the following paragraphs.
Overall, the objective of our NIL design is to ensure the expected topological similarity of emergent languages would increase over generations, as expressed by equation (3).
As the languages with higher (cid:26) would be learned faster, which is stated as Hypothesis 1, we can expect those high- (cid:26) languages to have a higher pre-trained probability in P ( Lj D i ) than in D i , i.e.:
[Equation]
P
[Equation]
Lj D
[Equation]
[ (cid:26) (
[Equation]
)] (cid:21)
[Equation]
Note that this inequality is not a strict corollary, but it is very likely to hold as long as we have an appropriate I a .
In the worst case, we can chose an extremely large I a to make Alice learn D i perfectly.
However, we could verify it by the experimental results as well as the explanation in
Appendix D that the weak pre-training can indeed help us to achieve a higher expected (cid:26) .
Then, in the interacting phase, we may expect:
[Equation]
) as the compositional languages and holistic languages are both unambiguous and the game performance cannot tell them apart.
Finally, during the transmitting phase, we have D i +1 (cid:24) P
i ( Lj D i ; R i )
[Equation]
Assuming that we sampled enough D i +1 to ensure it has a very similar distribution to P i
( Lj D i ; R i ) , it is reasonable to have:
[Equation]
Sum up from the above, equation (3) can be obtained by combining equation (11-13).
APPENDIX D: MORE ON THE LEARNING SPEED ADVANTAGE
Amplifying mechanism and learning speed advantage are the two main elements for the success of
NIL.
The former on is elaborated in section 3.2 and Appendix C, under the assumption that the learning speed advantage of high- (cid:26) language indeed exist.
In this section, we will explain why such an advantage exist by experimental results and a toy example.
[Figure]
Example for Supporting Hypothesis 1:
This hypothesis claims that a high- (cid:26) language would be leared faster than a low- (cid:26) one on the speaker side.
As we can directly represent the posterior probability of any language from Alice’s perspective, the assertion of “learned faster” can be converted to “the posterior probability increases faster” .
We use a toy example, i.e. two languages in Table 4, to demonstrate how such an advantage emerges and how it works.
To make the notation concise, we use “BB, RB, BC, RC” to represent “blue box, red box, blue circle, red circle” respectively.
The probability of the compositional language and the holistic language in Table 4 can be represented as:
[Equation]
where C is the common part for both languages.
As we are using stochastic gradient descent algorithm to update the parameters of Alice
[Equation]
it straightforward to see that the update of gradient from one point will ’pull up’ the neighbourhood region of function h , which is shown in the left panel of Figure 7.
Then
[Equation]
we can speculate that if one data sample belonging to both the two language comes, e
[Equation]
g. ⟨ ab; BC ⟩ , the following probabilities would increase at the same time:
[Equation]
as the input of them are similar with BC (only one attribute changes).
As the conditional probabilities must sum to 1, the following probabilities would decrease:
[Equation]
Thus, when Alice learns the data sample ⟨ ab; BC ⟩ , P ( L cmp ) may have two terms increased, i.e., terms 5 and 1 .
For P ( L hol ) , however, the decrease of term 1 will harm the increase of term 5 , hence P ( L hol ) increases slower than P ( L cmp )
(The fact that term 7 decreases on both sides would not change our deduction).
Example for Supporting Hypothesis 2:
We can use a similar explanation for the advantage at Bob.
Recall that Bob is deﬁned as a mapping function f from M (cid:2)
X to R 1 .
Following the principle mentioned above, if Bob learns ⟨ ab; BB ⟩ , a bunch of function values would increase, i.e. f ( ab; BB ) , f ( aa; BB ) , f ( bb; BB ) , f ( ab; BC ) , and f ( ab; CB ) , as they are all close to each other in the input space.
Then it is easy to ﬁnd that two terms in the compositional language in Table 4 are increased while only one term increases in the holistic language.
That is, the score of high- (cid:26) language would increases faster.
We can also think hypothesis 2 in the following way.
With the intuition that a language with higher (cid:26) tends to be smoother and to have fewer inﬂection points than one with lower (cid:26) , the learning speed advantage given by highly compositional languages can be illustrated by the example provided in
Figure 7.
In the example, language is considered to be a one-dimensional mapping function, which is represented by the dotted lines in Figure 7.
The object-message pairs, which are represented by the cross marks, are the points that satisfy the mapping function.
The solid line represents the mapping function of the learning agent.
Suppose the target output (i.e. the third cross mark in each ﬁgure) is larger than the predicting output (i.e. the circle mark), the optimizer will update the parameters of the neural network following the direction of the gradient, as illustrated by the bold arrows in the ﬁgure.
Such an update will also pull the neighbouring parts of the function up, as illustrated by the smaller arrows on the solid curve.
The smoothness of high- (cid:26) languages implies that the MSE of neighbouring positions will also be reduced by this update, while the MSE of neighbors would be increased in the case of a low- (cid:26) language.
Such a trend is represented by the blue arrows and red crossed-arrows in Figure 7: the blue one means a decrease of the MSE at the speciﬁc position while the red one means increases of
MSE.
In other words, for a high- (cid:26) languages, an update corresponding to one data sample is likely to have a larger positive effect on other data samples, and hence ensure a higher learning speed.
Meanwhile, for a low- (cid:26) language, one data sample would have both positive and negative effects on its neighbors and thus lead to a lower learning speed.
APPENDIX E: ROBUSTNESS OF NIL
In this section, we will provide experimental results to demonstrate the robustness of the proposed method.
The inﬂuence of hyperparameters (e.g. vocabulary size, message length) as well as the role played by Alice and Bob are both elaborated.
Robustness for Hyperparameters on Message Space:
The message space are decided by the vocabulary size j V j and the message length N L .
Thus, we ﬁrst make experiments to see the effects of different j V j and N L on E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] .
From the discussion in Appendix B, we know that when j V j and N L are large, making high- (cid:26) language dominate in the posterior probability is very hard, as the compositional languages only occupy an extremely small portion.
Such a trend could also be found in Table 5, as the ﬁnally converged expectation of topological similarity becomes lower with larger j V j or N L .
Our algorithm, however, is very robust to different values of j V j and N L .
By comparing different columns in Table 5, E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] decreases very slow with the increasement of j V j and N L .
An extreme example is that, the converged (cid:26) can still be roughly 0.8 with j V j = 72 .
The performance of validation accuracy seems more robust when j V j and N L changes: the NIL can always obtain more than 80% accuracy compared to the none reset case (roughly 15%).
Furthermore, compared with j V j , N L has a stronger impact on the performance in terms of all metrics but the validation performance, as it is shown in Table 5 that the performance with N L =is signiﬁcantly lower than its counterpart when N L = 2 .
One possible explanation is that the increasing of N L brings an exponential change to the message space.
However, no matter how j
V j and N L change, E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] is always signiﬁcantly higher that the compositionality of emergent languages given by baseline model,
i
[Table]
e. 0 : 3 .
[Table]
Robustness on Degenerate Components:
From the discussions in Appendix B, we know that the (cid:26) of a language who has many degenerate components will also be high, and hence can be learned faster by Alice in the learning phase.
Thus, it is necessary to check whether our algorithm can avoid the mode collapse caused by the degenerate components.
Intuitively, the degenerate components can be ﬁltered out during the interacting phase, as the REINFORCE algorithm ensure that the parameters of the agent will only be updated with respect to R = 1 , i.e. the language is effective and thus unambiguous.
To verify our hypothesis, we ﬁrst observe how the number of message types, i.e. the number of different messages used to describe all 64 objects, changes during NIL.
It is straightforward to see that a language without any degenerate component would have 64 different message types.
As shown in Figure 8, all methods could achieve high numbers if message types, which indicates that the REINFORCE algorithm could always ﬁlter out the degenerate components efﬁciently.
Furthermore, we design two challenging tasks for NIL:
[Figure]
Degenerate initialized:
We let Alice learn from a pure degenerate language at the beginning of each generation, before it learns from D i .
Degenerate mixed: We mix the data pair generated by a pure degenerate language to D i and ensures the proportion of the degenerate pairs is more than 50% , which makes Alice easier to collapse to a degenerate language during learning phase.
We then compare the performance,
i
[Figure]
e. the expected (cid:26) and validation accuracy, of agents in different tasks.
The results shown in Figure 9 demonstrate that our NIL is very robust to the inﬂuence of degenerate component
[Figure]
as both E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] and the validation score are much higher than the none reset baseline’s performance
[Figure]
means Alice is initialized with a degenerate language at the beginning of each generation.
NIL with degenerate mixed means Alice is initialized with a degenerate language, AND the D i is mixed with I s degenerate language pairs.
The Role of Bob’s Pre-training
From the discussions above, it is easy to understand why E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] would gradually increase in NIL and how the REINFORCE applied in interacting phase can ﬁlter the degenerate component.
However, the role played by Bob, especially in the learning phase where Bob only update its own parameters, is not straightforward.
In short, the pre-training of Bob makes the algorithm more robust, especially at the beginning of the interacting phase.
We record the value of E
L(cid:24) P
[Equation]
Lj NIL )
[ (cid:26) ( L )] every 20 iterations among learning phase and interacting phase, and plot the results of two generations in Figure 10.
[Figure]
In this ﬁgure, the x-axis is the index of iterations.
With I a =1000, I b =400, and I g =
1600, we split (by dotted lines) each generation to three parts: Alice pre-training, Bob pre-training, and interacting phase.
The blue lines are generated by NIL with the pre-training of Bob while the red lines are generated when Bob is not pre-trained (here I g =2000 to make a fair comparison).
For the blue lines, E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] will not change when Bob is pre-training (begins at the 1000th iteration), because Alice do not update parameters at that time.
However, for the red lines, E L(cid:24) P ( Lj NIL )
[ (cid:26) ( L )] begin to decrease at the 1000th iteration.
That is because when Bob is not pre-trained, the language learned by Alice may be impacted by playing with a fresh new Bob at the beginning of interacting phase!
That is why the pre-training of Bob can make the NIL more efﬁcient and robust.
If Bob are pre-trained by the data generated by Alice in the current generation, Bob would be more “familiar” with Alice’s language, and hence ensures a more stable interacting phase.
Looking at the Emergent Languages
From the discussions above, we know that NIL can ensure a high expected (cid:26) of the emergent language, and a high validation performance.
Here we show the evolution of the distributions of emergent languages to provide a better intuition on how NIL works.
We ﬁrst provide two examples of converged language (i.e., the language generated by Alice in the last generation) using the none-reset method and the resetting-both method in Table 6 and 7, respectively.
In these examples, both languages can almost unambiguously represent all 64 different types of objects in X , and hence they can help Alice and Bob to play the game successfully.
However, the language generated using iterated learning has a clear compositional structure: the ﬁrst position of the message represents different colors, and the second position represents the shape.
Such a structure is quite similar to what humans do, e.g., combine an adjective and a noun to represent a complex concept.
To better illustrate the posterior probability of emergent languages as a function of the corresponding value of (cid:26) and the generation, we provide the 3D views of P ( (cid:26) ( L ) j D
i ; R i ) in 80 generations in
Figure 12 and 13.
The heat-map provided in Figure 11 can be considered as the top views of these 3D illustrations.
In these two ﬁgures, the x-axis and y-axis represent the index of generation and the topological similarity, and the z-axis represents the probability of languages with a speciﬁc value of (cid:26) , in a speciﬁc generation.
To make the ﬁgures easier to read, we smooth the distribution of (cid:26) in each generation using linear interpolation (Boyd & Vandenberghe, 2004).
Figure 14-(a) and (b) compare the posterior distributions at some typical generations, which can also be considered as the side views of the 3D illustration from the direction of x-axis.
In these ﬁgures, we ﬁnd that the initial distribution of (cid:26) is not ﬂat.
That is because even the prior probability for each language is uniform, the amounts of languages with extremely high (cid:26) and low (cid:26) only occupy a small portion among all possible languages, as stated in (Brighton, 2002).
Hence the initial probability of (cid:26) ( L ) is no longer uniform and has a bell shape which is similar to the Gaussian distribution.
One new trend provided by these ﬁgures is that, in the none-reset case, the width of the curves in different generations do not change much, while in the resetting-both case, the width of the curves will gradually decrease (i.e., becomes more peaky).
Such a trends means when iterated learning is applied, language tend to converge to some high- (cid:26) types.
Figure 15-(a) and (b) track the ratio of languages with different values of (cid:26) , which can also be considered as the side views of the 3D illustration from the direction of y-axis.
In these ﬁgures, we divide all possible languages into ﬁve groups based on their topological similarity, i.e., languages with (cid:26) (cid:20) 0 : 2 , 0 : 2 < (cid:26) (cid:20) 0 : 4 , 0 : 4 < (cid:26) (cid:20) 0 : 6 , 0 : 6 < (cid:26) (cid:20) 0 : 8 , and 0 : 8 < (cid:26) .
We plot the ratio of these ﬁve different groups of languages at the end of each generation.
From Figure 15-(a), we can see that the high- (cid:26) language, which is represented by the bold curve, always occupy a small portion.
The topological similarity of the dominant languages are (cid:26) < 0 : 4 .
However, in the resetting-both case, as illustrated in Figure 15-(b), the portion of high- (cid:26) language will increase signiﬁcantly, which further veriﬁes that the iterated learning can gradually make the high- (cid:26) language dominate in posterior.
box aa fh af hh cg fc ha hf circle da df hb db fa da dh fb triangle gc ff ge gf gg fg ge he square ae
fb be bb bg
fb gb ba star ad fd de db dg fd ce hc diamond ac dd dc db
dg fd dc dd pentagon ad fe ef bd eg fc ee ed capsule aa dd de db dg gd de fh aa ea ba
ga
da ca ha fa circle ab eb bb gb db cb hb fb triangle ae
eb be ge de ce he fe square af ef bf gf df cf hf ff star ac ec bc gc
dc cc dh fc diamond ad ed bd gd dd cd hd fd pentagon ag eg bg gg dg cg hg fg capsule ah eh bh gh hc
ch hh fh
[Figure]
( L ) j D i ; R i )
[Figure] [Figure]
[Figure] [Figure]