Don't just flag bias.
Locate it. Explain it. Fix it.¶
UnBias-Plus (unbias-plus) is an open-source Python package for bias detection and debiasing in text. Every flag returns the exact phrase, the bias type, a severity rating, a 1–2 sentence rationale, and a neutral rewrite — as a structured, validated object you can drop into any pipeline.
See it on one example¶
Input
The senator's reckless tax scheme will devastate working families, and everyone knows the opposition always caves at the last minute.
Neutral rewrite
The senator's proposed tax plan will significantly affect working families, and commentators have noted the opposition has often changed its position late in negotiations.
high · loaded language "reckless tax scheme" — emotionally charged framing presents the policy as inherently irresponsible before any analysis.
high · loaded language "devastate" — catastrophizing verb implies certainty of severe harm.
medium · framing "everyone knows" — appeal to consensus presents an unsupported claim as common knowledge.
medium · framing "always" — universal quantifier turns a tendency into an inevitability.
Three capabilities, one output¶
-
Detect
Pinpoint biased phrases at the character level. Each segment ships with
startandendoffsets, ready for a highlighter, an annotator, or a diff renderer. -
Explain
Every segment carries a bias type, a severity, and a 1–2 sentence rationale. No black-box flag — every decision is auditable.
-
Rewrite
Get a neutral replacement per segment, plus a full rewritten version of the input. Factual content preserved; framing neutralized.
Try it in 30 seconds¶
For setup details, deployment patterns, and advanced usage, see the User Guide.
Where teams use it¶
-
Newsrooms and editors
Pre-publication checks for loaded framing, sensationalism, and politically charged terminology, with the exact phrases flagged.
-
Researchers and educators
Build datasets, study framing effects, or teach media literacy with concrete annotated examples and reasoning trails.
-
Trust and safety teams
Triage user-generated content with structured signals: segment offsets, types, and rationales, instead of opaque scores.
-
ML and NLP teams
A reproducible bias-analysis stage for evaluation pipelines, RAG content systems, or LLM output guardrails.
Walkthroughs¶
Tours of the demo UI you get when you run unbias-plus --serve:
Silent walkthrough ·
Voiced walkthrough
Continue exploring¶
-
The pipeline: prompt → fine-tuned model → parser → validated
BiasResult. -
Install, CLI, REST API, Python API, and development setup.
-
Auto-generated reference for every public class and function in
unbias_plus. -
Privacy, supported languages, training data, scope, and limitations.
About¶
Shaina Raza, PhD, Ahmed Y. Radwan, and Amrit Krishnan — AI Engineering team at the Vector Institute.
The toolkit is released under the Vector Institute License.
For questions, collaboration, or licensing inquiries: shaina.raza@vectorinstitute.ai. For bug reports and feature requests: GitHub Issues.
Acknowledgements
Resources used in preparing this research are provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute. This research is also supported by the European Union's Horizon Europe research and innovation programme under the AIXPERT project (Grant Agreement No. 101214389).