EVA-0: Test-Time Model Evolution with Only Two Forward Passes per Sample

Guohao Chen, Shuaicheng Niu, Geng Li, Yunbei Zhang, Shilin Shan, Chunyan Miao, Jianfei Yang

TL;DR

EVA-0 is a backpropagation-free test-time adaptation framework that allows deep learning models to adapt to real-world distribution shifts using a strict budget of just two forward passes per sample. By overcoming the core pitfalls of zeroth-order optimization—shortcut learning, weight drift, and noisy gradient estimation—EVA-0 matches or exceeds the accuracy of heavy backpropagation-based methods while delivering a 14× speedup over existing forward-only alternatives.

What Problem Does This Paper Address?

When machine learning models are deployed in the wild, they frequently encounter distribution shifts caused by changing weather, sensor degradation, or new environments. Test-Time Adaptation (TTA) attempts to solve this by updating the model online using unlabeled incoming data.

However, almost all standard TTA methods rely on backpropagation (BP) to calculate gradients. BP is incredibly memory-intensive, making it impractical for resource-constrained edge devices, specialized hardware accelerators, quantized networks, or black-box models accessed via APIs.

To avoid BP, researchers have turned to zeroth-order (ZO) optimization (forward-only adaptation). Unfortunately, existing ZO methods face a harsh trade-off: they either require dozens of forward passes per sample to find a good update direction (which is too slow), or they perform poorly under a strict efficiency budget. The authors identify three core obstacles holding back efficient ZO optimization at test time:

  1. Shortcut Exploitation: Models find "cheating" solutions to minimize unsupervised losses (like inflating logit norms to artificially lower entropy) without actually learning better features.
  2. Uncontrolled Weight Drift: Random ZO perturbations accumulate over time, causing the model's weights to drift away from the stable, pretrained region.
  3. Ineffective Direction Estimation: Finding an accurate update direction with minimal forward passes is incredibly noisy.
The three key challenges of zeroth-order test-time optimization: shortcut exploitation, scale-invariant loss mitigation, and weight drift control.

Methods

The authors introduce EVA-0 (Evolutionary Adaptation with Zeroth-Order gradients), a minimal framework designed to operate under a strict two-forward-pass-per-sample budget without any backpropagation. It relies on three core design principles:

  • Shortcut-Resistant Entropy Minimization ($E^{SR}$): To prevent the model from cheating by simply inflating its logit scales, EVA-0 introduces scale normalization and output decentering. This forces the optimization to focus on refining decision boundaries rather than exploiting logit-norm shortcuts.
  • Anchor-Guided Optimization (AGO): To combat weight drift, EVA-0 periodically steers a fraction of its coordinate exploration relative to a stable "anchor" (the original pretrained weights). It also applies a weak weight relaxation step to softly bound the optimization trajectory.
  • Sample-wise Symmetric Two-Sided Perturbation: Instead of perturbing an entire batch uniformly, EVA-0 applies independent, sample-wise perturbations. It uses two-sided Simultaneous Perturbation Stochastic Approximation (SPSA) to estimate cleaner update directions.

Datasets

The framework was evaluated on ImageNet-C, a benchmark designed to test model robustness against 15 different types of algorithmically generated corruptions (blur, noise, weather, and digital artifacts) at the highest severity level (Severity 5).

The authors tested EVA-0 across different architectures, including ViT-Base and ResNet50-GN, as well as post-training quantized models (8-bit and 6-bit PTQ4ViT).

Key Insights and Ideas

  • The Two-for-One Forward Pass: Standard two-sided SPSA requires two forward passes to estimate a gradient, plus a third "clean" pass for model inference. EVA-0 mathematically exploits local smoothness: by averaging the two symmetrically perturbed outputs, the first-order error terms cancel out. This provides a high-quality approximation of clean inference and a gradient estimate simultaneously, fitting both tasks into exactly two forward passes.
  • Sample-Level Diversity Beats Batch Averaging: In offline training, it is common to share a single random perturbation vector across an entire batch to reduce variance. However, at test time, the authors discovered that applying independent sample-wise perturbations yields a significantly higher directional similarity to the true backpropagation gradient.
Sample-wise independent perturbations yield significantly higher gradient similarity to true backpropagation gradients compared to shared batch-level perturbations.

Key Results

  • Superior Accuracy: On ViT-Base (ImageNet-C), EVA-0 achieved a top average accuracy of 66.7%, outperforming the popular backpropagation-based method DeYO (65.7%) and the forward-only method FOA (66.3%).
  • Massive Speedups and Memory Savings: Compared to FOA, which requires 28 forward passes, EVA-0 achieves a 14× wall-clock speedup (241s vs 3597s to process 50,000 images). Compared to BP-based TENT, EVA-0 reduces memory consumption from 5,165 MB to just 822 MB—a 6.3× reduction.
  • Long-Term Stability: In continual adaptation settings (where models face a stream of changing domains without being reset), standard forward-only methods collapse (FOA drops to 22.3% accuracy). EVA-0 maintains its stability, achieving 67.0% accuracy thanks to its anchor-guided trajectory control.
  • Quantized Edge Deployment: EVA-0 successfully adapted an ultra-low-resource 6-bit quantized ViT, allowing it to outperform a non-adapted, full-precision 32-bit ViT by 4.4% in out-of-distribution accuracy.

Limitations and Future Work

The primary limitation acknowledged by the authors is that EVA-0 was predominantly evaluated on standard computer vision tasks (image classification under corruption). While the underlying mathematical principles of scale-invariant objectives and two-sided SPSA inference are general, future work is required to validate its effectiveness on broader modalities, such as natural language processing (NLP), audio, or multi-modal video tasks.

Summary updated

BibTeX
@inproceedings{chen2026eva,
  author = {Guohao Chen and Shuaicheng Niu and Geng Li and Yunbei Zhang and Shilin Shan and Chunyan Miao and Jianfei Yang},
  title = {{EVA-0: Test-Time Model Evolution with Only Two Forward Passes per Sample}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=vrZyjNTvp5},
}
Figure