Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinguaGame

Official implementation of LinguaGame: A Linguistically Grounded Game-Theoretic Paradigm for Multi-Agent Dialogue Generation (Findings of ACL 2026).

LinguaGame is research software for studying strategic communication in simulated multi-agent dialogue. The courtroom demo is not a legal decision-making system and must not be used as legal advice.

LinguaGame overview

Quick Links

Overview

LinguaGame treats each dialogue turn as a signalling game over communicative intents and strategies. A sender proposes candidate utterances, a receiver infers their latent intent and strategy, and a training-free equilibrium approximation adjusts the utterance distribution before the next turn is selected.

This release contains the courtroom simulation and the PiKL-style signalling-game solver. It uses AutoGen 0.2 with an OpenAI-compatible chat-completions endpoint, including a local vLLM server.

Repository Structure

.
├── data/                    # Constructed courtroom inputs and documentation
├── figs/                    # README assets
├── scripts/                 # Runnable entry points
├── src/linguagame/          # Source code
├── LICENSE
└── requirements.txt

Environment Setup

Python 3.10 or 3.11 is recommended.

conda create -n linguagame python=3.10 -y
conda activate linguagame
pip install -r requirements.txt

The code uses AutoGen 0.2 over the standard OpenAI-compatible Chat Completions API. Configure the endpoint with environment variables.

export LINGUAGAME_MODEL="Qwen/Qwen2.5-32B-Instruct"
export LINGUAGAME_BASE_URL="http://localhost:8000/v1"
export LINGUAGAME_API_KEY="EMPTY"  # local servers only

For a hosted endpoint, set LINGUAGAME_BASE_URL and LINGUAGAME_API_KEY to the values provided by that service. The endpoint must support logprobs and top_logprobs.

For logprob access, this release uses a small adapter around AutoGen's OpenAIWrapper.create; agent construction, ordinary reply generation, system-message updates, and usage accounting remain handled by ConversableAgent.

Data Preparation

The courtroom input used by this release is data/case_constructed.50.jsonl. It contains 50 JSON Lines records with an index and a constructed case_info string. The runner passes only case_info to the agents; it does not expose the outer record or any raw judgment fields.

The loader also accepts a JSON object or array for custom inputs. A minimal fictional example is provided at data/example_case.json.

The constructed dataset applies case-local name pseudonyms; masks the month and day in birth dates; masks numeric door numbers in address fields; and replaces identity-card and telephone values with explicit anonymisation markers. This remains limited anonymisation rather than complete de-identification because place names and other contextual details are retained. Confirm redistribution rights and complete the required privacy, ethics, and institutional review before publishing it. See data/README.md.

Run the Courtroom Demo

Start an OpenAI-compatible model server first. For example, with vLLM installed separately:

vllm serve Qwen/Qwen2.5-32B-Instruct --port 8000

Then run one fictional case:

python scripts/run_courtroom.py \
  --input data/case_constructed.50.jsonl \
  --output-dir outputs/courtroom \
  --case-index 0 \
  --max-turns-per-section 40

Useful options:

  • --selection-method generator: select from the sender's equilibrium policy (paper default).
  • --selection-method discriminator_intent: select using the receiver's intent posterior.
  • --selection-method discriminator_strategy: select using the receiver's strategy posterior.
  • --verbose: print intermediate signalling-game distributions.

Each run writes history.json, game.json, and conversation.txt below the output directory.

Experiments and Reproducibility

The paper uses Qwen2.5-32B with three candidate utterances, w=0.5 (or 1.0 for intents without strategies), KL regularisation weights of 0.1, learning rates of 0.1, and 5,000 equilibrium-approximation steps. These defaults are implemented in src/linguagame/signaling_game.py and src/linguagame/game_flow.py.

Citation

@inproceedings{ye-etal-2026-linguagame,
  title     = {{L}ingua{G}ame: A Linguistically Grounded Game-Theoretic Paradigm for Multi-Agent Dialogue Generation},
  author    = {Ye, Yuxiao and Zhang, Yiming and Ma, Yiran Rex and Xie, Huiyuan and Zhu, Huining and Liu, Zhiyuan},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
  month     = jul,
  year      = {2026},
  address   = {San Diego, California, United States},
  publisher = {Association for Computational Linguistics},
  url       = {https://aclanthology.org/2026.findings-acl.1028/},
  doi       = {10.18653/v1/2026.findings-acl.1028},
  pages     = {20544--20558}
}

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages