Reproduce the paper's comparison between a statistical person model and LLM persona agents.
Run the evaluation protocol against General Social Survey panel data.
Simulate how opinions spread through a partisan crowd using LLM or DeGroot models.
| umaraslam66/mirror | 0xallam/my-recipe | 0xhassaan/nn-from-scratch | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Python | Python | Python |
| Last pushed | — | 2022-11-22 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 4/5 |
| Audience | researcher | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires manually downloading GSS survey data and a partisan-crowds replication dataset from external sources before running.
Mirror is a research project and accompanying code release that tests how well AI language models can imitate a specific real person's survey answers, compared with a more traditional statistical approach. It uses real survey data from the long running General Social Survey along with a repeat of an earlier academic study on how opinions spread through partisan crowds. The main finding is that a small, purpose built statistical model that learns an embedding, a kind of numeric fingerprint, for each person turns out to predict that person's individual survey answers more accurately than having a language model play the role of that person through a written persona, even when using a strong, more expensive model. Language model personas do better in two other situations though: answering brand new questions the models were never trained on, and modeling how opinions shift inside a simulated crowd of people influencing each other, where they outperform a classic mathematical model of social influence. All of the results are checked against accuracy targets set before the tests were run, and results that did not support the researchers' hopes are reported alongside the ones that did. The repository contains the full data processing pipeline, the evaluation code, the statistical and neural models being compared, the code for generating and testing personas, and scripts to reproduce every experiment in order, starting with a script that fixes the random data split used for testing. Running it requires Python 3.12, and the neural network training step can run on a CUDA GPU, an Apple GPU, or plain CPU automatically depending on what is available. Since the underlying survey data is not owned by the project, you need to separately download it from the two original sources named in the instructions before the processing scripts will work. The written paper describing the study is included as a PDF, and the code is released under the MIT license.
Mirror is a research codebase showing a small statistical person model predicts individual survey answers better than LLM personas, while LLMs win at zero-shot questions and crowd influence.
Mainly Python. The stack also includes Python, PyTorch, CUDA.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.