SlowGuess/ACL_2020_OCR huggingface dataset:
Note that, with  $(i_{att} = 2, i_{val} = 100)$ , a  $(c_{len} = 2, c_{voc} = 100)$  channel should suffice for a perfectly positionally disentangled strategy. Why does the analyzed language use  $(c_{len} = 3)$  instead? Looking at its mutual information profile (Appendix Table 5), we observe that positions 2 and 3 (pos2 and pos3) are respectively denoting attributes 2 and 1 (att2 and att1): pos3 has high mutual information with att1 and low mutual information with att2; the opposite holds for pos2. The remaining position, pos1, could then be simply redundant with respect to the others, or encode noise ignored by Receiver. However, this is not quite the case, as the language settled instead for a form of "leaky disentanglement". The two disentangled positions do most of the job, but the third, more entangled one, is still necessary for perfect communication.
To see this, consider the ablations in Table 1. Look first at the top block, where the trained Receiver of the relevant run is fed messages with the symbol in one original position preserved, the others shuffled. Confirming that communication is largely happening by disentangled means, preserving pos2 alone suffices to have Receiver guessing a large majority of att2 values, and keeping pos3 unchanged is enough to guess almost  $90\%$  of att1 values correctly. Conversely, preserving pos1 alone causes a complete drop in accuracy for
both attributes. However, neither pos2 nor pos3 are sufficient on their own to perfectly predict the corresponding attributes. Indeed, the results in the bottom block of the table (one symbol shuffled while the others stay in their original position) confirm that pos1 carries useful complementary information: when fixing the latter and either one of the other positions, we achieve  $100\%$  accuracy for the relevant attribute (att2 for pos1+pos2 and att1 for pos1+pos3), respectively.
In sum, pos2 and pos3 largely specialized as predictors of att2 and att1, respectively. However, they both have a margin of ambiguity (in pos2 and pos3 there are 96 and 98 symbols effectively used, respectively, whereas a perfect 1-to-1 strategy would require 100). When the symbols in these positions do not suffice, pos1, that can refer to both attributes, serves a disambiguating role. We quantified this complementary function as follows. We define the cue validity of  $s_p$  (symbol in position  $p$ ) w.r.t an attribute  $a$  as  $CV(s_p, a) = \max_{\bar{a}} P(\bar{a} | s_p)$ , where  $\bar{a}$  iterates over all possible values of  $a$ .  $CV(s_{pos1}, att2)$  is significantly higher in those (train/test) messages where  $CV(s_{pos2}, att2)$  is below average. Similarly,  $CV(s_{pos1}, att1)$  is significantly higher in messages where  $CV(s_{pos3}, att1)$  is below average ( $p \approx 0$  in both cases). We might add that, while there is a huge difference between our simple emergent codes and natural languages, the latter are not perfectly disentangled either, as they feature extensive lexical ambiguity, typically resolved in a phrasal context (Piantadosi et al., 2012).
att1	att2	both atts
fixing	pos1	1	3	0
1 position	pos2	1	68	0
pos3	89	1	1
shuffling	pos1	89	69	61
1 position	pos2	100	3	3
pos3	1	100	1
Table 1: Feeding shuffled messages from the analyzed language to the corresponding trained Receiver. Average percentage accuracy across 10 random shufflings (s.d. always ≈ 0) when: top: symbols in all positions but one are shuffled across the data-set; bottom: symbols in a single position are shuffled across the data-set. The data-set includes all training and test messages produced by the trained Sender and correctly decoded in their original form by Receiver (>99% of total messages).
(a) posdis
(b) bosdis
(c) topsim
Figure 2: Compositionality in function of generalization. Each point represents a successful run in the  $(i_{att} = 2, i_{val} = 100, c_{len} = 3, c_{voc} = 100)$  setting. Red and black points correspond respectively to the medium- and low-disentanglement languages analyzed in Section 5 and Appendix 8.7.
6 Compositionality and ease of transmission
The need to generalize to new composite inputs does not appear to constitute a sufficient pressure to develop a compositional language. Given that compositionality is ubiquitous in natural language, we conjecture that it has other beneficial properties, making it advantageous once agents chanced upon it. Compositional codes are certainly easier to read out by humans (as shown by our own difficulty in qualitatively analyzing highly entangled languages), and we might hypothesize that this ease-of-decoding is shared by computational agents. A long tradition of subject studies and computational simulations has shown that the need to transmit a language across multiple generations or to populations of new learners results in the language being more compositional (e.g., Kirby, 2001; Kirby et al., 2015; Verhoef et al., 2016; Cornish et al., 2017; Cogswell et al., 2019; Guo et al., 2019; Li and Bowling, 2019). Our next experiments are closely related to this earlier work, but we adopt the opposite perspective. Instead of asking whether the pressure to transmit a language will make it more compositional, we test whether languages that have already emerged as compositional, being easier to decode, are more readily transmitted to new learners.[5]
Specifically, we run 30 games in the largest input setting  $(i_{att} = 2, i_{val} = 100)$ , varying the channel parameters. We select the pairs of agents that achieved a high level of generalization accuracy  $(\geq 0.80)$ . Next, following the paradigm of Li and Bowling (2019), we freeze Sender, and train a new
Receiver from scratch. We repeat this process 3 times per game, initializing new Receivers with different random seeds. Once the newly formed pair of agents is successful on the training set, we measure its test accuracy. We also report speed of learning, measured by area under the epochs vs. training accuracy curve. We experiment with three Receiver architectures. The first two, GRU (500) and GRU (50), are GRUs with hidden layer sizes of 500 (identical to the original Receiver) and 50, respectively. The third is a two-layer Feed-Forward Network (FFN) with a ReLu non-linearity and hidden size 500. The latter Receiver takes the flattened one-hot representation of the message as its input. This setup allows probing ease of language transmission across models of different complexity. We leave the study of language propagation across multiple generations of speakers to future work.
Results in the same setting studied in Section 5 are presented in Table 2 (experiments with other setups are in Appendix 8.8). Both learning speed and generalization accuracy of new Receivers are strongly positively correlated with degree of compositionality. The observed correlations reach values almost as high as 0.90 for learning speed and 0.80 for generalization, supporting our hypothesis that, when emergent languages are compositional, they are simpler to understand for new agents, including smaller ones (GRU (50)), and those with a different architecture (FFN).
The natural emergence of generalization There has been much discussion on the generalization capabilities of neural networks, particularly in linguistic tasks where humans rely on compositionality (e.g., Fodor and Lepore, 2002; Marcus,
${}^{5}$  Li and Bowling (2019) established this for hand-crafted languages; we extend the result to spontaneously emerging ones.
posdis	bosdis	topsim
GRU(500)	GRU(50)	FFN	GRU(500)	GRU(50)	FFN	GRU(500)	GRU(50)	FFN
Learning Speed	0.87	0.71	0.35	0.85	0.68	0.33	0.87	0.71	0.35
Generalization	0.80	0.55	0.50	0.81	0.55	0.51	0.79	0.54	0.48
Table 2: Spearman correlation between compositionality metrics and ease-of-transmission measures for  $(i_{att} = 2, i_{val} = 100, c_{len} = 3, c_{voc} = 100)$ . All values are statistically significant ( $p < 0.01$ ).
2003; van der Velde et al., 2004; Brakel and Frank, 2009; Kottur et al., 2017; Lake and Baroni, 2018; Andreas, 2019; Hupkes et al., 2019; Resnick et al., 2019). In our setting, the emergence of generalization is very strongly correlated with variety of the input environment. While this result should be replicated in different conditions, it suggests that it is dangerous to study the generalization abilities of neural networks in "thought experiment" setups where they are only exposed to a small pool of carefully-crafted examples. Before concluding that garden-variety neural networks do not generalize, the simple strategy of exposing them to a richer input should always be tried. Indeed, even studies of the origin of human language conjecture that the latter did not develop sophisticated generalization mechanisms until pressures from an increasingly complex environment forced it to evolve in that direction (Bickerton, 2014; Hurford, 2014).
Generalization without compositionality Our most important result is that there is virtually no correlation between whether emergent languages are able to generalize to novel composite inputs and the presence of compositionality in their messages (Andreas (2019) noted in passing the emergence of non-compositional generalizing languages, but did not explore this phenomenon systematically). Supporting generalization to new composite inputs is seen as one of the core purposes of compositionality in natural language (e.g., Pagin and Westerståhl, 2010). While there is no doubt that compositional languages do support generalization, we also found other systems spontaneously arising that generalize without being compositional, at least according to our intuitive measures of compositionality. This has implications for the ongoing debate on the origins of compositionality in natural language, (e.g., Townsend et al., 2018, and references there), as it suggests that the need to generalize alone might not constitute a sufficient pressure to develop a fully compositional language. Our result might also speak to those linguists who are exploring
the non-fully-compositional corners of natural language (e.g., Goldberg, 2019). A thorough investigation of neural network codes that can generalize while being partially entangled might shed light on similar phenomena in human languages. Finally, and perhaps most importantly, recent interest in compositionality among AI researchers stems from the assumption that compositionality is crucial to achieve good generalization through language (e.g., Lake and Baroni, 2018; Lazaridou et al., 2018; Baan et al., 2019). Our results suggest that the pursuit of generalization might be separated from that of compositionality, a point also recently made by Kharitonov and Baroni (2020) through hand-crafted simulations.
What is compositionality good for? We observed that positional disentanglement, while not necessary, is sufficient for generalization. If agents develop a compositional language, they are then very likely to be able to use it correctly to refer to novel inputs. This supports the intuition that compositional languages are easier to fully understand. Indeed, when training new agents on emerged languages that generalize, it is much more likely that the new agents will learn them fast and thoroughly (i.e., they will be able to understand expressions referring to novel inputs) if the languages are already compositional according to our measures. That language transmission increases pressure for structured representations is an established fact (e.g., Kirby et al., 2015; Cornish et al., 2017). Here, we reversed the arrow of causality and showed that, if compositionality emerges (due to chance during initial language development), it will make a language easier to transmit to new agents. Compositionality might act like a "dominant" genetic feature: it might arise by a random mutation but, once present, it will survive and thrive, as it guarantees that languages possessing it will generalize and will be easier to learn. From an AI perspective, this suggests that trying to enforce compositionality during language emergence will increase the odds
of developing languages that are quickly usable by wide communities of artificial agents, that might be endowed with different architectures. From the linguistic perspective, our results suggest an alternative view of the relation between compositionality and language transmission—one in which the former might arise by chance or due to other factors, but then makes the resulting language much easier to be spread.
Compositionality and disentanglement Language is a way to represent meaning through discrete symbols. It is thus worth exploring the link between the area of language emergence and that of representation learning (Bengio et al., 2013). We took this route, borrowing ideas from research on disentangled representations to craft our compositionality measures. We focused in particular on the intuition that, if emergent languages must denote ensembles of primitive input elements, they are compositional when they use symbols to univocally denote input elements independently of each other.
While the new measures we proposed are not highly correlated with topographic similarity, in most of our experiments they did not behave significantly differently from the latter. On the one hand, given that topographic similarity is an established way to quantify compositionality, this serves as a sanity check on the new measures. On the other, we are disappointed that we did not find more significant differences between the three measures.
Interestingly one of the ways in which they did differ is that, when a language is positionally disentangled, (and, to a lesser extent, bag-of-symbols disentangled), it is very likely that the language will be able to generalize—a guarantee we don't have from less informative topographic similarity.
The representation learning literature is not only proposing disentanglement measures, but also ways to encourage emergence of disentanglement in learned representations. As we argued that compositionality has, after all, desirable properties, future work could adapt methods for learning disentangled representations (e.g., Higgins et al., 2017; Kim and Mnih, 2018) to let (more) compositional languages emerge.
We thank the reviewers for feedback that helped us to make the paper clearer.
Jacob Andreas. 2019. Measuring compositionality in representation learning. In Proceedings of ICLR.
Joris Baan, Jana Leible, Mitja Nikolaus, David Rau, Dennis Ulmer, Tim Baumgartner, Dieuwke Hupkes, and Elia Bruni. 2019. On the realization of compositionality in neural networks. In Proceedings of ACL BlackboxNLP Workshop.
Y. Bengio, A. Courville, and P. Vincent. 2013. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8).
Derek Bickerton. 2014. More than Nature Needs: Language, Mind, and Evolution. Harvard University Press, Cambridge, MA.
Alican Bozkurt, Babak Esmaeili, Dana H Brooks, Jennifer G Dy, and Jan-Willem van de Meent. 2019. Evaluating combinatorial generalization in variational autoencoders. arXiv preprint arXiv:1911.04594.
Philémon Brakel and Stefan Frank. 2009. Strong systematicity in sentence processing by simple recurrent networks. In Proceedings of CogSci.
Henry Brighton and Simon Kirby. 2006. Understanding linguistic evolution by visualizing the emergence of topographic mappings. Artificial life, 12(2):229-242.
Rahma Chaabouni, Eugene Kharitonov, Emmanuel Dupoux, and Marco Baroni. 2019. Anti-efficient encoding in emergent communication. In Proceedings of NeurIPS.
Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. 2018. Isolating sources of disentanglement in variational autoencoders. In Proceedings of NeurIPS.
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gul-cehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using rnN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078.
Michael Cogswell, Jiasen Lu, Stefan Lee, Devi Parikh, and Dhruv Batra. 2019. Emergence of compositional language with deep generational transmission. arXiv preprint arXiv:1904.09067.
Hannah Cornish, Rick Dale, Simon Kirby, and Morten Christiansen. 2017. Sequence memory constraints give rise to language-like structure through iterated learning. PLoS ONE, 12(1):1-18.
Jerry Fodor and Ernest Lepore. 2002. The Compositionality Papers. Oxford University Press, Oxford, UK.
Adele Goldberg. 2019. *Explain Me This: Creativity, Competition, and the Partial Productivity of Constructions*. Princeton University Press, Princeton, NJ.
Shangmin Guo, Yi Ren, Serhii Havrylov, Stella Frank, Ivan Titov, and Kenny Smith. 2019. The emergence of compositional languages for numeric concepts through iterated learning in neural agents. arXiv preprint arXiv:1910.05291.
Irina Higgins, Loic Matthew, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. 2017. betaVAE: Learning basic visual concepts with a constrained variational framework. In Proceedings of ICLR.
Dieuwke Hupkes, Verna Dankers, Mathijs Mul, and Elia Bruni. 2019. The compositionality of neural networks: integrating symbolism and connectionism. arXiv preprint arXiv:1908.08351.
James Hurford. 2014. The Origins of Language. Oxford University Press, Oxford, UK.
Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical reparameterization with Gumbel-softmax. arXiv preprint arXiv:1611.01144.
Eugene Kharitonov and Marco Baroni. 2020. Emergent language generalization and acquisition speed are not tied to compositionality. arXiv preprint arXiv:2004.03420.
Eugene Kharitonov, Rahma Chaabouni, Diane Bouchacourt, and Marco Baroni. 2019. EGG: a toolkit for research on emergence of language in games. In Proceedings of EMNLP (System Demonstrations).
Hyunjik Kim and Andriy Mnih. 2018. Disentangling by factorising. arXiv preprint arXiv:1802.05983.
Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
Simon Kirby. 2001. Spontaneous evolution of linguistic structure—an iterated learning model of the emergence of regularity and irregularity. IEEE Transactions on Evolutionary Computation, 5(2):102-110.
Simon Kirby, Monica Tamariz, Hannah Cornish, and Kenny Smith. 2015. Compression and communication in the cultural evolution of linguistic structure. Cognition, 141:87-102.
Satwik Kottur, José Moura, Stefan Lee, and Dhruv Batra. 2017. Natural language does not emerge 'naturally' in multi-agent dialog. In Proceedings of EMNLP.
Brenden Lake and Marco Baroni. 2018. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In Proceedings of ICML.
Angeliki Lazaridou, Karl Moritz Hermann, Karl Tuyls, and Stephen Clark. 2018. Emergence of linguistic communication from referential games with symbolic and pixel input. In Proceedings of ICLR.
David Lewis. 1969. Convention. Harvard University Press, Cambridge, MA.
Fushan Li and Michael Bowling. 2019. Ease-of-teaching and language structure from emergent communication. arXiv preprint arXiv:1906.02403.
Francesco Locatello, Stefan Bauer, Mario Lucic, Gunnar Raetsch, Sylvain Gelly, Bernhard Scholkopf, and Olivier Bachem. 2019. Challenging common assumptions in the unsupervised learning of disentangled representations. In Proceedings of ICML.
Chris J Maddison, Andriy Mnih, and Yee Whye Teh. 2016. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712.
Gary Marcus. 2003. The Algebraic Mind. MIT Press, Cambridge, MA.
Igor Mordatch and Pieter Abbeel. 2018. Emergence of grounded compositional language in multi-agent populations. In AAAI.
Ryan Nefdt. 2020. A puzzle concerning compositionality in machines. *Mind and Machines*. In press.
Martin Nowak and David Krakauer. 1999. The evolution of language. Proceedings of the National Academy of Sciences, 96(14):8028-8033.
Martin A Nowak, Joshua B Plotkin, and Vincent AA Jansen. 2000. The evolution of syntactic communication. Nature, 404(6777):495.
Peter Pagin and Dag Westerstahl. 2010. Compositionality II: Arguments and problems. Philosophy Compass, 5(3):265-282.
Barbara Partee. 2004. Compositionality in Formal Semantics. Blackwell, Malden, MA.
Steven Piantadosi, Harry Tily, and Edward Gibson. 2012. The communicative function of ambiguity in language. Cognition, 122(3):280-291.
Cinjon Resnick, Abhinav Gupta, Jakob Foerster, Andrew M Dai, and Kyunghyun Cho. 2019. Capacity, bandwidth, and compositionality in emergent language learning. arXiv preprint arXiv:1910.11424.
John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. 2015. Gradient estimation using stochastic computation graphs. In Advances in Neural Information Processing Systems.
Raphael Suter, Djordje Miladinovic, Bernhard Schölkopf, and Stefan Bauer. 2019. Robustly disentangled causal mechanisms: Validating deep representations for interventional robustness. In Proceedings of ICML.
Simon Townsend, Sabrina Engesser, Sabine Stoll, Klaus Zuberbühler, and Balthasar Bickel. 2018. Compositionality in animals and humans. PLOS Biology, 16(8):1-7.
Frank van der Velde, Gwendid van der Voort van der Kleij, and Marc de Kamps. 2004. Lack of combinatorial productivity in language processing with simple recurrent networks. _Connection Science_, 16(1):21-46.
Tessa Verhoef, Simon Kirby, and Bart de Boer. 2016. Iconicity and the emergence of combinatorial structure in language. Cognitive Science, 40(8):1969-1994.
Ronald J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229-256.
Shengjia Zhao, Hongyu Ren, Arianna Yuan, Jiaming Song, Noah Goodman, and Stefano Ermon. 2018. Bias and generalization in deep generative models: An empirical study. In Advances in Neural Information Processing Systems.
8.1 Grid search over  $(i_{att}, i_{val}, c_{len}, c_{voc})$
We report in Table 3 the different  $(i_{att}, i_{val}, c_{len}, c_{voc})$  combinations we explored. They were picked according to the following criteria:
-  $|C| \geq |I|$  so that agents are endowed with enough different messages to refer to all inputs;
- discard some  $|C| >> |I|$  so that we have approximately the same number of settings per  $(i_{att}, i_{val})$  (between 13 and 15 different  $(c_{voc}, c_{len})$ );
- include some  $(c_{\text{voc}}, c_{\text{len}})$  that are large enough that they can be tested with all the considered  $(i_{\text{att}}, i_{\text{val}})$ .
Unless it is mentioned explicitly, we run 10 different initializations per setting.
Table 3 shows that, for large  $|I|$ , GRU-agents need  $|C|$  strictly larger than  $|I|$ . This suggests that, for large  $|I|$ , the emergence of a perfectly nonambiguous compositional languages, where each message symbol denotes only one attribute value and each value attribute is denoted by only one message symbol, is impossible.
8.2 Behavior of the compositionality measures on hand-crafted miniature languages
We construct 3 simple miniature languages to illustrate the different behaviors of topsim, posdis and bosdis: Lang1, Lang2 and Lang3. We fix  $i_{att} = 2$ ,  $i_{val} = 4$ ,  $c_{len} = 3$  and  $c_{voc} = 8$ . Table 4 shows the input-message mappings of each language and reports their degree of compositionality. Note that all languages respect a bijective mapping between inputs and messages.
Lang1 is perfectly posdis-compositional (posdis=1). However, topsim  $< 1$ , as 2 symbols encode one attribute (we need the first two symbols to recover the value of the first attribute). Lang1 is penalized by topsim because it does not have a one-to-one attribute-position mapping; a feature that arguably is orthogonal to compositionality.
Lang2 and Lang3 are equally topsim-compositional. Nonetheless, they differ fundamentally in terms of the type of compositionality they feature. If Lang2 is more posdis-compositional, Lang3 is perfectly bosdis-compositional.
8.3 Generalization for different agents' capacity