Skip to content

Treatment-Learning Causal Transformer (TLT) for Noisy Image ClassificationTreatment Learning Causal Transformer for Noisy Image Classification

arXiv· arXiv:2203.15529· IEEE Workshop/Winter Conference on Applications of Computer Vision 2023· Chao-Han Huck Yang, I-Te Danny Hung, Yi-Chieh Liu, Pin-Yu ChenGeorgia Institute of Technology; Columbia University; IBM ResearchIndexed by this site · 27 days ago· Originally publishedAttacks

Quick read

Other

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

The authors propose a causal Transformer architecture, TLT, which models the presence or absence of noise as a binary treatment; on NICO its accuracy is 65.98%, higher than StableNet's 59.76%.

Threat modelThis is not an attack/defense paper and has no adversarial threat model. Research setting: image classifiers face noisy inputs (context bias, additive perturbations, adversarial examples, etc.); whether noise is present is treated as a binary treatment t (visible during training, not visible at test time), and a causal graphical model with the do-operator is used to model the intervention, improving classification accuracy on noisy images.

Questions
Deep vision models rely on correlations between training and test data and degrade on noisy images such as context bias, additive noise, domain shift, and adversarial perturbations. The authors argue that noisy image classification requires the confounder-learning capability of the intervention level (level II) in the causal hierarchy.
Methods
Proposes Treatment Learning Causal Transformer (TLT): treats "whether noise exists" as a binary treatment, uses variational causal inference (a CEVAE-like encoder-decoder plus auxiliary losses) to estimate latent confounders, and uses Transformer attention with conditional queries for decoding; also builds a CPS dataset containing five types of perturbations.
Experiments and results
On NICO (compositional bias) TLT achieves 65.98% accuracy, higher than StableNet 59.76% and CEVAE' 62.17%; on each CPS perturbation setting TLT's accuracy is higher than CVAE' and CEVAE'; on the medical superclass original setting it reaches 88.74%; the authors state that the refutation tests validate its causal effect estimates.
Limitations and future work
The authors plan to extend the framework in the future to video detection, cross-modal adaptation, and VQA (Appendix G). The experiments cover only two datasets, NICO and the self-built CPS, and five types of artificial perturbations; the baselines are CVAE', CEVAE', StableNet, and CNBB; the paper does not report the number of training repetitions or statistical significance tests.
Experimental setupTreatment Learning Causal Transformer (TLT) · NICO、CPS (Causal Pairs, 基于 MS-COCO 与 Decathlon 构建) · Classification Accuracy、Average Treatment Effect (ATE) et al.
Evaluated models
Treatment Learning Causal Transformer (TLT)
Benchmarks
NICOCPS (Causal Pairs, 基于 MS-COCO 与 Decathlon 构建)
Metrics
Classification AccuracyAverage Treatment Effect (ATE)Treatment-Feature Ratio (TFR)saliency consistency
AI summaryThe Treatment-Learning Causal Transformer (TLT) introduces the presence or absence of noise as a binary treatment factor into image classification to improve prediction accuracy on noisy data. Inspired by causal variational inference, the architecture uses a latent-variable generative model to estimate robust features and selects, according to noise level, an inference network trained with a causal loss for prediction. The authors also constructed a new dataset containing noise such as target masks, style transfer, and adversarial perturbations, and state that its performance advantage was verified by multiple rebuttal-style evaluation metrics.

