What it does
FairLens lets users inspect datasets or model outputs for group-wise outcome differences.
Case Study
FairLens helps analyze datasets and model outputs for possible unfairness by comparing outcomes across sensitive attributes and generating AI-assisted explanations.
Overview
FairLens lets users inspect datasets or model outputs for group-wise outcome differences.
It was built as an MVP to make bias checks more approachable for small teams and learners.
It is useful for students, developers, and early-stage teams exploring fairness in ML tools.
Problem
ML systems can produce unfair outcomes when different groups receive different results.
Many beginners and small teams do not have an easy way to inspect bias in datasets or predictions.
FairLens was built as a simple MVP to make fairness analysis more understandable.
My Contribution
Key Features
Users can bring their own CSV or try the flow with a demo dataset.
The UI guides users to choose the group attribute used for comparison.
Target and optional prediction columns define the analysis mode.
The backend computes group-wise rates to make outcome differences visible.
Charts turn the computed metrics into easier-to-scan comparisons.
Gemini-assisted summaries explain what the results may suggest.
The output is written for clarity instead of assuming ML expertise.
Technical Approach
System Architecture
The architecture combines a Next.js frontend, FastAPI backend, fairness analysis engine, and Gemini-powered explanation pipeline.
Challenges & Fixes
Invalid column combinations
Added validation for target, sensitive, and prediction columns.
Prediction column confusion
Made prediction optional and handled dataset vs model mode clearly.
AI insight failures
Added fallback messages and improved timeout/model configuration.
Chart edge cases
Handled all-zero and single-group scenarios.
Deployment fetch issues
Documented frontend/backend integration limitations.
What I Learned
Future Improvements
Explore More