Skip to content

Adversarial Sample-Augmented Domain Adaptation: A Case Study in Predictive Modeling with Electronic Health RecordsAdversarial Sample Enhanced Domain Adaptation: A Case Study on Predictive Modeling with Electronic Health Records

arXiv· arXiv:2101.04853· Yiqin Yu, Pin-Yu Chen, Yuan Zhou, Jing MeiIBM ResearchIndexed by this site · 27 days ago· Originally publishedAlignment

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

The authors propose using adversarial samples for data augmentation in EHR domain adaptation, validated based on logistic regression on three MIMIC-III tasks, and the authors state that most tasks show improvement.

Questions
EHR data is heterogeneous across patient groups, and model generalization performance degrades when deployed to a new patient group. The authors focus on how to mitigate the domain shift between the source patient group and the target patient group when source domain data is inaccessible and only the source model is available.
Methods
The authors propose a domain adaptation method enhanced with adversarial examples: iterative FGSM is used to generate adversarial examples in the source domain and target domain respectively and add them to training; during target-domain training, an L2 distance term between the source model and target model parameters is added to the loss; the overall implementation is based on logistic regression.
Experiments and results
Experiments were conducted on three tasks on MIMIC-III—in-hospital mortality prediction, length-of-stay prediction, and phenotype classification—with two groups by age and sex, for a total of four transfer directions. The authors report that source-domain adversarial training outperformed DA without adversarial training on 11/12 tasks, and target-domain adversarial training further improved on 9/12 tasks.
Limitations and future work
Future directions listed by the authors include: other heterogeneity scenarios such as label distribution differences, automatic tuning of λ, and the relationship between the effect of adversarial examples and properties such as data scale. The experiments cover only four transfer directions divided by age and sex on MIMIC-III, and the model uses only logistic regression.
Experimental setuplogistic regression (LR) · MIMIC-III · AUROC、Cohen's linear weighted kappa et al.
Evaluated models
logistic regression (LR)
Benchmarks
MIMIC-III
Metrics
AUROCCohen's linear weighted kappaMacro AUROC
AI summaryTo address the poor generalization of electronic health record (EHR) models across patient groups, the researchers propose a domain adaptation method that uses adversarially generated samples for data augmentation. When training on the target patient group, the method leverages knowledge from the source group and uses adversarial samples to bridge the generalization gap between the two groups. In a case study on multiple predictive modeling tasks using the MIMIC-III dataset, the results confirm the method's effectiveness and cross-task generality.

