How is0383kk/symbolemergence-vae-gmm works
Project type and purpose
• This is a Python-based deep learning research project (not a web or microservice app). It implements an emergent-communication “naming game” between two agents, each represented by a VAE (Variational Autoencoder) and a GMM (Gaussian Mixture Model), using the Metropolis-Hastings algorithm. The goal is to train the agents on MNIST images so that they converge on shared symbolic representations.
File structure
• Top-level files:
• main.py → Orchestrates data loading, VAE training for both agents, the MH naming game loop, and metrics logging.
• cnn_vae_module_mnist.py → Defines the PyTorch VAE modules (encoder/decoder) tailored for MNIST (convolutional layers).
• recall_image.py → After training, loads stored GMM means and uses each agent’s VAE decoder to reconstruct (“recall”) images.
• tool.py → Utility functions (data loaders, metric calculators, model save/load routines).
• No external microservices or frontend/backend layers—this is a self-contained ML pipeline.
Key insights from the README
• Two agents (A and B), each with VAE → Estimates latent z^A and z^B.
• Each agent clusters z via GMM to obtain discrete variables w^A/w^B.
• Agents alternately “speak” proposals of w and “listen” via Metropolis-Hastings accept/reject.
• Iterative loop: VAE training → proposal → MH decision → GMM/VAE-prior update → back to training.
• Outputs: ARI and Kappa scores, reconstructed images for qualitative analysis.
Detail
• Two parallel branches for Agent A and Agent B