| ๐ Team | ๐ฏ Focus | ๐ค๏ธ Track | ๐ Impact |
| MASSIVE-X | AI Fairness & Responsible AI | Unbiased AI Decision-Making | SDG 10 & SDG 16 |
FairForge Arena is an enterprise-grade AI Fairness Training Gym โ a complete platform to detect, measure, explain, and automatically eliminate hidden algorithmic bias before it impacts real people's lives.
[!NOTE] โ๏ธ Deployment Notice โ Due to a temporary Google Cloud billing issue, FairForge Arena is deployed on Vercel for fast and reliable access. It is built with a cloud-native architecture and is fully ready for scalable deployment on Google Cloud (Cloud Run + Vertex AI).
- ๐ UN SDG Alignment
- โจ Key Features
- ๐ The FairForge Workflow
- ๐๏ธ System Architecture
- ๐ป Technology Stack
- ๐ Project Structure
- โ๏ธ Quick Start
- ๐ Results & Impact
- ๐ฎ Future Roadmap
- ๐ License
| ย ย ย ย ย ย SDGย ย ย ย ย ย | Goal | How FairForge Helps |
|---|---|---|
| ๐ SDG 10 | Reduced Inequalities | Prevents algorithmic discrimination against marginalized groups in high-stakes automated decisions โ hiring, lending, healthcare diagnosis โ ensuring equal treatment regardless of race, gender, or age. |
| ๐ต SDG 16 | Peace, Justice & Strong Institutions | Delivers transparent, auditable, and explainable AI governance through automated compliance reporting, cryptographic audit trails, and EU AI Act-aligned documentation. |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FAIRFORGE ARENA โ CAPABILITIES โ
โ โโโโโโโโโโโโโโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ ๐ DETECT โ Intersectional Bias Heatmap (gender ร race ร age) โ
โ ๐ MEASURE โ 7+ Fairness Metrics | Auto-detect protected attributes โ
โ ๐ฉ FLAG โ Real-Time Drift Monitoring | Automated Alerts โ
โ ๐๏ธ TRAIN โ PPO RL Agent | Live Training Curves โ
โ โก FIX โ One-Click Mitigation Controls | Instant Impact View โ
โ ๐ค EXPLAIN โ Gemini Counterfactual XAI | Plain-English Decisions โ
โ ๐ต๏ธ SCAN โ Shadow AI Scanner | LLM Usage Detection in Text โ
โ ๐ COMPLY โ EU AI Act PDF Reports | EEOC Four-Fifths Rule โ
โ ๐ SECURE โ Hash-Chained Integrity Trail | Tamper-Proof Logs โ
โ ๐ BENCHMARK โ GPT-4o | Claude 3.5 | Gemini 1.5 | Llama 3.1 | Mistral โ
โโโโโโโโโโโโโโโโโโโโฉโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ=โโโโโ
๐ Intersectional Bias Heatmap
Visualize bias across intersecting demographic dimensions โ gender ร race ร age โ in a single color-coded heatmap. Instantly spot which specific subgroup combinations are most impacted by discriminatory model behavior.
๐๏ธ PPO Reinforcement Learning Arena
An active training gym powered by Stable-Baselines3 PPO that trains biased models against adversarial fairness constraints. The RL reward function mathematically optimizes the trade-off:
Reward = ฮฑยทAccuracy โ ฮฒยท|Disparate Impact โ 1| โ ฮณยทStatistical Parity Diff
Watch the agent improve fairness in real-time through live training curves.
๐ค Gemini Counterfactual Explainer
Powered by Google Gemini API via Vertex AI, this engine ingests fairness metrics and model decisions to generate plain-English "What-If" scenarios:
"If the applicant's age was 5 years older, their loan approval probability increases by 12%."
Makes complex algorithmic decisions understandable for compliance officers and business stakeholders.
๐ต๏ธ Shadow AI Scanner
Detect undisclosed LLM usage in any text by analyzing structural patterns, sentence rhythms, and LLM-specific phraseology. Crucial for organizations managing AI governance and disclosure requirements.
๐ Integrity Trail
Every audit action is stored in a cryptographically hash-chained log (each event contains the hash of the previous), making tampering mathematically detectable. Your audit trail is as secure as a blockchain.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FAIRFORGE ARENA WORKFLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ UPLOAD โ โโโโถโ AUDIT โ โโโโถ โ MITIGATE โ โโโโถโ EXPLAIN โ โโโโถ โ EXPORT โ
โ โ โ โ โ โ โ โ โ โ
โ Dataset โ โFairness โ โFix Bias โ โ Gemini โ โEU AI Act โ
โ Model โ โ Check โ โ(RL+Fixes)โ โ XAI โ โ PDF โ
โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ
โ โ โ โ โ
โผ โผ โผ โผ โผ
โข Auto-detect โข 7 Metrics โข Reweight โข Counterfactual โข EU AI Act
schema โข Heatmap โข Drop Proxy What-If โข Audit Logs
โข Protected โข Violations โข Threshold โข Plain-English โข Risk Docs
attributes Panel โข PPO Training Answers โข Compliance
| # | Phase | Action | Outcome |
|---|---|---|---|
| 1 | ๐ MEASURE | Upload dataset/model โ auto-compute Disparate Impact, Demographic Parity, Equal Opportunity, Intersectional Bias | Know exactly where bias exists and how severe it is |
| 2 | ๐ฉ FLAG | Real-time drift monitoring, adversarial stress-testing, edge-case probing | Catch bias before it reaches production |
| 3 | โก FIX | One-click mitigation (reweighting, proxy removal, threshold tuning) + PPO RL training | Mathematically reduce bias with minimal accuracy cost |
| 4 | ๐ค EXPLAIN | Gemini counterfactuals, What-If explorer, natural language decision explanations | Make fairness legible for every stakeholder |
| 5 | ๐ COMPLY | Generate EU AI Act / EEOC-compliant PDFs, tamper-proof audit trail | Pass regulatory review with confidence |
graph TB
subgraph Users ["๐ฅ USERS"]
DS["๐งโ๐ป Data Scientist"]
CO["๐ Compliance Officer"]
BS["๐ผ Business Stakeholder"]
end
subgraph Frontend ["๐ฅ๏ธ FRONTEND โ Tailwind CSS + Plotly.js + Glassmorphism"]
UI["Interactive Dashboard SPA"]
HM["Bias Heatmap"]
TC["Training Curves"]
WI["What-If Explorer"]
end
subgraph Backend ["โ๏ธ BACKEND โ FastAPI (Python)"]
API["REST API + WebSocket Routes"]
FM["Fairness Metrics Engine\n(7+ Metrics)"]
PE["Policy Engine\n(12 Fairness Rules)"]
AD["Adversary / Stress Tester"]
ME["Mitigation Engine"]
SA["Shadow AI Scanner"]
end
subgraph AI ["๐ค AI LAYER"]
RL["๐๏ธ RL ENGINE\nStable-Baselines3 PPO\nGymnasium Environment\nReward: ฮฑยทAccโฮฒยทDIโฮณยทSPD"]
XAI["๐ง XAI ENGINE\nGemini API via Vertex AI\nCounterfactual Analysis\nPlain-English Explanations"]
COMP["๐ COMPLIANCE ENGINE\nEU AI Act Report Generator\nHash-Chained Audit Trail\nRisk Scorer"]
end
subgraph GCP ["โ๏ธ GOOGLE CLOUD PLATFORM"]
CR["Cloud Run\n(Serverless)"]
GCS["Cloud Storage\n(PDF Reports)"]
FA["Firebase Auth\n(JWT)"]
VA["Vertex AI\n(Gemini)"]
end
subgraph DB ["๐๏ธ DATA LAYER"]
MDB["MongoDB\n(Motor AsyncIO)"]
BDS["Benchmark Datasets\nHiring | Loans | Medical"]
AT["Audit Trail\n(Hash-Chained)"]
end
DS & CO & BS --> UI
UI --> HM & TC & WI
UI --> API
API --> FM & PE & AD & ME & SA
FM & PE --> RL
ME --> RL
FM --> XAI
API --> COMP
RL & XAI & COMP --> GCP
CR --> GCS
CR --> FA
CR --> VA
API --> MDB
MDB --> AT
MDB --> BDS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| FAIRFORGE ARENA โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ DATA & MODEL โ โ ๐ฉ MONITORING & โ โ ๐ COMPLIANCE & โ
โ AUDIT โ โ FLAGGING โ โ REPORTING โ
โ โ โ โ โ โ
โ โข Upload Dataset โ โ โข Flag High-Risk Bias โ โ โข EU AI Act Reports โ
โ โข Auto-Detect Attrs โ โ โข Generate Alerts โ โ โข Audit Trail Logs โ
โ โข Detect Proxy Vars โ โ โข Stress Test (Edge) โ โ โข Risk Documentation โ
โ โข Compute 7+ Metrics โ โ โข Continuous Monitor โ โ โข Export PDF to GCS โ
โ โข Intersectional โ โ โข WebSocket Streams โ โ โข Hash-Chain Verify โ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ง MITIGATION โ โ ๐ง EXPLAINABILITY โ โ ๐ LLM BENCHMARK โ
โ (RL-BASED) โ โ (XAI) โ โ โ
โ โ โ โ โ โข GPT-4o โ
โ โข Apply Bias Fixes โ โ โข Gemini Chat Bot โ โ โข Claude 3.5 Sonnet โ
โ โข RL Training (PPO) โ โ โข Counterfactual โ โ โข Gemini 1.5 Pro โ
โ โข Threshold Optimize โ โ โข Plain-English Exp. โ โ โข Llama 3.1 โ
โ โข Compare Versions โ โ โข What-If Explorer โ โ โข Mistral Large โ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Technology | Purpose |
|---|---|---|
| ๐ฅ๏ธ Frontend | Tailwind CSS, Plotly.js, Vanilla JS, Glassmorphism | Interactive fairness dashboard & visualizations |
| โ๏ธ Backend | FastAPI, Uvicorn, Pydantic, WebSockets | High-performance async API & real-time monitoring |
| ๐๏ธ Database | MongoDB (Motor AsyncIO) | Async dataset storage & audit log persistence |
| ๐ค ML Engine | PyTorch, Scikit-learn, AIF360 | Fairness metrics computation & model evaluation |
| ๐๏ธ RL Training | Stable-Baselines3 (PPO), Gymnasium, OpenEnv | Reinforcement learning mitigation arena |
| ๐ง Explainability | Google Gemini API, Vertex AI | Counterfactual XAI, natural language explanations |
| โ๏ธ Deployment | Google Cloud Run, Cloud Storage, Docker | Serverless, auto-scaling containerized deployment |
| ๐ Security | Firebase Auth (JWT), Hash-Chain Logging | Secure access & tamper-proof audit trail |
| ๐ Charting | Chart.js, Plotly.js | Real-time training curves & outcome heatmaps |
โ๏ธ fairforge/
โ
โโโ ๐ app/ # FastAPI Backend
โ โโโ ๐ __init__.py
โ โโโ ๐ main.py # API entry point + MLOps routes
โ โโโ ๐ policies.py # 12 fairness constraints & policy rules
โ โโโ ๐ grader.py # 7-metric fairness evaluation engine
โ โโโ ๐ adversary.py # Bias injector for adversarial stress-testing
โ โโโ ๐ fairness_metrics.py # Core mathematical fairness logic (MEASURE)
โ โโโ ๐ mitigation_engine.py # Automated reweighting & FIX suggestions
โ โโโ ๐ gemini_auditor.py # Google Gemini API integration (EXPLAIN)
โ
โโโ ๐ openenv/ # Reinforcement Learning Gym
โ โโโ ๐ env.py # Custom Gymnasium environment
โ โโโ ๐ ppo_trainer.py # PPO training loop & reward function
โ โโโ ๐ basilisk.py # Core evaluation & grading scripts
โ
โโโ ๐ frontend/ # Single Page Dashboard
โ โโโ ๐ index.html # Full UI (Tailwind + Plotly + Glassmorphism)
โ
โโโ ๐ data/
โ โโโ ๐ tasks/ # Benchmark datasets
โ โโโ ๐ hiring.csv # Hiring decisions dataset
โ โโโ ๐ loans.csv # Loan approvals dataset
โ โโโ ๐ medical.csv # Medical outcomes dataset
โ
โโโ ๐ reports/ # Generated compliance PDFs (โ GCS)
โ
โโโ ๐ณ Dockerfile # Production container configuration
โโโ ๐ requirements.txt # Full dependency manifestPython 3.10+ | Docker | MongoDB | Google Cloud SDK | Gemini API Key# โโ Step 1 ยท Clone the repository โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
git clone https://github.com/your-username/FairForge-Arena.git
cd FairForge-Arena
# โโ Step 2 ยท Create virtual environment โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# โโ Step 3 ยท Install dependencies โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
pip install -r requirements.txt
# โโ Step 4 ยท Configure environment variables โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
cp .env.example .env
# โ Set GEMINI_API_KEY, MONGODB_URI, GCP_PROJECT_ID, FIREBASE_CREDENTIALS
# โโ Step 5 ยท Start the server โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
python -m uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload
# โโ Step 6 ยท Open your dashboard โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# โ Navigate to http://127.0.0.1:8000# Build and run with Docker
docker build -t fairforge-arena .
docker run -p 8000:8000 --env-file .env fairforge-arena
# Deploy to Google Cloud Run
gcloud run deploy fairforge-arena \
--image gcr.io/YOUR_PROJECT/fairforge-arena \
--platform managed \
--region us-central1 \
--allow-unauthenticated| Metric | โ Before FairForge | โ After FairForge | Improvement |
|---|---|---|---|
| Disparate Impact Ratio | 0.54 (Severe Bias) |
0.89 (Near-Fair) |
+65% ๐ข |
| Statistical Parity Diff | 0.23 (High) |
0.04 (Excellent) |
-83% ๐ข |
| Intersectional Bias | High |
Excellent |
Dramatic ๐ข |
| Equal Opportunity Diff | 0.31 |
0.06 |
-81% ๐ข |
| Accuracy Trade-off | 87% |
84% |
-3% only ๐ก |
โฑ๏ธ Full audit-to-report workflow: ~5 minutes (excluding PPO training time)
PHASE 1 PHASE 2 PHASE 3 PHASE 4
(0โ3 Months) (3โ6 Months) (6โ12 Months) (12+ Months)
FOUNDATION v3.1 SCALE v4.0 ENTERPRISE v5.0 GLOBAL PLATFORM
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
๐ง Platform โก Real-Time ๐ข Enterprise ๐ Ecosystem
โข Production APIs โข Drift Monitoring โข SSO & RBAC โข Public Leaderboard
โข RL Engine โข Live Alerts โข Team Collab โข Regulatory Mapping
โข Data Pipelines โข Continuous Audit โข Audit Automation โข Global Compliance
๐ง AI Enhancements ๐งช Advanced AI ๐ Security ๐ค Community
โข Gemini v2 โข Causal AI Models โข Federated Audit โข Open Source SDK
โข XAI v2 โข Shadow AI Detect โข Data Privacy โข Research Papers
โข Metric Expansion โข Multimodal Fair. โข Secure Logging โข Industry Partners
๐ Data ๐ Intelligence ๐ Governance ๐ผ Business
โข Multi-Dataset โข Model Benchmark โข Compliance Engine โข SaaS Platform
โข Structured Data โข Version Tracking โข Policy Mapping โข Enterprise Clients
โข Multi-format โข Model Comparison โข Risk Scoring โข Monetization
This project was developed for the Google Developer Program โ Hack2Skill and Google Solution Challenge 2026.
Open for visitors โ feel free to โญ star.
Made with โค๏ธ and a commitment to fairer AI
๐ Team Leader | AbhishekGupta0164 |
FairForge Arena โ Train Bias Out. Build Trust In.