Abstract
Eugene Kharitonov, Rahma Chaabouni, Diane Bouchacourt, Marco Baroni. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP): System Demonstrations.
2019.
Introduction
In the pursuit of artificial intelligence that can interact naturally, researchers are increasingly exploring how agents might develop human-like language through game-theoretic interactions. However, simulating the emergence of language presents significant technical challenges. Language is inherently discrete, while standard deep learning relies on continuous gradients for optimization. To bridge this gap, researchers must employ specialized techniques like Reinforcement Learning (REINFORCE) or differentiable relaxations like Gumbel-Softmax. Implementing these from scratch is error-prone and creates a high barrier to entry for researchers in fields such as cognitive science or linguistics.
EGG (Emergence of lanGuage in Games) is a PyTorch-based toolkit designed to address these challenges. It provides modular "building blocks" that handle the complex mathematics of discrete communication, allowing researchers to focus on the science of language evolution rather than low-level optimization plumbing.
Modular Architecture
EGG introduces a "hackable" architecture centered on three main entities:
- Sender and Receiver: Users define the internal architectures of the agents (e.g., CNNs or simple linear layers).
- Wrappers: These encapsulate the agents and handle the communication channel and optimization logic. This design allows a user to switch from a single-symbol message to a variable-length sequence, or from REINFORCE to Gumbel-Softmax, by simply changing the wrapper.
- Game and Trainer: These modules manage data flow, loss calculation, and the training loop, including checkpointing and visualization support.
By decoupling the agent's internal logic from the communication method, EGG enables rapid prototyping and experimentation with diverse game setups.
Case Study: MNIST Communication Game
The paper demonstrates the toolkit's efficacy using an MNIST-based autoencoding game. In this task, a "Sender" observes an MNIST digit image and must transmit a message to a "Receiver." The Receiver's goal is to reconstruct the original image based solely on that message. In the experimental setup, agents utilized a vocabulary of 10 symbols and a maximum message length of two symbols.
Results and Key Insights
After training with REINFORCE for 15 epochs, the agents developed a clear, structured communication protocol. Analysis of the emergent messages revealed several key patterns:
- Semantic Mapping: The first symbol in a two-symbol message typically denoted the digit's identity (e.g., a specific symbol consistently represented the digit '1').
- Attribute Encoding: The second symbol often encoded stylistic variations, such as the rotation angle or orientation of the digit.
- Efficiency: Agents learned to optimize the channel, for instance, by ignoring the second symbol when the first symbol was an "end-of-sequence" token.
These results highlight EGG's ability to facilitate the study of how structured communication can emerge from simple interaction goals.
Conclusion and Future Work
EGG lowers the floor for entry into emergent communication research while raising the ceiling for complexity. While the initial version focused on unidirectional, single-step games, future development aims to support multi-directional dialogues and provide advanced tools for analyzing the compositionality of emergent languages. The toolkit continues to expand its library of pre-implemented games to serve as a reference for the research community.
Summary updated