Microphones that listen for coughs, wheezes and breathing also record the person producing them. A respiratory model therefore learns two things it should not depend on: which recording device was used and who the individual patient is. Work on respiratory sound classification already trains models to ignore the device. Work on speech privacy trains models to hide the speaker. Both rely on the same tool, a competing classifier that the main model learns to fool. Speech privacy research has also shown that this tool gives a false sense of safety: the model learns to fool the particular classifier it was trained against, but a new attacker can still recognize people. Respiratory audio adds a further problem. The obvious way to hide identity also removes age and sex. In a lung or cough model those attributes interact with disease in legitimate ways, and stripping them is likely to hurt the groups that clinical models already serve worst, such as children, women and patients at under-resourced clinics.
This proposal separates identity into two parts. The first is coarse demographics: an age bracket and sex. A clinician already knows these and records them as metadata, so hiding them buys no privacy. The second is everything that singles out one person within their demographic group. We propose to remove only the second part. We measure that part with a pairwise "same person or not?" critic that is trained on many people and is regularly reset, rather than with a classifier over a fixed list of known speakers. The claim is that this conditional, open-set removal leaves less re-identification risk than device-only or closed-set adversarial training. It should do so while keeping diagnostic accuracy close to the best existing respiratory classifiers and protecting worst-subgroup performance better than removing identity unconditionally.
What Prior Work Establishes and Leaves Open
Two papers motivate the work. Privacy-Preserving Adversarial Representation Learning in ASR: Reality or Illusion? trains a speech recognizer with a speaker-adversarial branch on Librispeech. Closed-set speaker identification accuracy falls from 93.1% to 2.5%, yet open-set verification by an x-vector attacker improves (EER moves from 23.07% to 19.56%). The encoder learns to fool one closed-set adversary and leaves identity recoverable by others. This result constrains our design. Any identity-removal term must be evaluated by an attacker trained after the encoder is frozen, on people the encoder never saw. A classifier over a fixed list of speakers is the wrong adversary to train against.
On the respiratory side, Stethoscope-guided Supervised Contrastive Learning adds a device-adversarial branch and a device-agnostic contrastive loss to an Audio Spectrogram Transformer, a transformer that treats patches of the spectrogram as tokens. It reports 61.71% on the ICBHI 4-class score. DDE-MAE splits disease-related from disease-irrelevant features by minimizing a variational upper bound on mutual information (vCLUB). Its qualitative analysis finds that the irrelevant branch captures device and patient-specific characteristics. Neither paper measures how much patient identity remains in the disease branch, and neither asks what removing it costs specific age or sex groups. We reuse their backbone and their mutual-information machinery. The new parts are the target of removal (open-set identity, conditioned on demographics) and the evaluation (open-set re-identification and subgroup equity).
Two further papers shape the conditioning choice. Fairer AI in ophthalmology reports that explicitly stripping demographics costs accuracy. It instead grounds predictions in localized pathological features and reaches 92.0% mAP with near sex parity. Beyond Classification: A Cough Regression Benchmark shows that respiratory foundation models barely beat a mean predictor (by 1–8%) on the Zambian clinical cohort CIDRZ. It also finds that transfer between populations is asymmetric: models trained on crowdsourced CoughVID data transfer to CIDRZ (−0.17-year MAE gap), while clinical-to-global transfer fails. With a signal that weak, any removal step that also deletes age-linked acoustic structure could erase what little diagnostic information remains in underrepresented cohorts. Conditioning on demographics is our response to that risk.
The speaker-anonymization literature supplies the main pipeline-level competitor. It decomposes speech into content, pitch and an identity embedding and swaps the identity part (art_28d23b3b; pseudo-speaker selection in art_101a6ff8). Cai et al. report that keeping pitch and prosody leaks identity. That trade-off is the speech-domain counterpart of ours.
Core Claim
Let $Z$ be the representation the health model computes from a recording. Let $P$ be the participant's identity, $A$ their coarse demographic cell (age bracket × sex), $D$ the recording device and $Y$ the clinical label. We train
$$ \mathcal{L} = \mathcal{L}_{\text{task}}(Z, Y) + \lambda_P\, \hat{I}(Z; P \mid A) + \lambda_D\, \hat{I}(Z; D \mid Y), $$
where $\hat{I}$ is an estimated upper bound on conditional mutual information, and $\lambda_P$ and $\lambda_D$ weight the two penalties.
The identity term is estimated by a pairwise critic that scores whether two representations come from the same person. Its negatives are always drawn from the same demographic cell $A$. Two consequences follow. First, a similarity function generalizes to people the critic never saw, unlike a classifier over $N$ known speakers. Second, the critic cannot succeed by using age or sex, so the encoder is never pushed to discard them. To counter the closed-adversary overfitting shown by Srivastava et al., the critic is re-initialized on a schedule and trained each time on a rotating subset of participants.
The device term is conditioned on the clinical label, so that alignment does not erase pathology when the mix of diagnoses differs across devices. Unconditional device alignment is the failure mode the research file flags for global domain invariance. In ICBHI the devices are heavily unbalanced (Litt3200 has 41 training cycles, AKGC417L roughly 2,500), so class mix plausibly differs by device. We will check this directly on the data.
Research Program
The first stage asks whether the problem exists at all. Before building anything, we measure how much identity leaks from standard respiratory representations. We freeze an AST fine-tuned on ICBHI, the OPERA and HEAR encoders used by Sanap et al., and DDE-MAE's disease branch. On each, we train a fresh verification attacker on one set of participants and report EER on a disjoint set. We also run a cross-modality linkage attack on Coswara, which records cough, breathing and phonation from each participant: given a cough representation, can an attacker retrieve the same person's breathing representation? We report each attack both raw and restricted to pairs within the same demographic cell. The second number is the leakage the proposal targets.
The second stage builds the conditional objective on the Patch-Mix AST backbone. We implement the identity critic with vCLUB-style bounds following DDE-MAE, and the class-conditional device term as a device classifier given the label, trained through gradient reversal as in SG-SCL.
The third stage evaluates three axes together on every model: diagnostic utility, open-set re-identification, and equity. Equity means worst-cell performance across age × sex cells, plus transfer between CoughVID, Coswara and CIDRZ in both directions.
Baselines
The naive reference is a Patch-Mix AST trained on raw audio with no privacy or alignment terms. Patch-Mix Contrastive Learning reports a 4-class ICBHI score of 62.37% and a 2-class score of 68.71%. This is the strongest reported utility number in the file and the bar our method must stay close to. We count it as matched if our model lands within one point of our own reproduction of this number under identical splits. It also gives the leakage ceiling.
The strongest domain-adaptation competitor is SG-SCL, which reports 61.71% (4-class) and 68.93% (2-class). It is the most direct published attempt to make respiratory representations ignore nuisance factors. Device removal may also remove some identity information as a side effect, so it could achieve part of our privacy goal for free.
The signal-processing privacy baseline is a 1250 Hz low-pass filter, following Liu et al., combined with DeepLung-style dropping of speech frames (DeepLung). The model is retrained on the filtered audio.
The closed-set privacy baseline adds a speaker-classification adversary trained through gradient reversal, as in Srivastava et al., at matched utility. For this baseline we have no reported result on respiratory data; on Librispeech its open-set EER was 19.56%.
The disentanglement baseline is DDE-MAE's disease branch.
The ablation that isolates the key ingredient is an identical model whose identity critic draws negatives from all participants. This is unconditional removal. If the conditioning matters, the unconditional model should reach a similar re-identification EER but lose more on worst-cell utility and on age-correlated clinical targets.
All baselines share the backbone and AudioSet initialization, the participant-disjoint splits, and the same training compute. Each gets the same number of hyperparameter trials, a budget equal to our method's, so no method wins through tuning. All are attacked by the same post-hoc attacker protocol.
To beat the field, a method must do three things at once. It must raise held-out within-cell EER above every baseline that matches its utility. It must stay within one point of the Patch-Mix ICBHI score. And it must not lower worst-cell sensitivity relative to the naive model.
Why not just…?
Why not just low-pass filter and drop speech frames? Filtering targets intelligible words, not identity. Wheezes and crackles also occupy the band that a 1250 Hz cutoff removes from 4 kHz ICBHI audio. Liu et al. also show that bandwidth extension can reconstruct speech from clean low-passed audio, and clinical rooms are cleaner than the cocktail-party settings where they found protection. Our first stage will show whether filtered audio still leaks within-cell identity. The baseline run will show how much diagnostic score filtering costs.
Why not just anonymize the voice with conversion before training? Voice-conversion pipelines replace a speaker embedding computed from voiced speech. Lung sounds and coughs have no clean content/pitch/identity split for such a pipeline to act on. Cai et al. also show that preserving prosody-like structure leaks identity. On Coswara phonation we will nonetheless run pseudo-speaker conversion following art_101a6ff8 (Design Choices for X-Vector Based Speaker Anonymization) as an extra comparison, since this is the one modality where it applies.
Why not just use device-adversarial training, since device and patient are entangled anyway? This is a real threat. If SG-SCL's held-out EER already matches ours, the identity term adds nothing, and we will report that. DDE-MAE's finding that device and patient traits fall into the same discarded branch makes the outcome plausible. That is why SG-SCL is attacked with exactly the same protocol as our method.
Why not just ground predictions in pathology, as FairerOPTH does? Implicit grounding may reduce the use of demographic shortcuts, but nothing in it pushes identity out of the representation. We test it as a variant: a Patch-Mix model whose attention is supervised on crackle and wheeze annotations, scored for leakage and equity.
Why bother, if coughs barely identify anyone? If the first stage finds within-cell EER near 50% for cough and lung-sound representations, the privacy part of the problem is moot for those modalities. The project then narrows to Coswara phonation and breathing and to the equity audit. The first stage is the gate that decides this.
Decisive Experiments
On ICBHI, using patient-disjoint splits, we report 4-class and 2-class scores, held-out verification EER overall and within cell, and per-device and per-cell sensitivity.
On Coswara, we report cross-modality linkage accuracy and within-cell EER alongside the screening task. No reported number on Lacuna was found for Coswara classification, so all methods will be compared against our own naive reproduction.
On CIDRZ, CoughVID and Coswara, we run the regression and classification targets of Sanap et al. in both transfer directions. On CIDRZ we measure improvement over the mean predictor, against the reported 1–8% margin. This tests whether conditional removal preserves the weak clinical signal that unconditional removal should destroy.
Two outcomes would decide the question. The first is a utility-matched gap in within-cell EER between our method and both SG-SCL and the closed-set adversary. The second is a worst-cell utility gap between the conditional and unconditional versions at matched EER. If both gaps appear, the claim holds. If neither appears, the honest conclusion is that device alignment already provides whatever identity protection respiratory audio needs.
References
- Privacy-Preserving Adversarial Representation Learning in ASR: Reality or Illusion?
- Stethoscope-Guided Supervised Contrastive Learning for Cross-Domain Adaptation on Respiratory Sound Classification
- Disentangling Dual-Encoder Masked Autoencoder for Respiratory Sound Classification
- Fairer AI in ophthalmology via implicit fairness learning for mitigating sexism and ageism
- Beyond Classification: A Cough Regression Benchmark for Respiratory Acoustic Foundation Models
- Speaker Anonymization Using X-vector and Neural Waveform Models
- Design Choices for X-Vector Based Speaker Anonymization
- Privacy Versus Emotion Preservation Trade-Offs in Emotion-Preserving Speaker Anonymization
- Patch-Mix Contrastive Learning with Audio Spectrogram Transformer on Respiratory Sound Classification
- How Private is Low-Frequency Speech Audio in the Wild? An Analysis of Verbal Intelligibility by Humans and Machines
- DeepLung: Smartphone Convolutional Neural Network-Based Inference of Lung Anomalies for Pulmonary Patients