So many design choices: Improving and interpreting neural agent communication in signaling games (2023)

Abstract: Emergent language games are experimental protocols designed to model how communication may arise among a group of agents. In this paper, we focus on how to improve performances of neural agents playing a signaling game: a sender is exposed to an image and generates a sequence of symbols that is transmitted to a receiver, which uses it to distinguish between two images, one that is semantically related to the original image, and one that is not. We consider multiple design choices, such as pretraining the visual components of the agents, introducing regularization terms, how to sample training items from the dataset, and we study how these different choices impact the behavior and performances of the agents. To that end, we introduce a number of automated metrics to measure the properties of the emergent language. We find that some implementation choices are always beneficial, and that the information that is conveyed by the agents’ messages is shaped not only by the game, but also by the overall design of the agents as well as seemingly unrelated implementation choices.

## introduction emergent language games are experimental protocols designed to model how communication may arise among a group of agents. for the linguist, they can serve as models of how language might have emerged in humans @xcite @xcite ; for the ai or nlp scientist, they provide an interesting and challenging test-bed for cooperation and communication across distinct neural agents using symbolic channels @xcite . our focus in this paper is on signaling games @xcite . more precisely, we adopt a setting in which a sender is exposed to some data and produces a message that is transmitted to a receiver. the receiver has then to answer a question related to the data that the sender was exposed to. both agents share the common goal of the receiver answering correctly to the question. this common goal encourages the sender to encode relevant information about the input data in its message and in such a way that the receiver can decode it. in the present paper, we show the sender an image, the original image. the receiver is shown a pair of images: a target image, which is semantically related to the original image, and one unrelated distractor. these images all depict a solid on a uniform background; the shape, the size, the position and the color of this object are the same for the original and the target image, while at least one of these features is different for the distractor. based on the sender's message, the receiver has to guess which image of the pair is the target. we allow the senders to compose sequences of arbitrary symbols of variable length. one of the long-term goals of the study of such language games is to understand under which conditions emergent communication protocols display language-like features. in particular, compositionality has been a major concern ever since @xcite and remains so in today's nlp research landscape @xcite . in order to observe complex, structured communication protocols, we need to provide the agents with an environment complex enough for such a characteristic to develop. this adds two requirements on the agents' stimuli: the images we show them will need to be structured, and ought to not be discriminated through low-level features @xcite . when designing and experimenting with such a signaling game, a number of design choices are left open-ranging from the exact objective optimized by the agents, to the selection of training examples and to whether agents have prior information about their environment. in this paper, we exhaustively study how different choices often encountered in the relevant literature interact, and which combinations of these, if any, yield the most stable, efficient communication protocols. in addition, we use training data that theoretically allow the agents to ignore one aspect of the images (e.g., the color of the object shown, or its size), so as to test whether the agents do ignore one feature and how implementation choices impact this behavior. to that end, we define four automatic metrics to probe syntactic and semantic aspects of their communication protocols; we believe them to be useful to future emergent communication studies, as the current agreed upon tool set for studying artificial emergent languages remains fairly narrow. these metrics help us assess what the emergent languages have in common and how they differ. we find that language-like characteristics can be driven by seemingly unrelated factors, and that ensuring the emergence of a reliable communication protocol that generalizes to held-out examples requires a careful consideration of how to implement the language game. the main contributions of this work are thus twofold: we report an exhaustive review of implementation choices, and we provide novel automated metrics to study the semantics of emergent communication protocols. we provide an overview of related works in section 2. dataset and game details are presented in section 3. we describe our implementation variants in section 4 and our automatic metrics in section 5. we discuss our results in section 6. ## related work the signaling game we study in this paper is derived of @xcite work; more specifically, we build upon the neural network formulation of @xcite using a symbolic channel @xcite @xcite . other formulations that we leave for future study involve multi-turn communication @xcite , populations and generations of agents (e.g., @xcite @xcite or non-symbolic communication channels (e.g., @xcite . there is a large prior body of research that investigate how specific implementation choices can impact the characteristics of the emergent communication protocol. for instance, @xcite advocate in favor of competition as an environmental pressure for learning composition by only rewarding the fastest of two teams in a multi-turn signaling game. @xcite mathematically demonstrate that the typical losses used to implement lewis games can be broken down in a information term and a co-adaptation term, and that limiting overfitting on the latter term experimentally leads to more compositional and generalizable protocols. @xcite discuss generalization, and how to induce it by modifying the signaling game to involve sets of targets, rather than unique targets per episode. @xcite study a navigation task to show how to foster interpretability, i.e., communication protocols that are grounded in agents' perceptions of their environment. rita et al. (2020) discuss how encouraging "laziness" in the sender and "impatience" in the receiver shapes the messages so as to exhibit zipfian patterns. @xcite use handcrafted languages to study word-order preferences of lstm-based agents. kim and oh (2021) discuss the importance of dataset size, game difficulty and agent population sizes. @xcite study how the visual components of signaling game agents can undermine the naturalness of their communication. @xcite propose a specific pretraining regimen to foster compositionality. another relevant section of the literature discusses automatic metrics designed to capture specific language-like aspects of the emergent protocol. chief of these is the meaning-form correlation (a.k.a. topographic similarity) of @xcite , which quantifies compositionality by measuring whether changes in form are commensurate with changes in meaning (though other metrics exist, e.g., @xcite . @xcite argue that this metric does not correlate with generalization capabilities, and that it is thus unsuitable for studying compositionality. @xcite show how it is impacted by other language-like features. following these remarks, we focus on novel metrics and defer discussions of topographic similarity to appendix b.1. ## experimental setup dataset. we construct a dataset of synthetic images depicting solids on gray backgrounds, using vpython. 1 they exhibit a combination of five features, each of which have two possible values: horizontal position (left, right), vertical position (top, bottom), object type (cube, sphere), object color (red, blue), object size (small, large). we generate 1000 images for each of the 2 5 possible combinations of feature values (or categories). we divide the dataset in two splits: a training split and an evaluation split. 2 this partition is performed as follows. first, one category is selected as the seed category. then, base categories are the 16 categories that differ from the seed category on exactly 0, 2 or 4 features. generalization categories are the 16 remaining categories, that differ from the seed category on exactly 1, 3 or 5 features. base category images are then further divided 80%-20% between training and evaluation splits. all generalization category images are assigned to the evaluation split. the training split therefore contains only images from base categories while the evaluation split contains both images from base categories and images from generalization categories. this partition of categories entails that that during training, all training instances involve image categories that differ by at least two features. hence, agents may entirely disregard one feature (e.g., color) and still manage to perfectly discriminate all training instances. only during evaluation are they confronted with pairs of categories that differ by a single feature: namely, when the original image is taken from a base category and the distractor image from a generalization one (or vice versa). game & model architecture. all of our models are comprised of two agents: a sender and a receiver. they are trained to solve a lewis signaling game with a single communication turn. the sender is first shown an image i and produces a message: a sequence of up to 10 symbols from an alphabet of size 16. the receiver is then provided as input a target image i ′ of the same category as i, a distractor image j of a different category, and the message, and has to identify i ′ as the intended target. this game is illustrated in figure 1 . the original image i differs from the target image i ′ so as to deter the sender from describing low-level features of the images (e.g., specific pixel brightness, @xcite . both agents contain an image encoder, implemented as a convolution stack, and an lstm to process symbols. the sender's lstm is primed with the encoded original image representation, and then generates the message. the receiver uses its lstm to convert the message into a vector; it then 2 we do one such split per model trained. computes the dot product between the message encoding and each of the target and distractor images encoding; we infer a probability distribution over the image pair using a softmax function. models are trained with reinforce @xcite ; the loss for an episode is defined as: ## implementation choices having described our basic setup above, we now list the different implementation variants that we study in the present paper. we refer to these implementation variants using a vector notation; for a binary trait φ, a model for which φ is implemented will be denoted as ⟨. . . , +φ, . . . , ⟩, conversely, its absence would be signaled with ⟨. . . , -φ, . . . , ⟩. ## automatic metrics communication efficiency. we primarily measure the performance of a model by its communication efficiency (c.e.), which we define as the average probability assigned by the model to the target image over a large number of evaluation instances. 5 evaluation instances involve all categories seen during training with additional categories as well (see section 3). to assess how the agents handle unseen combination of features at a finer level, we 5 communication efficiency differs from accuracy, defined as the proportion of evaluation instances for which the target image is assigned a higher probability than the distractor. accuracy can be maximal (100%) even with a very low communication efficiency (50 + ϵ%). low communication efficiency is a sign of sub-optimal performance, as an effective communication system should describe the target category unambiguously, i.e., the agents should solve the game with a high degree of confidence. in practice, we find these two values to be highly correlated in our experiments, suggesting our models are well calibrated @xcite . all of our metrics are generalized from single models to sets of models by computing their average across models (i) using, for each model, the value obtained during the evaluation phase in which it reaches its highest communication efficiency and (ii) discarding any model which never reaches a communication efficiency of 60% or above at any point of the training process. 6 any model that does reach a communication efficiency of 60% or above is said to be "successful". the convergence ratio (cvg.) of a set of models is the proportion of successful models in this set. abstractness. we task receivers with recognizing not the original image i shown to senders, but another target i ′ of the same category. this is meant to encourage senders to describe not so much the input image as its category. we evaluate this aspect using the abstractness of a model: semantic probes. in order to determine which features of the original/target category are described in a sender's message, we implement a probing method based on decision trees. we convert any message m into a bag-of-symbols vector @xmath0, such that u i is the number of occurrences of symbol i in m. given a set of messages each associated with its corresponding original/target category, for each of the five features, we can train a decision tree to predict the values of the feature based on the bag-of-symbols representation of the messages. while the messages may very well encode information under a form that cannot be decoded by such a simple system, high accuracy from a decision tree is proof that the corresponding feature is consistently described in the messages. foot_6 ## conclusions two broad conclusions emerge from our experiments. firstly, we saw that not all implementations perform equally well. we demonstrated how the use of a baseline term or an adversarial input sampling mechanism were necessary to reach high performance. while pretraining convolution stacks can prove beneficial in limited circumstances, not fine-tuning them afterwards may prove to be highly detrimental. in all, a well designed implementation can learn reliably and generalize to new images and combinations of features. secondly, we have made a case for the need of fine-grained methods when analyzing the emergent communication protocol. we have introduced an array of tools. among them, scrambling resistance were used to demonstrate that each symbol in our languages has semantic contribution independent from its position. decision trees based probes informed us that these symbols were put to use to systematically describe all but one of the input image's features, shape being constitently neglected though not entirely ignored despite the possibility we left open through the design of the training instances. these results also connect with design choices: for instance, we saw how entropy regularization and auto-encoder pretraining strengthened the prominence of shape in the messages. we next plan to experiment with a partition of categories between base and generalization that forces all features to be encoded in the messages, and then use decision trees and other methods to automatically describe the syntax and the semantics of the emergent communication protocols in simple terms, so as to better characterize how these protocols relate to natural language. we also plan to study the impacts of the semantic complexity of the input images on these emergent protocol, using a richer set of features and values, and using unlabeled real-world scenes. lastly, our findings will have to be confirmed in setups involving other games such as navigation tasks.