← My Work
Fairness in ML Class project

Lupus, gene expression and fairness

Can gene expression detect lupus and estimate how severe it is, and do those models treat patients of every race and sex fairly?

My role Disease progression models
With Rachel Yuan, fairness evaluation
Course AI in Genomics

The problem

Systemic lupus erythematosus (SLE) is a chronic autoimmune disease in which the immune system attacks the body’s own healthy tissue. Getting a diagnosis is crucial to managing it, but in clinics it can take years.

Autoimmune diseases disproportionately affect women and people of color, yet non-white patients are underrepresented in many real-world datasets. Most machine learning work on lupus has optimized for accuracy alone, without accounting for that imbalance.

What we asked

We asked three questions. First, can gene expression data detect lupus, and can it estimate how severe it is? Second, do those predictions hold up equally well across race and sex, and can we shrink any gap by training fairer models? Third, are the genes linked to getting the disease the same ones that make it worse?

My classmate Rachel Yuan and I split the work. I handled the disease-progression side of the project, and Rachel handled the fairness evaluation.

How it works

We trained on GSE88884, a public dataset of blood gene expression from 1,760 lupus patients and 60 healthy controls. Severity was measured with SLEDAI, a score a clinician calculates by adding up a patient’s active symptoms, with the most serious ones, like seizures, counting for more.

We built classic models: random forest, XGBoost and logistic regression to detect lupus, and the same trio, with ridge regression in place of logistic, to estimate severity. We split the data 80/20, used SMOTE to handle the imbalance between patients and controls, and tuned every model with 5-fold grid search.

For fairness, we used Fairlearn’s ExponentiatedGradient to retrain each classifier under a demographic parity constraint, which means the rate of positive predictions should be similar across groups. We measured that gap by race and by sex.

What we found

Detecting lupus (AUC) and estimating severity (R²), on the held-out test set.

Logistic regression0.995
XGBoost0.992
Random forest0.932
Severity, best R²0.12

Gene expression is a strong predictor of whether someone has lupus, but a weak predictor of how severe it is. The best detector was plain logistic regression, which beat both tree-based ensembles. On the test set it caught 350 of 352 patients and 9 of 12 healthy controls.

Severity was much harder. The best model, XGBoost, explained only about 12% of the variation, which makes sense: SLEDAI comes from clinical findings and lab values that gene expression can’t fully capture.

The genes were the most interesting part. The ones that best separate healthy from lupus are mostly snoRNAs, non-coding RNAs that are part of basic cellular machinery. The ones that track severity are tied to cell division. Only one gene appeared in both top-50 lists, which suggests that getting lupus and getting worse are driven by different biological processes.

On fairness, the original models flagged white patients more often than non-white patients: for logistic regression, 99.1% versus 92.8%. The fairer version narrowed that gap to 93.7% versus 92.8%, with the biggest improvement in logistic regression. But the fair models were optimized for race only, so by sex the gap actually grew for random forest and XGBoost.

The limits, and what’s next

The data is the main limit. With 29 patients for every healthy control, our results on healthy controls rest on only 12 test samples, so we can’t make firm claims about sensitivity. Everyone in the dataset was part of a drug trial, so they may not reflect the diversity of patients seen in clinics.

Next, we would add lab results and clinical records alongside gene expression, so a model learns from the same information clinicians use. We would also keep separate models for having the disease and for how severe it is, since they seem to be driven by different biology.

← Back to My Work Ask me about it →