Inspiration
Every year, 80,000 Americans lose their lives to opioid overdoses with Indiana specifically losing about 2,500 persons a year. Indiana policymakers are always debating the impossible question of what intervention measures can occur to save the most lives, in which county and when? With this question, we realized that a dollar spent on naloxone in Jay county has differing impacts than the same dollar spent on treatment in bustling Tippecanoe County. That’s why we built Morpheus.
What it does
Morpheus is an AI-powered opioid simulator and optimizer for Indiana's 20 counties. First, Policymakers select a county to input a budget in. Then, Morpheus returns a data-backed playbook that utilizes naloxone access, prescription reduction, and treatment expansion information to determine how the specific budget can maximize lives saved and deaths prevented.
1) Projects the OUD population, overdose rates, and cumulative deaths from over 60 months through a calibrated stochastic compartmental model, while updating instantly as sliders move
2) Predicts the highest-impact intervention bundle for any county and budget through an XGBoost model trained on 9.26 million simulation predictions
3) Sequential budget allocations across 5 years are created from a PPO Reinforcement Learning Policy agent, ultimately discovering temporal strategies (e.x front-load naloxone and ramp treatment after) that one-shot optimizers cannot find.
4) Quantifies what-if scenarios if interventions started earlier, with the model showcasing over 5,146 lives being alive today if opioid intervention in Indiana occurred in 2016
5) AI Policy Assistant which is backed by the simulation engine
6) Allocation of a statewide budget across 20 different Indiana counties simultaneously
How we built it
1) A stochastic compartmental model with compartments for General Population, Prescribed, Misuse OUD, Overdose, Death/Survived, plus Treatment and Recovery pathways. Each county is calibrated to CDC overdose data, uninsured rates, treatment facility density, and median household income
2) Trained XGBoost to utilize over 9.26 million intervention simulations running across all Indiana counties
3) Implemented Stable Baselines3 PPO to create a custom Gymnasium environment that allows an agent to allocate a budget across 5 years, observing 12-dimensional state vector (epidemic rate + budget remaining + county context)
4) Adam-based optimizer for finding locally optimal intervention portfolios across counties (gradient optimizer)
5) FastAPI that serves optimization, simulation, RL interference, counterfactual, forecasting, and feature importance endpoints
6) Interactive county map, intervention sliders, 5-year timeline charts, Monte Carlo confidence bands, sensitivity heatmaps, and a multi-county comparison view stemming from a frontend built with react, recharts, and tailwind
7) All simulation and training ran on Purdue's Gautschi HPC cluster (NVIDIA H100 80GB, SLURM scheduler) achieving 21.7M scenarios/sec throughput across a 54-minute full pipeline
Challenges we ran into
1) Careful parameterization of urban vs. rural base rates, facility-density adjustments, and uninsured-rate penalties on treatment access were required getting the model to reproduce over 19 years of county-level CDC morality trends
2) Agent struggled in attributing lagged treatment payoffs (12-18 months to materialize) to early budget decisions due to the 5-year sequential environment
3) Creating a single model to generalize population differences and overdose rates from dynamic Indiana counties required an immense amount of prompting to occur
4) Shifting the computational workload to the server side, along with implementing baseline result caching, was necessary to enable stochastic simulations on each slider adjustment while maintaining a responsive user interface.
Accomplishments that we're proud of
1) Success in calibrating raw CDC data that covered county trends through an epidemiological model using R²=0.71
2) Developing a reinforcement learning agent that matches public health literature to provide non-obvious multi-year strategies though a “early action and early treatment” pattern
3) Actual estimates occurring with the model displaying over 5,146 lives being saved in 2019 had Indiana deployed intervention measures then
4) Building a fully integrated stack utilizing raw data from CDC mortality CSVs through ML training, simulation, RL, and a polished interactive dashboard built end-to-end
What we learned
1) Data suggested rural counties respond better to naloxone (high overdose rates, fewer treatment facilities) while urban counties benefit more from treatment expansion, helping one see that Opioid pediment dynamics are truly county-specific.
2) Because the epidemic state evolves and involves itself with different interventions having different lag times, year-by-year sequential allocation will always outperform singular upfront allocation of the same budget
3) Feature importance visualization showing that overdose rate and treatment facility density dominate predictions was as important as prediction accuracy for building trust with a policy audience.
What's next for Morpheus
1) Utilizing the current calibration pipeline and additional CDC data to include opioid overdose data from all 92 Indiana counties
2) Implementing fentanyl-specific pathways since doing so would capture the overdose lethality spike seen post-2016
3) Incorporating budget uncertainty into the model by recognizing that funding—especially from grant cycles—can fluctuate while also addressing this using Monte Carlo simulations to explore a range of possible funding scenarios and their effects on outcomes. To ensure real-world impact, collaboration with partners such as the Indiana Family and Social Services Administration and local county health departments is crucial, leading to the optimizer applying itself to actual proposed budgets so that model insights directly inform policy decisions. And eventually, deploying the calibration pipeline in counties nationwide to help American policymakers implement fairer budgets towards opioid overdoses
Built With
- anthropic
- fastapi
- gpu
- javascript
- numpy
- pandas
- python
- pytorch
- react
- recharts
- scikit-learn
- scipy
- slurm
- stable-baseline
- tailwindcss
- uvicorn
- vite
- xgboost
Log in or sign up for Devpost to join the conversation.