To address the poor generalization of electronic health record (EHR) models across patient groups, the researchers propose a domain adaptation method that uses adversarially generated samples for data augmentation. When training on the target patient group, the method leverages knowledge from the source group and uses adversarial samples to bridge the generalization gap between the two groups. In a case study on multiple predictive modeling tasks using the MIMIC-III dataset, the results confirm the method's effectiveness and cross-task generality.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Address the degradation in generalization performance caused by data heterogeneity when EHR models are deployed across patient groups.

    Core problem: EHR prediction models have domain shift across patient groups, and AUROC or accuracy degrades when a model trained on one group is deployed to a new group.

    • Problem scenario: The authors point out that EHR heterogeneity comes from group differences in variable distributions and modeling targets (e.g., different clinical associations related to age and sex), as well as data biases such as missing data, so that training data cannot represent the data encountered at deployment.
    • Shortcomings of existing methods: The authors state that existing EHR domain adaptation work is mostly concentrated in medical imaging, and the few works on structured longitudinal EHR are based on the DANN architecture, but the choice of network structure for its feature extractor is arbitrary, the learned representations are hard to interpret, and the underlying mechanism is unclear.
    • Core observation: The authors base their idea on two existing findings: minimizing training error with adversarial examples may provide a bound for target domain error; adversarial training helps find domain-invariant, generalizable features.
    • Method proposed in the paper: a domain adaptation framework that uses adversarial examples for data augmentation, implemented based on logistic regression, with case studies on three predictive modeling tasks on MIMIC-III.
    • Setting assumption: The authors focus on the scenario where source domain data is inaccessible (e.g., for EHR privacy reasons) and only a model trained on the source domain is available, transferring source domain knowledge through model parameters.
  2. What related research exists?

    Related work falls into three categories: EHR domain adaptation, adversarial examples and adversarial training, and adversarial examples for domain adaptation.

    Domain adaptation on EHR

    • Zhang et al. (2019), Purushotham et al. (2017), Alves et al. (2018)—use RNN-type models combined with the DANN architecture to learn domain-invariant temporal relations on multivariate time-series EHR data. The paper points out that the feature extractor structure choice of such DANN models is arbitrary and the representations are hard to interpret.
    • DA work on medical imaging (Mozaffari et al. 2019, Gu et al. 2019, Yue Zhang et al. 2020, Shen et al. 2020)—the paper points out that EHR domain adaptation research is mainly concentrated in imaging, with fewer studies on structured longitudinal EHR data.

    Adversarial examples and adversarial training

    • Goodfellow et al. (2015), Kurakin et al. (2017)—proposed adversarial examples and the iterative FGSM generation method; the adversarial example generation in this paper follows this method.
    • Madry et al. (2018), Ding et al. (2020)—adversarial training improves model adversarial robustness.
    • Hongyang Zhang et al. (2019), Tsipras et al. (2019), Su et al. (2018)—the authors relay that these works consider that there may be a trade-off between adversarial robustness and generalization, but mainly validate it on large-scale image datasets.

    Adversarial examples for domain adaptation

    • Kouw (2018)—iteratively appends adversarial examples to the source domain dataset during training to improve generalization to unseen domains.
    • Liu et al. (2019)—uses DANN to generate adversarial examples to fill the gap between source and target domains, and adversarially trains a deep classifier to make its predictions consistent on adversarial examples.
    • The paper points out that these works are mainly validated on image data and deep neural networks, lacking research on simple interpretable algorithms such as logistic regression and heterogeneous data such as EHR.

    Baselines and benchmarks: The experimental baselines are NT source (normal training on source domain, testing on target domain) and NT target (normal training and testing on target domain); the benchmark is the predictive modeling tasks built on MIMIC-III (Johnson et al. 2016) by Harutyunyan et al. (2019). The authors position this paper as a case study of adversarial example enhanced DA on interpretable LR for structured EHR data.

  3. How does the paper address this problem?

    In a domain adaptation framework with L2 regularization on parameters, iterative FGSM adversarial examples are injected into the source domain and target domain respectively for data augmentation.

    Overall idea: on a domain adaptation framework that uses only source model parameters (not source data), adversarial examples are added as data augmentation to source-domain training and target-domain adaptive training; the authors state that adversarial examples both improve robustness and act as an intermediate distribution between the source and target domains, making knowledge transfer smoother. The method is named adversarial sample enhanced domain adaptation and is implemented based on logistic regression.

    Problem setting and formalization

    • A domain D = (X, Y) represents a patient group; the source domain DS has m samples, the target domain DT has n samples, the feature dimension is d, and the number of target outputs is k.
    • Three types of tasks are handled uniformly: binary classification (k=1, such as in-hospital mortality prediction), multiclass classification (Y = {0,…,C−1}, such as 10 classes of length of stay), and multilabel (k>1, such as 25 phenotypes); the method section derives uniformly for k=1, and multiclass and multilabel can be decomposed into binary classification.
    • The conditional probability of LR is p(y|x;θ) = g(θT x)y · (1 − g(θT x))1−y, where g is the logistic function; training minimizes the negative log-likelihood loss (Eq. 2, Eq. 3).

    Domain adaptation framework

    • Focus on the second DA scenario: source domain data (XS, YS) is inaccessible (e.g., due to EHR privacy), and only the parameters θS of the source model fS can be used (Eq. 4 is first trained on the source domain).
    • The target-domain training objective is θT = argmin lDT(θT) + λ |θT − θS|2 (Eq. 5); the second term is a modified L2 regularization that penalizes the difference between source model and target model parameters, and λ trades off the proportion of knowledge borrowed from the source model; λ is optimized by grid search.

    Adversarial example generation and enhanced training

    • Adversarial examples are generated using the iterative fast gradient sign method (FGSM): the input is perturbed step by step along the gradient direction of the loss function with respect to the input, with the goal of increasing the training loss; the Clip function clips the sample to the L∞ ε neighborhood of the original sample (Eq. 6).
    • The source domain and target domain use θS and θT respectively to generate their own adversarial examples.
    • Source-domain adversarial training: θS = arg min lDS(θS, xS, yS) + α·lDS(θS, xadv_S, yS) (Eq. 7).
    • Target-domain adaptation: θT = arg min lDT(θT, xT, yT) + α·lDT(θT, xadv_T, yT) + λ‖θT − θS‖² (Eq. 8), where α ∈ (0,1] controls the contribution weight of adversarial examples.

    Implementation details

    • Hyperparameters: learning rate = 0.01, batch size = 100, epochs = 100; adversarial training defaults to ε = 0.1, 20 iterations, L∞ norm perturbation.
    • To intervene with adversarial training and DA during empirical risk minimization, the authors rewrote LR in PyTorch (the baseline original implementation used scikit-learn) and removed L2 regularization (the authors state this causes a slight performance decrease).
    • The authors state that the framework can be directly generalized to other deep neural networks based on empirical risk minimization.
  4. What experiments did the paper conduct?

    Comparing two baselines and three DA variants on three MIMIC-III tasks and four transfer directions, with DA variants better on most tasks.

    Experimental setup

    • Model under test: All experiments are based on logistic regression (PyTorch reimplementation), with no other models.
    • Dataset: MIMIC-III EHR dataset (38,597 adult patients, 49,785 hospital admissions), using the benchmark tasks of Harutyunyan et al.
    • Tasks and metrics: In-hospital mortality prediction (binary classification, AUROC); length-of-stay prediction (10-class multiclass classification, Cohen's linear weighted kappa); phenotype classification (multi-label classification with 25 labels, macro-averaged AUROC).
    • Features: 17 clinical variables × 7 subsequences × 6 statistics = 714-dimensional features.
    • Transfer directions: Grouped by age (Older≥60 / Younger<60) and sex (Female / Male), four DA tasks in total: Older→Younger, Younger→Older, Female→Male, Male→Female; each domain is split 85%/15% into training/test sets (sample sizes in Table 1, e.g., in-hospital mortality prediction Female 9510, Male 11629).
    • Comparison settings: Two baselines, NT source and NT target, and three variants: DA with NT source/NT target (Eq. 5), DA with AT source/NT target (Eq. 7), DA with AT source/AT target (Eq. 8); α is taken in (0,1] and the best is reported.

    Main results

    Main results are in Figure 4 (bar chart; the specific values of each bar cannot be read after pdftotext conversion). The summary given in the main text is as follows:

    ComparisonResult (per the main-text description of Figure 4)
    Three DA variants vs two baselinesDA variants outperform baselines in almost all cases
    DA with AT source vs DA with NT sourceImprovement on 11 of 12 tasks
    DA with AT target vs DA with AT sourceFurther improvement on 9 of 12 tasks
    • The authors consider this to show that DA can leverage knowledge from both the source and target domains.
    • The authors point out that adversarial training in the source domain does not directly optimize the target-domain DA task, and only serves as source-domain data augmentation.

    Domain shift evaluation (Figure 1)

    • What was measured: Without DA, directly testing a model normally trained on one domain on another domain, quantifying domain shift.
    • Results: The specific number given in the main text is in-hospital mortality prediction AUROC = 0.799 for training on Male and testing on Female; the other bar values are readable in the figure but not preserved in the converted text.
    • Authors' interpretation: The model trained on All (mixed data) performs best on Female, which the authors consider consistent with the consensus that "training data volume dominates performance"; the model trained on Male even slightly outperforms the model trained on Female itself on Female, which the authors consider suggests greater Male→Female transfer potential; and when Male is the target domain, the model trained on itself is best, which the authors speculate may indicate that Female knowledge has limited effect on Male.

    Adversarial training as data augmentation (Figure 2, Figure 3)

    • What was measured: Source-domain adversarial training only (Eq. 7), without DA, compared with normal training (Eq. 3), on the in-hospital mortality prediction task (AUROC).
    • Results: Adversarial training outperforms normal training on almost all tasks except All→Younger; Male→Male reaches AUROC 0.8534 at α=0.1 and decreases monotonically as α increases; Male→Female attains its highest value 0.8283 at α=0.3. The performance gain in Figure 2(a) is greater than in Figure 2(b).
    • Authors' interpretation: The authors consider that the larger optimal α for Male→Female indicates that Male's adversarial samples play a greater role in mitigating the Male-Female domain shift; adversarial training is more effective on subgroups than on all data, which the authors explain as all-data training already being relatively sufficient, weakening the marginal effect of data augmentation.
    • Mechanism analysis: Figure 3 shows that on Female→Female the cosine similarity between the parameters of adversarial training LR and those of sparse regularized LR = 0.81; the authors cite existing conclusions that jointly adversarial training LR is equivalent to sparse regularized LR.

    Other ablations and analyses

    • α values: each adversarial training model attains its best performance at a different α (Figure 2; the main text does not give a complete α sweep table).
    • Negative result: All→Younger is the only setting where adversarial training performance decreases (Figure 2).
    • Removing the L2 regularization causes a slight performance decrease (Results section, no numbers given).
    • λ is selected by grid search; the paper does not report the specific values or the results under each λ.
  5. What are some points that can be further explored?

    The authors list other heterogeneity scenarios, automatic λ tuning, and other future directions; the experiments cover only MIMIC-III and LR.

    Limitations and future directions noted by the authors

    • The authors state that other types of heterogeneity exist, such as label distribution differences and measurement differences, and list DA analysis of these scenarios as future work (Discussion "Heterogeneity of EHRs").
    • The authors state that some work is devoted to automatic tuning of λ, and will be included in future work (Discussion "Effect of domain adaptation").
    • The authors consider it worthwhile to further analyze the relationship between the effect of adversarial sample augmentation and key properties of the training task such as data scale and data heterogeneity (Discussion "Effect of domain adaptation").
    • The authors state that due to space limits they did not evaluate other DA scenarios such as unsupervised DA and few-shot DA, and expect that this method would also perform well in more restricted situations (Discussion "Domain adaptation types"; the authors' tone is expectation rather than verified).
    • The authors state that the equivalence between adversarial training LR and sparse regularized LR offers a perspective for further research (Discussion "Effect of adversarial samples").

    Scope of experimental coverage

    • The dataset is only MIMIC-III, and the tasks are three: in-hospital mortality prediction, length-of-stay prediction, and phenotype classification.
    • Patient grouping is only by age (60-year boundary) and sex, two divisions, with four transfer directions in total.
    • The model is only logistic regression; the paper states the framework can be extended to deep networks but did not run experiments.
    • Adversarial sample generation is fixed at ε=0.1, 20 iterations, L∞ norm; the paper does not report sweep experiments for these parameters.
    • The paper does not report the specific value of λ, the number of repetitions and variance for each experiment, and the specific values of each bar in Figure 4 are not listed in the main text.
  6. Summarize the main content of the paper

    Injecting adversarial samples for data augmentation into the parameter-regularization DA framework, with improvement in most settings on three MIMIC-III tasks.

    A domain adaptation method paper for EHR predictive modeling, whose core is to maintain performance when the model is deployed across patient groups (grouped by age and sex).

    • Problem: EHR heterogeneity causes poor generalization of models on new patient groups; the authors focus on the scenario where source-domain data is inaccessible and only the source model is available.
    • Method: During target-domain training, an L2 distance term between source model and target model parameters is added to transfer knowledge, and iterative FGSM is used to generate adversarial samples in the source and target domains respectively and add them to training (weight α), all implemented based on logistic regression.
    • Result 1: In the domain shift evaluation, the in-hospital mortality prediction AUROC for training on Male and testing on Female is 0.799, based on which the authors consider the Male→Female transfer potential to be relatively large (Figure 1).
    • Result 2: With source-domain adversarial training only, almost all tasks outperform normal training except All→Younger; Male→Male reaches AUROC 0.8534 at α=0.1, and Male→Female reaches AUROC 0.8283 at α=0.3 (Figure 2).
    • Result 3: Under the full DA framework, source-domain adversarial training outperforms DA without adversarial training on 11/12 tasks, and target-domain adversarial training further improves on 9/12 tasks (Figure 4).
    • Authors' conclusion: The authors state that adversarial samples as data augmentation can improve the generalization of DA, and the effect is more pronounced on subgroups with smaller data volume; the authors also find that the parameters of adversarial training LR are close to those of sparse regularized LR (cosine similarity 0.81), which they consider offers a perspective for subsequent research.
Read originalarxiv.org