EquiLens
Black-box bias detection for local language models.
A bias-auditing framework that probes any Ollama-compatible language model purely through its input/output interface, with no access to weights. It generates demographically paired prompts, runs them concurrently against a local model, and reports statistically analysed differences in the responses.
Built with
Highlights
- ▸Audits models through prompts alone, so it works on any Ollama-compatible model without weight access or a cloud API.
- ▸Uses a prompt-pair method in which only the demographic variable changes between two otherwise identical prompts.
- ▸Runs the whole pipeline locally, so neither the prompts nor the model's responses leave the machine.
- ▸Resumable concurrent auditing with checkpointing, so a long run survives an interruption instead of restarting.
- ▸Published on Zenodo with a citable DOI and a one-command Docker deployment for reproducibility.
Why black-box
Most bias tooling assumes either model weights or a cloud API, and small local models give you neither in practice — the weights are available but the tooling around them is not, and sending evaluation prompts to a third party defeats the point of running locally. Probing through the same interface an application uses means the audit measures what a deployment would actually see.
The three phases
- ▸Corpus generation — a JSON specification of names, professions and trait templates expands into demographically balanced prompt pairs.
- ▸Model auditing — the corpus is run concurrently against an Ollama-hosted model, with retry and checkpoint resume.
- ▸Statistical analysis — paired responses are scored and tested, rather than eyeballed.