Project Info
Artificial intelligence is increasingly used to make high-impact decisions in hiring, lending, healthcare, education, and public services. While these systems improve efficiency, they can also inherit and amplify historical bias hidden within training data. Well-known examples, such as biased hiring algorithms and unfair criminal risk assessment systems, highlight the importance of auditing AI before deployment. Existing fairness toolkits are powerful but primarily target machine learning practitioners, often exposing statistical outputs that are difficult for non-technical users to interpret. EquiLens-AI was inspired by a simple question: What if anyone—an NGO worker, teacher, policymaker, or student—could audit AI systems for fairness without needing a data science degree? Our goal was to democratize AI fairness by combining explainable AI, fairness metrics, and natural-language explanations into one accessible platform. EquiLens-AI is an open-source AI fairness auditing platform that detects, explains, and helps mitigate algorithmic bias in datasets. Users simply upload a CSV dataset, select a target column and one or two sensitive attributes, and EquiLens-AI generates a complete fairness report. Features Upload CSV datasets Compute fairness metrics: Statistical Parity Difference (SPD) Disparate Impact (DI) Equalized Odds (EO) Statistical Parity Difference (SPD) Disparate Impact (DI) Equalized Odds (EO) SHAP-based explainability Intersectional fairness analysis Audience-aware AI explanations (NGO, Student, Policymaker) Interactive "What-if" simulator Downloadable PDF audit reports Compliance guidance (EEOC, GDPR, EU AI Act) Fairness Metrics Statistical Parity Difference $$ SPD = P(\hat{Y}=1|A=a)-P(\hat{Y}=1|A=b) $$ where $\hat{Y}$ is the predicted outcome $A$ is the sensitive attribute Disparate Impact $$ DI=\frac{P(\hat{Y}=1|A=a)}{P(\hat{Y}=1|A=b)} $$ Values below $$ DI < 0.8 $$ may indicate potential discrimination under the EEOC 4/5ths rule. Equalized Odds We compare both $$ TPR $$ and $$ FPR $$ between protected groups. A large difference indicates unequal model performance across demographics. Backend FastAPI Python 3.12 Pandas NumPy Scikit-learn SHAP ReportLab Frontend HTML CSS JavaScript Chart.js AI Layer Gemini 2.5 Flash Workflow Upload dataset Parse CSV Train Random Forest model Compute fairness metrics Generate SHAP explanations Perform intersectionality analysis Generate AI explanations Produce PDF audit report The backend exposes REST APIs that power an interactive dashboard, while Gemini converts statistical outputs into audience-specific explanations that anyone can understand. One of the biggest challenges was implementing fairness metrics that worked reliably across different datasets while supporting both numerical and categorical labels. Building intersectionality analysis was especially challenging because many subgroup combinations contain very few samples. We introduced minimum sample thresholds to prevent misleading conclusions. Another challenge was balancing explainability and performance. SHAP can be computationally expensive, so we optimized our workflow to keep response times practical while still providing meaningful explanations. Finally, translating statistical fairness metrics into plain language without oversimplifying the results required careful prompt engineering and fallback mechanisms when the AI API was unavailable. We're proud that EquiLens-AI delivers much more than a fairness calculator. Highlights include: End-to-end AI fairness auditing Real intersectionality analysis SHAP explainability Audience-specific AI explanations Interactive What-if simulator Professional PDF audit reports Automatic dataset column detection Open-source implementation Clean, intuitive dashboard for non-technical users Most importantly, we built a platform that lowers the barrier to responsible AI by making fairness auditing accessible beyond data scientists. This project taught us that responsible AI is as much about communication as it is about algorithms. While implementing fairness metrics required a solid understanding of machine learning, the real challenge was presenting those results in a way that users could actually understand and act upon. We also gained valuable experience with: FastAPI backend architecture Explainable AI using SHAP Fairness evaluation methodologies REST API design Interactive data visualization Prompt engineering for AI-assisted explanations Building production-ready ML applications Our roadmap includes several major improvements: Additional fairness metrics Bias mitigation algorithms Real-time monitoring for deployed models Image, text, and multimodal model support Team collaboration workspaces Automated compliance reporting Cloud deployment with authentication Mobile-responsive interface Model versioning and audit history API integrations with popular ML workflows Our long-term vision is to make EquiLens-AI a comprehensive fairness platform that enables organizations to build trustworthy AI systems from development through deployment.
EquiLens AI
AI-powered bias detection for non-technical users
"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."
The Problem
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.
The Solution
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.
How It Works
- 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
Real User Story
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.
Tech Stack
| 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 |
Fairness Metrics
| 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 |
What Makes EquiLens Different
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 |
Setup
git clone https://github.com/CheerathAniketh/EquiLens-AI
cd EquiLens-AI/backend
pip install -r requirements.txt
Create a .env file in the backend/ folder:
GEMINI_API_KEY=your_api_key_here
Run the server:
uvicorn main:app --reload
Open http://127.0.0.1:8000 in your browser.
What's Built
Backend
- 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
Frontend
- 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
What's Pending
- 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)
License
MIT
Analysis
View
Metric
No commits on this project resolved to a GitHub account.
Technology
- FastAPIIn code
- HTMLIn code
- PythonIn code
- LangChainClaimed
3 of 4 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
145 KB
Source files
10
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
CheerathAniketh/EquiLens-AI
24 files · 5.6 MB · @ 046eca9
Structure
Interface
1 file · 4%Screens, components and styles rendered to the user.
Application logic
14 files · 58%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- HTML56%
- Python40%
- Markdown4%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/requirements.txt
pypi · 12- fastapi
- google-genai
- joblib
- numpy
- pandas
- pydantic
- python-dotenv
- python-multipart
- reportlab
- scikit-learn
- shap
- uvicorn
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.