"Amazon's hiring AI downgraded women's CVs. COMPAS flagged Black defendants at 2× the rate. These failures could have been caught. EquiLens catches them."
AI makes life-changing decisions about jobs, loans, and healthcare. When trained on biased historical data, these systems don't just repeat discrimination — they amplify it at scale, silently, with no accountability.
EquiLens gives any organization — NGO, school, small business — the ability to audit their data for bias before it causes harm. No data science degree required.
- Upload your CSV dataset
- Select your target column and sensitive attribute
- Optionally select a second sensitive attribute for intersectional analysis
- EquiLens computes SPD, Disparate Impact, and Equalized Odds
- SHAP explains which features are driving bias
- Gemini translates everything into plain language
- Intersectionality heatmap reveals compounded disadvantage across identity combinations
- What-if simulator lets you drop features and measure bias impact in real time
- Download a full PDF audit report
Priya runs an NGO in Pune distributing scholarships. She uploads her dataset, selects gender as the sensitive attribute and caste as the intersect. She discovers that lower-caste girls are approved at 8% — far below the 34% rate for upper-caste boys. A Disparate Impact of 0.24, well below the legal threshold of 0.8. Gemini explains this in plain language and suggests fixes. Priya downloads the audit report and shares it with her board. All in under 5 minutes.
| Layer | Technology |
|---|---|
| Backend | FastAPI (Python 3.12) |
| Bias Metrics | SPD, Disparate Impact, Equalized Odds |
| Explainability | SHAP (TreeExplainer) |
| AI Layer | Gemini 2.5 Flash |
| Frontend | HTML / CSS / JS + Chart.js |
| PDF Export | ReportLab |
| Deployment | Render |
| Metric | Threshold | Meaning |
|---|---|---|
| Disparate Impact | < 0.8 = biased | Legal standard (EEOC 4/5ths rule) |
| Statistical Parity Difference | > 0.1 = biased | Outcome gap between groups |
| Equalized Odds | > 0.1 = biased | Error rate gap between groups |
Every existing tool — IBM AI Fairness 360, Fairlearn, Aequitas — outputs p-values and confusion matrices that only data scientists can interpret. EquiLens translates those results into plain language tuned to who's reading:
| Audience | Output |
|---|---|
| NGO worker | Policy implication |
| Student | Learning-oriented explanation |
| Policy maker | Legal risk framing |
git clone https://github.com/CheerathAniketh/EquiLens-AI
cd EquiLens-AI/backend
pip install -r requirements.txtCreate a .env file in the backend/ folder:
GEMINI_API_KEY=your_api_key_hereRun the server:
uvicorn main:app --reloadOpen http://127.0.0.1:8000 in your browser.
- FastAPI server with CORS middleware and multi-user session management
- CSV upload and parsing via
/analyzeendpoint - Bias metrics computed locally: SPD, Disparate Impact, Equalized Odds (real TPR/FPR per group)
- SHAP feature importance via
explainer.py - Model training and evaluation via
trainer.py(RandomForest, ROC + calibration curves) - Gemini 2.5 Flash for plain-language explanations with audience toggle
- Graceful fallback when Gemini quota is exhausted or API key is missing — dynamic, not hardcoded
- Fallback responses marked with
*so developers know Gemini is offline - Smart label decoding: encoded columns (0/1/2...) mapped to human-readable names
- String target column support (
yes/no,hired/rejected,>50K/<=50K) - Real intersectionality via
compute_intersectionality()— every (col1 × col2) subgroup pair - Cells with fewer than 10 samples excluded and marked null to avoid misleading statistics
- Real Equalized Odds via
compute_eod()— true TPR/FPR difference per group /whatifendpoint — retrains model on reduced feature set, measures bias delta/whatif/featuresendpoint — returns available features from cached session- PDF audit report via ReportLab — verdict banner, metric scorecards, SHAP bars, Gemini explanation, regulation compliance table
- Single-page app with sidebar navigation and landing page
- Overview: score cards (DI, SPD, severity), approval rate chart, group comparison table
- Fairness metrics: metric bars, calibration curve, ROC by group — labeled with real group names
- Explainability: SHAP feature importance bars with proxy variable detection
- Intersectionality: real heatmap from backend + subgroup table ranked worst → best
- Remediation: before/after radar charts, recommended steps
- Audit report: structured findings + copy-to-clipboard + PDF download
- Demo presets: Hiring / Credit / Healthcare with one click
- Auto-detects target and sensitive columns from CSV headers
- Drag-and-drop CSV upload
- Audience toggle (NGO / Student / Policy maker)
- Regulation compliance pills (EEOC, EU AI Act, GDPR)
- What-if simulator: feature checkboxes, before/after radar, delta cards, Gemini explanation
- Audience toggle re-fetches explanation without re-uploading CSV
- Intersectionality: sample size tooltip on sparse cells
- Mobile responsive layout
- Loading skeletons instead of spinner
- Inline error messages instead of
alert()popups - Environment variable management for production (
.env→ Cloud Secrets)
MIT