The Treatment-Learning Causal Transformer (TLT) introduces the presence or absence of noise as a binary treatment factor into image classification to improve prediction accuracy on noisy data. Inspired by causal variational inference, the architecture uses a latent-variable generative model to estimate robust features and selects, according to noise level, an inference network trained with a causal loss for prediction. The authors also constructed a new dataset containing noise such as target masks, style transfer, and adversarial perturbations, and state that its performance advantage was verified by multiple rebuttal-style evaluation metrics.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Solving noisy image classification: the authors model whether noise is present as a binary treatment and use causal inference to improve classification accuracy.

    Core problem: deep vision models rely on training-test correlation and degrade in performance on noisy images (spurious correlation, irrelevant context, domain shift, adversarial perturbation); the authors aim to use causal inference to improve accuracy in noisy image classification.

    • Problem setting and importance: The authors point out that current DNNs implicitly assume a strong correlation between training and test data, whereas real-world image classification often contains rich noisy context (e.g., pose variation, imperceptible perturbations), requiring "in the wild" generalization ability (Sec. 1).
    • Shortcomings of existing methods: The authors argue that existing visual causal work (e.g., direct causal models, DCM) treats only visual patterns as causes and hardly incorporates additional label information or treats noise as a treatment; NICO covers only contextual noise, and modeling large-scale artificial noise "remains unexplored" (Sec. 2).
    • Core observation and hypothesis: The authors elevate noisy image classification to level (II) (the interventional level) of Pearl's causal hierarchy, arguing that confounder learning and do-calculus are needed; each noisy image has an invisible clean version x̃ and binary treatment information t (Table 1, Sec. 3.1).
    • The paper proposes: 1) the TLT architecture—a Transformer based on treatment estimation and a causal variational generative model; 2) a new dataset, Causal Pairs (CPS), covering various artificial noises in general and medical images; 3) using statistical refutation tests to validate causal effects, and showing that TLT can improve visual saliency methods on noisy images (Sec. 1 contribution list).
    • Threat model: This is not an attack/defense paper and has no adversarial threat model; its research setting is:
      • Victim system: DNN image classifier (ResNet backbone).
      • Noise sources: contextual bias (NICO), additive perturbations (scrambling, style transfer, object masking, background refilling), and adversarial examples (FGSM, ℓ∞, ε=0.3; C&W and PGD are additionally tested in the appendix).
      • Defender knowledge: binary treatment labels t are visible during training; at test time t is invisible and inferred by the model (Sec. 3.2).
  2. What related research exists?

    Related work falls into three groups: noisy image classification, visual causal learning, and autoencoder causal inference; the baselines in this paper are CVAE', CEVAE', StableNet, and CNBB.

    Noisy image classification

    • Xiao et al. (2015)—used conditional generative models to characterize the relationship between images and noise types (e-commerce scenario); Han et al. (2019) and Li et al. (2017) used statistical sampling, and Gal et al. (2017) used active learning to learn directly from noisy data.
    • NICO (He et al., 2020) and the Strike simulator (Alcorn et al., 2019)—proposed context-independent noisy image datasets and evaluation; the paper notes that NICO emphasizes using statistical inference (such as causal models) to handle large-scale noisy contexts, but unlike NICO's contextual noise, "modeling large-scale artificial noise remains unexplored," so this paper builds its own CPS dataset containing artificial noise.

    Visual causal learning

    • Lopez-Paz et al. (2017)—used DNNs to discover causal signals among image class labels; the paper notes that such direct causal models (DCM, including Yang et al., 2019) treat visual patterns (such as texture) as causes and hardly incorporate additional label information (such as context) or treat noise as a treatment.
    • Chalupka et al. (2014)—used intervention experiments to locate causal relationships in the annotation process, which the paper says is relatively close to this work; but the authors believe treatment effect modeling and efficient learning model design remain underexplored (citing Pearl, 2019).
    • Other applications: Causal-GAN (Kocaoglu et al., 2017; Bahadori et al., 2017), scene graph generation (Tang et al., 2020), vision-language learning (Qi et al., 2020; Agarwal et al., 2020; Abbasnejad et al., 2020), semantic segmentation (Zhang et al., 2020).

    Autoencoder causal inference

    • TARNet (Shalit et al., 2017)—jointly used a causal graphical model inference loss and a feature reconstruction loss for linear regression, and the paper says its results outperform variational inference models.
    • CEVAE (Louizos et al., 2017)—linked causal inference with proxy variables and latent space learning, using the Rubin potential outcomes framework to approximate unobserved confounders; the paper says TLT shares a similar causal graphical model with CEVAE but differs in training objective and probabilistic encoding, and adds an attention mechanism for visual recognition.

    Baselines and benchmarks: The experimental baselines are a modified CVAE (CVAE') and a modified CEVAE (CEVAE', both enhanced with ResNet, with parameter counts of about 7.1M aligned with TLT); on NICO, StableNet (Zhang et al., 2021) and CNBB (He et al., 2020) are also compared; the benchmarks are NICO and the self-built CPS. The authors position this paper as combining treatment estimation with causal variational generative models into a Transformer architecture, and covering artificial noise settings not addressed by NICO.

  3. How does the paper address this problem?

    TLT: models noise as a binary treatment, uses CEVAE-like variational inference plus conditional query attention decoding, and switches prediction networks according to the inferred noise level.

    Overall approach: whether noise is present is taken as a binary treatment t, a causal graphical model with latent confounder Z is built, variational inference approximates the posterior, and Transformer attention estimates robust representations from the observed input; at test time the noise level is inferred by q(t|x) and the corresponding inference subnetwork is switched to for prediction. The method is named Treatment Learning Causal Transformer (TLT).

    Problem formalization (causal hierarchy)

    • Non-causal models (such as ResNet) sit at level (I) of the causal hierarchy and model only P(y|x); the authors argue that noisy image classification belongs to level (II) (the intervention level) and requires do-calculus (Table 1).
    • Formalization: for a noisy input xi, assume an unobserved clean image x̃i and treatment ti exist; the intervention observation is modeled as P(xi)=P(do(x̃i))≡P(x̃i|ti), and the prediction is P(yi|xi) = P(yi|do(x̃i), zi) = P(yi|x̃i, ti, zi), i.e., the proxy variables (zi, ti) answer the lower-level question (Eq. 1).
    • Two treatment scenarios (Table 2): Case 1 contextual noise (NICO, t=1 indicates an additional semantic pattern such as "waterside"); Case 2 additive artificial perturbation (CPS, t=1 indicates artificial noise is applied).

    Training objective (variational causal inference)

    • Based on a conditional variational encoder-decoder framework; the model network (decoder) factorizes as p(z)=N(0,1), p(t|z)=Bern(σ(f1(z))), p(y|z,t)=σ(t·f2(z)+(1−t)·f3(z)), where fk are Adaptive Average Pooling + Linear layers.
    • The inference network (encoder) introduces auxiliary distributions q(t|x)=Bern(σ(g1(x))) and q(y|x,t)=σ(t·g2(x)+(1−t)·g3(x)), plus an auxiliary loss Laux (summing log q(t|x) and log q(y|x,t) over N samples, Eq. 4).
    • The posterior approximation q(z|x,y,t) switches between two sets of mean/variance networks according to t (one set each for t=0 and t=1), and the shared representation g0(x,y) uses bilinear fusion rather than concatenation.
    • The total objective is the variational lower bound: LTLT = Laux + ∑i Eq(zi|xi,ti,yi)[log p(xi,ti|zi) + log p(yi|ti,zi) + log p(zi) − log q(zi|xi,ti,yi)] (Eq. 6), i.e., the reconstruction, treatment, and outcome likelihoods minus the KL term.

    Attention mechanism

    • The disturbance signal Hz produced by q(y|x,t) serves as the query and the image features Hx as key/value: Q=unroll(FQ(Hz)), K, V=unroll(FK,V(Hx)), ai=softmax(QKᵀ/√dk)V (Eq. 7–8); FQ, FK, FV are convolutional networks.
    • The posterior approximation is extended with q(t|x) and p(a|x) as p(z)←q(z|x,a,y,t) (Eq. 9); feature extraction uses a ResNet34 encoder, input images 128×128, feature maps 4×4 (Fig. 2).

    Data construction and evaluation method

    • CPS construction: 6 easily confused classes from MS-COCO form 3 causal pairs (giraffe-elephant 3316 images, stop sign-fire hydrant 2419 images, bike-motorcycle 4729 images), with the class pairs selected by a similarity survey of 1000 Amazon Mechanical Turk volunteers; the medical superclass uses Decathlon's 2630 training + 658 test CT images across 10 disease types. 50% of images are randomly selected for visual modification (Fig. 3, Sec. 4.3).
    • Five perturbations (treatments): image scrambling, neural style transfer, adversarial examples (FGSM, ℓ∞, ε=0.3), object masking, background refilling (Sec. 4.4).
    • Causal effect evaluation: average treatment effect (ATE), plus three types of refutation tests—random common cause variable (Tc), placebo treatment (Tp/T r), random subset (Ts); interventions are implemented by applying different proportions of flip errors to the t labels (Sec. 4.1, Appendix E).
  4. What experiments did the paper conduct?

    TLT achieves higher accuracy than CVAE' and CEVAE' on each noise setting of NICO and CPS, and passes three types of causal refutation tests; there is also a medical case and a manual saliency evaluation.

    Experimental setup

    • Models tested: TLT (7.39M parameters); baselines CVAE' and CEVAE' (both enhanced with ResNet and attention, about 7.1M parameters, aligned with TLT); on NICO, StableNet (Zhang et al., 2021) and CNBB (He et al., 2020, appendix Table 11 only) are additionally compared.
    • Datasets: NICO (19 classes, 188 contexts, 25,000 images, standard evaluation protocol, compositional bias used in the main text); CPS (13,752 images, 3 general superclass causal pairs + 10 medical superclass CT classes, with 50% of images perturbed in each).
    • Metrics: classification accuracy (%, with ± error) and ATE; the appendix additionally has TFR scores and saliency agreement rate.
    • Perturbation setting: Table 4 evaluates five perturbations plus the original images at treatment noise level n=0.05.
    • Training details (Appendix D): Adam, learning rate 0.001, batch size 128, ImageNet pretrained initialization, a single GTX 2080 Ti; the paper does not report the number of repetitions or statistical significance tests.
    • Review method: medical saliency was independently reviewed by 3 thoracic surgeons (average 6.43 years of experience) on 100 generated images for saliency and diagnostic agreement.

    Main results

    According to Table 4 (CPS, n=0.05, accuracy %) and Table 5 (NICO, compositional bias, accuracy %):

    Swipe horizontally to read the table

    SettingCVAE'CEVAE'TLT
    CPS Original (no t)83.31±0.1283.31±0.2383.31±0.13
    CPS Style Transfer73.67±0.3174.34±0.2676.12±0.27
    CPS Image Scrambling72.31±1.2776.21±0.8180.12±0.54
    CPS Adversarial (FGSM)79.12±0.2581.12±0.1783.12±0.12
    CPS Object Masking70.12±0.1972.73±0.2173.06±0.11
    CPS Background Refilling71.32±0.2872.59±0.2973.91±0.17
    NICO (StableNet 59.76±1.52)57.23±2.1262.17±1.8265.98±1.74
    • The authors state that TLT outperforms both baselines on all CPS settings, with margins from 1.60% to 7.81%; on NICO it achieves the best 65.98%.
    • Exception: on the original (no treatment) setting all three have the same accuracy (83.31%); on the Style Transfer setting TLT's ATE (0.318) is lower than CVAE''s (0.354), which the authors explain as the inference network learning a representation that relies less on edges and textures.
    • The authors also state that the causal values of ST (0.318–0.354) are higher than those of modifications such as IS and AE, consistent with research showing DNNs prefer edges and textures (Geirhos et al., 2019).

    Medical superclass case and manual evaluation

    • What was tested: classification and ATE on the Decathlon medical superclass, and physician evaluation of guided Grad-CAM saliency.
    • Results: TLT achieves 88.74% accuracy on the original setting and 82.57% on the scrambling setting (Sec. 5.1); saliency agreement rate is 61.2% for TLT, higher than VAERes 48.1% and CEVAE*Res 58.8%, while random saliency is only 3.2% (Appendix B.2, 3 physicians, 100 images).
    • Authors' interpretation: TLT is most effective on noisy medical image classification and is more sensitive to ATE measurement of adversarial examples; the three physicians independently and consistently gave TLT's saliency attributes the highest confidence scores.

    Statistical refutation of causal effects

    • What was tested: three tests under the standard refutation setting—random common cause (Tc), placebo treatment (Tp), random subset (Ts)—to validate the ATE estimates (Appendix E, Table 13/15).
    • Results: in Table 15, TLT's original ATE is 0.2432, 0.2431 after Tc and 0.2481 after Ts (close to the original value), and 0.0114 after Tp (close to 0); in Table 13, TLT's Tp values under each treatment range from 0.00479 to 0.037.
    • Exception: in Table 13, under the IS setting CEVAEatt's original ATE (0.2948) is slightly higher than TLT's (0.288), and under the IM setting CEVAEatt (0.22) and CVAE' (0.222) are also higher than TLT (0.1855); the authors overall call the method "robust".

    Other ablations and analyses

    • Architecture ablation (Table 9, COCOCP validation accuracy): ResNet 81.23% → CVAE' 82.31% → CEVAE' 82.68% → TLT 84.32%; the authors state that the attention mechanism contributes the most and that bilinear fusion outperforms concatenation.
    • Parameter alignment (Table 10): TLT at 7.39M reaches 84.92%, higher than CVAE'+4 Resblocks (7.83M, 81.96%) and CEVAE'+Attention (7.81M, 83.62%).
    • Adversarial attacks as treatment (Table 8): TLT achieves 92.86% on FGSM, 88.12% on C&W, and 89.43% on PGD, all higher than the baselines; note that under C&W, CEVAE' (74.23%) is lower than CVAE' (82.32%).
    • Masking ratio (Table 12/14): as the masking ratio rises from 10% to 100%, the accuracy of each model decreases, and TLT is highest at most ratios (e.g., 83.06% at OM 100%).
    • Three bias settings on NICO (Table 11): TLT achieves 57.02%, 58.75%, and 60.98% under minimum/proportional/compositional bias, respectively, all higher than CNBB, CVAE', and CEVAE'.
    • t-SNE visualization (Fig. 4b): the authors state that the manifold learned by TLT has the largest within-cluster pairwise distance between additive-noise (t=1) and original (t=0) samples; the figure shows t=1 and t=0 samples forming clusters with different distributions.
  5. What are some points that can be further explored?

    The authors plan to extend to video detection, cross-model adaption, and VQA; the experiments cover only two datasets, five perturbations, and a small number of baselines.

    Limitations and future directions noted by the authors

    • The authors plan to extend the causal framework to more vision tasks, such as video detection, cross-model adaption, and VQA (Appendix G Future Work).
    • The authors state that reproducible code has been provided in the supplementary material and that they plan to open-source it (Appendix D.1).
    • The main text has no dedicated Limitations section; apart from the above, no other limitations are explicitly stated.

    Scope of experiments

    • The models tested are TLT and the baselines CVAE' and CEVAE', plus StableNet and CNBB on NICO (Appendix Table 11), 5 in total; all baselines are generative models, enhanced with ResNet and attention and parameter-aligned to about 7.1M–7.83M (Sec. 5.1, Table 10).
    • The datasets are NICO (25,000 images) and the self-built CPS (13,752 images, 3 general pairs + 10 medical classes); perturbations cover five types: scrambling, style transfer, FGSM adversarial examples, object masking, and background refilling, with C&W and PGD additionally tested in the appendix (Table 8).
    • Adversarial examples use only FGSM (ε=0.3, ℓ∞) as the main-text treatment; adaptive attacks were not tested; C&W and PGD appear only in appendix ablations.
    • The manual medical saliency evaluation has a sample size of 100 images and 3 thoracic surgeons (Appendix B.2).
    • The paper does not report the number of training repetitions, statistical significance tests, or the specific meaning of the ± error in Table 4 (standard deviation or confidence interval).
  6. Summarize the main content of the paper

    TLT models noise as a binary treatment for causal variational inference, exceeds generative baselines in accuracy on NICO and the self-built CPS, and passes causal refutation tests.

    A paper at the intersection of causal inference and visual classification: addressing the performance degradation of DNNs on noisy images (context bias, additive perturbations, adversarial examples), the authors raise the problem to the intervention level (level II) of Pearl's causal hierarchy and propose the Treatment Learning Causal Transformer (TLT).

    • Method highlights: whether noise is present is treated as a binary treatment t (visible during training, inferred at test time by q(t|x)); a CEVAE-like variational encoder-decoder with auxiliary losses estimates the latent confounder Z, then Transformer attention decoding is performed with q(y|x,t) as the conditional query and image features as key/value; two prediction subnetworks are switched according to t.
    • Data contribution: a self-built CPS dataset (13,752 images) containing three pairs of easily confused MS-COCO classes (selected by a survey of 1000 Turk volunteers) and Decathlon medical CT, with five perturbations as treatments.
    • Main results: on NICO (compositional bias) TLT achieves 65.98%, higher than StableNet 59.76% and CEVAE' 62.17% (Table 5); on all six CPS settings TLT has the highest accuracy, with margins of 1.60%–7.81% (Table 4); 88.74% on the medical superclass original setting.
    • Validation and additional findings: under the three refutation tests, TLT's ATE remains essentially unchanged after the random common cause and subset tests and is close to 0 after the placebo treatment (Table 15); the agreement rate between saliency and the diagnoses of 3 physicians is 61.2%, higher than the baselines' 48.1% and 58.8%.
    • Exceptions: on the original no-noise setting the three models have the same accuracy (83.31%); on Style Transfer ATE, TLT (0.318) is lower than CVAE' (0.354).
    • Authors' conclusion: the authors state that the results validate TLT's causal effects and believe this provides a promising direction for cross-disciplinary research between deep learning and visual causal inference; future plans include extending to video detection, cross-model adaption, and VQA.
Read originalIEEE Workshop/Winter Conference on Applications of Computer Vision 2023