Pruning CXR Models
Research question
Can a chest X-ray model become small enough for resource-constrained devices without losing diagnostic performance or increasing demographic bias? This course project for Deep Learning Beyond Accuracy at NC State tests that trade-off directly.
Method
We applied unstructured L1 pruning to the convolutional weights of a pretrained TorchXRayVision DenseNet-121 model. The evaluation used 2,797 unique patients from the NIH ChestX-ray8 test set and focused on atelectasis, infiltration, pleural thickening, and pneumonia.
We tested sparsity from 0% through 100%. At each level, we measured AUROC, recall, and specificity. We also compared worst-group accuracy and true-positive-rate disparity across sex and age groups.
Performance under pruning

The model retained nearly all baseline AUROC through 80% sparsity. Beyond 85% to 90%, performance fell quickly. At extreme pruning levels, predictions became almost constant: recall moved toward 1 while specificity collapsed toward 0.
Fairness across age groups

Pruning did not materially worsen or correct the existing performance gaps between sex or age groups before the model collapsed. This suggests that the observed inequities came mainly from the training data, not from the low-magnitude weights removed during pruning.
What the weights show

Contributions and status
I worked on exploratory data analysis, data cleaning, TorchXRayVision setup and integration, and results analysis.
This is exploratory course-project work preserved for reference. The repository contains rough notebooks, incomplete experiments, and environment-specific paths rather than a repeatable production pipeline.
