Downloads · 30 days
7
9% of all-time downloads
srhill12/clinical-nlp-fairness-auditor
clinical-nlp-fairness-auditor is a text classification model from srhill12. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Author: Steven Hill Audit date: 2026-04-24 (corrected 2026-10-07) Base model: distilbert-base-uncased Task: Single-label text classification, 20 medical specialties Repository: github.com/srhill12/clinical-nlp-fairnes…
Downloads · 30 days
7
9% of all-time downloads
All-time downloads
79
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
Author: Steven Hill
Audit date: 2026-04-24 (corrected 2026-10-07)
Base model: distilbert-base-uncased
Task: Single-label text classification, 20 medical specialties
Repository: github.com/srhill12/clinical-nlp-fairness-auditor
This model was trained to be audited. It sorts clinical transcription notes by medical specialty, and the accompanying audit documents its performance disparities and ends in a do-not-deploy recommendation. The author trained the model and conducted the audit, so the audit is a self-audit, not an independent one.
This model is not intended for clinical or operational use.
Intended: research on auditing clinical text classifiers, and study of the failure modes documented below.
Hypothetical use evaluated by the audit: administrative routing of transcribed notes to specialty work queues.
Out of scope: diagnosis or treatment decisions, emergency triage or patient prioritization, any production deployment, and any use with real patient data.
Data limitations
Held-out test set, 614 notes.
| Metric | Value |
|---|---|
| Accuracy | 41.9% |
| Macro F1 | 44.1% |
precision recall f1-score support
Cardiovascular / Pulmonary 0.544 0.740 0.627 50
Consult - History and Phy. 0.417 0.072 0.123 69
Discharge Summary 0.636 0.933 0.757 15
ENT - Otolaryngology 0.310 0.750 0.439 12
Emergency Room Reports 0.095 0.700 0.167 10
Gastroenterology 0.432 0.533 0.478 30
General Medicine 0.258 0.229 0.242 35
Hematology - Oncology 0.000 0.000 0.000 12
Nephrology 0.381 0.727 0.500 11
Neurology 0.436 0.567 0.493 30
Neurosurgery 0.393 0.846 0.537 13
Obstetrics / Gynecology 0.425 0.850 0.567 20
Ophthalmology 0.435 0.909 0.588 11
Orthopedic 0.415 0.562 0.478 48
Pain Management 0.875 0.875 0.875 8
Pediatrics - Neonatal 0.000 0.000 0.000 9
Radiology 0.444 0.526 0.482 38
SOAP / Chart / Progress Notes 0.737 0.609 0.667 23
Surgery 0.619 0.088 0.154 148
Urology 0.548 0.773 0.642 22
accuracy 0.419 614
macro avg 0.420 0.564 0.441 614
weighted avg 0.476 0.419 0.369 614
Gaps are the highest group accuracy minus the lowest, in percentage points. They are differences, not ratios.
| Dimension | Gap | Highest vs lowest |
|---|---|---|
| 20 specialties | 93.3 points | Discharge Summary 93.3% vs Hematology-Oncology 0.0% |
| Specialty type (author-defined grouping) | 34.1 points | Diagnostic / Administrative 64.0% vs Consultative 29.9% |
| Note-length quartile | 32.3 points | Q1 58.4% vs Q3 26.1% (Q2 41.8%, Q4 40.9%) |
These are performance disparities across note categories, not protected-class fairness metrics.
Zero recall. Every Pediatrics-Neonatal note (9) and every Hematology-Oncology note (12) in the test set was misclassified.
Class-weight over-correction. Surgery, the largest class, has 8.8% recall (13 of 148; false negative rate 91.2%). It was predicted only 21 times, while Emergency Room Reports, with 10 test notes, was predicted 74 times. The two largest classes are heavily under-predicted and most small classes are over-predicted, which is consistent with the inverse-frequency weights over-correcting. An unweighted baseline was not retained, so this is not a controlled comparison.
Note length and truncation. Truncated notes score 35.9% vs 53.7% for untruncated notes. Truncation does not explain the length gap by itself: Q3 and Q4 are both fully truncated, yet Q4 outperforms Q3 by 14.8 points.
High miss rates. Five specialties have false negative rates of 70% or higher: Pediatrics - Neonatal, Hematology - Oncology, Consult - History and Phy., Surgery, and General Medicine.
Explainability. SHAP (PartitionExplainer) on four hand-picked notes, first 300 words each. In the misclassified Surgery example, a cardiac catheterization note predicted as Cardiovascular / Pulmonary, the top attributions are cardiac terms such as "coronary" and "catheterization." The model keys on organ-system vocabulary that crosses specialty boundaries. Four examples are illustrative, not systematic.
Do not deploy. Before any deployment decision:
The absence of demographic data is a governance gap in its own right: a healthcare model that cannot be evaluated for protected-class fairness should not be put into use.
The repository includes a scorecard that maps this project's work to NIST AI RMF 1.0 subcategories across GOVERN, MAP, MEASURE, and MANAGE, with a status for each. It is a mapping, not a claim of conformance. See outputs/nist_rmf_scorecard.md in the repository.
This card follows the structure proposed in Mitchell et al., "Model Cards for Model Reporting," Proceedings of the Conference on Fairness, Accountability, and Transparency (FAT* '19), 2019 (doi:10.1145/3287560.3287596).
An earlier version of this card reported that 20.7% of notes were truncated at 512 tokens. That figure could not be reproduced; the recomputed figure is 66.6%. It also attributed the note-length gap to truncation and said the model over-predicts high-frequency specialties. Neither is supported by the data. The repository's scorecard revision log lists all changes.
@misc{hill2026clinicalnlp,
author = {Hill, Steven},
title = {Clinical NLP Fairness Auditor},
year = {2026},
note = {Audit of a DistilBERT medical specialty classifier},
url = {https://github.com/srhill12/clinical-nlp-fairness-auditor}
}