AWS • PyTorch • Serverless inference

Predicting premature dropout from MOUD treatment

An interactive research demonstration of a hard-sharing multi-task neural network with state-specific prediction heads, trained on 2015–2019 TEDS-D treatment episodes.

451,438cohort episodes
20state-specific heads
25model predictors
0.710frozen test ROC-AUC
Interactive demo

Run a single treatment-episode prediction

Research use only. This demo is not clinical decision support and must not be used to make treatment decisions. The model reflects historical administrative data and does not establish causal effects or an individual's prognosis.
1

Episode context

State, age, service setting, and demographic context.

2

Treatment & social history

Prior treatment, referral, living arrangement, and related admission variables.

3

Substance-use indicators

Admission flags and derived variables used by the trained model.

A cold serverless request can take several seconds.
Model design

Shared representation, state-specific heads

The PyTorch model uses a shared multilayer perceptron to learn common structure across states, followed by a separate linear prediction head for each of the 20 highest-volume states in the cohort.

25 predictors 128 64 32 state head

Frozen evaluation

Test ROC-AUC
0.710339
Test F1 @ 0.50
0.721275
Macro state ROC-AUC
0.622735
Training years
2015–2019
Interpretation

Important limitations

Episodes, not unique people

TEDS records represent treatment episodes; the same person can appear in more than one episode.

Not causal

The model estimates statistical associations in historical administrative data. It does not identify causes of dropout.

State-specific performance varies

Overall ROC-AUC does not imply equal performance in every state. State-level discrimination differs materially.

Research demonstration

This website is an engineering and research portfolio project, not a medical device or clinical recommendation system.