Trustworthy machine learning under distribution shift
Shadman Mahmood
Khan Pathan
Can we tell when a deployed model should not be trusted?
I work on calibration and uncertainty under distribution shift, adversarial robustness, and privacy-preserving machine learning, mostly in medical AI, where a confident wrong answer is costly. My papers link to their code, and my demos show the systems side.
Research
Three threads, one question: knowing when a model's output can be relied on, and fixing it when it cannot.
Recalibrating a deployed model on encrypted features
I study CKKS-based encrypted scoring and post-deployment calibration. In the provided clinical notebook, encrypted dot products are decrypted and the calibration update runs in plaintext; the implementation boundary is documented with the code. Related work studies how approximate computation can preserve predicted labels while degrading probability quality.
IEEE ICNC 2026 · about 2 s per correction on a CPU, 64-dimensional features
How segmentation models fail when someone wants them to
A learned noise patch makes a brain tumor segmentation U-Net suppress the tumor mask, turning a visible lesion into a false negative. The point is the failure mode in a safety-critical setting.
IEEE ICCIT 2023
Flagging inputs and cases a model should not handle alone
Per-lead ECG quality estimation trained on synthetic corruption labels and evaluated on PTB-XL, BUT QDB and CinC 2011; uncertainty for flagging tumors a CT detector misses, evaluated on 1,948 external scans; selective deferral of molecular tests under tissue-source shift; encrypted pooled recalibration across ICU hospitals.
Manuscripts in preparation; code released for the ECG and eICU studies
Publications
Code and demos
Research code first, then systems I built to understand how models behave in practice. Every demo runs in the browser with no sign-up.
DPO reliability audit
DPO with LoRA on Qwen2.5-0.5B across a beta sweep: 0.66 to 0.70 held-out preference accuracy, but most low-beta reward gain came from longer answers, and confidence rose as accuracy fell with beta. A companion study shows safety judges calibrated on ordinary prompts break on jailbreaks.
Encrypted post-deployment calibration
Research notebooks associated with the ICNC 2026 calibration work. The reviewed MIMIC-III notebook demonstrates CKKS encrypted dot-product scoring, then decryption and plaintext NumPy calibration. PathMNIST and PneumoniaMNIST notebooks are also included; their implementation boundaries require separate review.
Encrypted pooled recalibration (eICU)
Frozen analysis, aggregate-only audits, a pre-run analysis lock and a protocol-fixed simulation. Contains no patient records; every file is checksummed.
Per-lead ECG quality detector
Locked analysis plan, hashes and result tables, including an augmentation-matched control for whether quality detection adds robustness beyond corruption augmentation.
LLM Safety Eval
Rubric-based scores for hallucination risk, toxicity, bias, consistency, reasoning quality and relevance, with a radar chart that shows where it breaks down.
VisionMed
Educational medical-image UI simulation with canvas overlays, a patch-grid view and random sample scores. It does not run a Vision Transformer or compute Grad-CAM; displayed results and latency are simulated.
MedSAM2
Educational prompt-based segmentation UI simulation. JavaScript draws synthetic masks and random sample Dice, IoU and latency values; no SAM2 model inference or measured segmentation accuracy is implemented.
Scalable LLM engine
A gateway that owns keys, caching, cost tracking and routing; Redis as cache, queue and cost counter; workers that autoscale on queue depth; a full Kubernetes setup.
Talks and presentations
- Invited research talk to Lei Xing's group, Stanford University (virtual), 2026
- Security and Adversarial Threats in Large Language Model Ecosystems, invited cyber research talk, Old Dominion University
- Privacy-Preserving Deep Learning and Fully Homomorphic Encryption, guest lecture, Machine Learning II, Old Dominion University
- Post-Deployment Model Calibration under Non-IID Data using Homomorphic Encryption, poster, Commonwealth Cyber Initiative Symposium, Richmond, 2026
- AI-Driven Integration of Genomic Variants and Gleason Stratification for Prostate Cancer Biomarker Discovery, poster, Commonwealth Cyber Initiative Symposium, Richmond, 2026
Experience and education
Contact
For research questions, collaborations, talks or the code, email is best.