BEACOF: Belief-Driven Multi-Agent Collaboration

January 21, 2026 ยท View on GitHub

Conference License Python

Official implementation for the paper: > Belief-Driven Multi-Agent Collaboration via Approximate Perfect Bayesian Equilibrium for Social Simulation > Weiwei Fang, Lin Li, Kaize Shi, Yu Yang, and Jianwei Zhang > The Web Conference (WWW) 2026


๐Ÿ“– Overview

High-fidelity social simulation demands agents capable of authentically replicating the dynamic spectrum of human interaction. Current Multi-Agent Systems (MAS) often adhere to static interaction topologies, leading to "groupthink" (in pure cooperation) or deadlocks (in pure competition).

BEACOF (Belief-Driven Adaptive Collaboration Framework) is a novel framework that models social interaction as a dynamic game of incomplete information. Inspired by Approximate Perfect Bayesian Equilibrium (PBE), BEACOF enables agents to:

  1. Maintain Beliefs: Iteratively refine probabilistic beliefs about peer capabilities based on interaction history.
  2. Adaptive Strategy: Autonomously switch between Cooperation, Competition, and Coopetition (collaborative competition).
  3. Ensure Rationality: Make sequentially rational decisions under uncertainty without needing full information.

image-20260121145346282


๐Ÿš€ Key Features

  • Dynamic Strategy Switching: Agents are not fixed to a single role; they transition dynamically between cooperative knowledge synthesis and competitive critical reasoning.
  • Gaussian Belief Updates: Implements a tractable parametric Bayesian update mechanism with a forgetting factor to track non-stationary peer capabilities.
  • Meta-Agent Coordination: A centralized coordinator estimates contextual payoffs and evaluates message quality to drive belief evolution.
  • Multi-Scenario Generalization: Validated across three distinct social interaction archetypes:
    • โš–๏ธ Adversarial: Judicial/Court Debate.
    • ๐Ÿฅ Mixed: Medical Q&A (MedQA).
    • ๐Ÿ—ฃ๏ธ Open-Ended: Persona-based Social Chat.

๐Ÿ› ๏ธ Installation

Prerequisites

  • Python 3.9+
  • Ollama (for local LLM inference as described in the paper)

Setup

  1. Clone the repository

    git clone [https://github.com/WUT-IDEA/BEACOF.git](https://github.com/WUT-IDEA/BEACOF.git)
    cd BEACOF
    
  2. Install dependencies

    pip install -r requirements.txt
    
  3. Model Setup (Ollama) Ensure you have the backbone models pulled via Ollama. We utilize the following models in our experiments:

    ollama pull llama3.1
    ollama pull gemma2:9b  # (Check specific tag for Gemma3 equivalent)
    ollama pull qwen2.5:32b # (Check specific tag for Qwen3 equivalent)
    

๐Ÿ“‚ Project Structure

BEACOF/
โ”œโ”€โ”€ data/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ AgentsCourt/
โ”‚   โ”œโ”€โ”€ mechanism/
โ”‚   โ””โ”€โ”€ prompts/
โ”‚	โ”œโ”€โ”€ interaction.py                 # Entry point for simulations
โ”‚	โ””โ”€โ”€ ollama.py
โ””โ”€โ”€ README.md

๐Ÿƒ Usage

You can run simulations for different scenarios using main.py.

Start Simulation

# 1. Court Debate Simulation
python main.py court

# 2. Medical Consultation Simulation
python main.py medqa

# 3. Daily Chat Simulation
python main.py persona

๐Ÿงฉ Methodology Highlights

The Loop

  1. Payoff Generation: The Meta-Agent generates contextual payoffs UtU_t based on interaction history.
  2. Action Prediction: Probability distributions over collaboration types are predicted.
  3. Strategic Action: Participant agents calculate an approximate Best Response (ciโˆ—c_i^*) maximizing expected utility.
  4. Belief Update: Agents update Gaussian beliefs about peers using the evaluation ejte_j^t and confidence ฯ‰\omega, modulated by a forgetting factor ฮป\lambda.

Equation: Belief Update

bit(j)=ฯ‰itโˆ’1(j)โ‹…bitโˆ’1(j)+ฯ‰jtโ‹…ejtฯ‰itโˆ’1(j)+ฯ‰jtb_{i}^{t}(j) = \frac{\omega_{i}^{t-1}(j) \cdot b_{i}^{t-1}(j) + \omega_{j}^{t} \cdot e_{j}^{t}}{\omega_{i}^{t-1}(j) + \omega_{j}^{t}}


๐Ÿ“ Citation

If you find this code or our paper useful, please cite:

@inproceedings{fang2026beacof,
  title={Belief-Driven Multi-Agent Collaboration via Approximate Perfect Bayesian Equilibrium for Social Simulation},
  author={Fang, Weiwei and Li, Lin and Shi, Kaize and Yang, Yu and Zhang, Jianwei},
  booktitle={Proceedings of the ACM Web Conference 2026 (WWW '26)},
  year={2026},
  publisher={ACM},
  address={Dubai, United Arab Emirates}
}

๐Ÿ“ง Contact

For any questions, please contact:

  • Weiwei Fang: 311137@whut.edu.cn
  • Lin Li: cathylilin@whut.edu.cn