Inspiration
As AI becomes more integrated into healthcare, we were concerned about how these systems can unintentionally reinforce bias, especially when they operate as black boxes. In high-stakes environments like medicine, even small disparities in predictions can lead to serious consequences for certain groups.
We were inspired by a simple idea:
What if AI systems could not only make predictions, but also audit themselves for fairness and show how to improve?
This led us to build Clear Dose, a system focused on transparency, accountability, and reducing bias in medical risk prediction.
What We Learned
Throughout this project, we learned that:
- Bias in machine learning is often subtle but impactful — even small imbalances in data can lead to large disparities in predictions.
- Accuracy is not enough — a model can perform well overall but still systematically fail for specific groups.
- Explainability is critical — tools like SHAP help us understand how individual features contribute to predictions.
- Fairness is iterative — there is no single fix; it requires continuous monitoring and adjustment.
We also gained experience working with real-world ML workflows, from data preprocessing to evaluation and bias mitigation.
🛠️ How We Built It
We designed FairRx Sentinel as an end-to-end pipeline:
Synthetic Data Generation
We created a simulated patient dataset including features such as age, race, drug type, dosage, and medical conditions. We intentionally introduced bias to mimic real-world disparities.Model Training
We used a Random Forest classifier (scikit-learn) to predict the probability of adverse drug reactions.Explainability (SHAP)
We used SHAP (SHapley Additive exPlanations) to break down predictions and show how each feature contributed to the outcome.Fairness Evaluation
We grouped predictions by demographic categories (e.g., race, sex) and compared: $$ \text{Gap} = |\text{Actual Rate} - \text{Predicted Rate}| $$ This allowed us to identify which groups were being over- or under-predicted.Bias Mitigation
We implemented two techniques:- Data augmentation: generating additional samples for underrepresented groups
- Reweighting: assigning higher importance to those groups during training
- Data augmentation: generating additional samples for underrepresented groups
We then retrained the model and measured how the fairness gap changed.
- Interactive UI (REACT)
We built a real-time dashboard where users can:- input patient data
- view predictions and explanations
- analyze fairness across groups
- simulate bias correction
- input patient data
⚠️ Challenges We Faced
Ensuring meaningful evaluation
Early on, our fairness comparisons were misleading because we were modifying the dataset itself. We resolved this by using a fixed test set for proper before-and-after comparisons.Bias mitigation not always working
Simply adding more data did not reduce bias. We learned that combining augmentation with reweighting was necessary to achieve meaningful improvements.Balancing complexity and clarity
We had to simplify our system so that fairness insights were easy to understand in a live demo, without sacrificing technical depth.Understanding fairness trade-offs
Improving performance for one group can affect others. This highlighted that fairness is not a one-time fix, but an ongoing process.
Takeaway
Clear Dose is not just about making predictions—it’s about making AI systems more transparent, accountable, and fair.
By combining prediction, explanation, and bias mitigation into a single pipeline, we demonstrate how AI can actively identify and reduce disparities rather than reinforce them.
Log in or sign up for Devpost to join the conversation.