Adapting in the Dark: Efficient and Stable Test-Time Adaptation for Black-Box Models

arXiv cs.LG / 4/20/2026

📰 NewsIdeas & Deep AnalysisTools & Practical UsageModels & Research

Key Points

  • The paper addresses test-time adaptation (TTA) for black-box models accessed only through APIs, where prior methods are either too limited or too expensive to deploy due to high query costs.
  • It proposes BETA (Black-box Efficient Test-time Adaptation), which uses a lightweight local white-box “steering” model to provide a tractable gradient pathway without changing the black-box interface.
  • BETA combines prediction harmonization, consistency regularization, and prompt-learning-oriented filtering to achieve stable adaptation with no additional API calls and minimal latency.
  • Experiments on ImageNet-C show accuracy gains of +7.1% for ViT-B/16 and +3.4% for CLIP, outperforming established baselines such as TENT and TPT.
  • On a commercial API, BETA matches ZOO performance at 250x lower cost while retaining real-time inference speed, positioning it as a practical solution for real-world black-box TTA.

Abstract

Test-Time Adaptation (TTA) for black-box models accessible only via APIs remains a largely unexplored challenge. Existing approaches such as post-hoc output refinement offer limited adaptive capacity, while Zeroth-Order Optimization (ZOO) enables input-space adaptation but faces high query costs and optimization challenges in the unsupervised TTA setting. We introduce BETA (Black-box Efficient Test-time Adaptation), a framework that addresses these limitations by employing a lightweight, local white-box steering model to create a tractable gradient pathway. Through a prediction harmonization technique combined with consistency regularization and prompt learning-oriented filtering, BETA enables stable adaptation with no additional API calls and negligible latency beyond standard inference. On ImageNet-C, BETA achieves a +7.1% accuracy gain on ViT-B/16 and +3.4% on CLIP, surpassing strong white-box and gray-box methods including TENT and TPT. On a commercial API, BETA achieves comparable performance to ZOO at 250x lower cost while maintaining real-time inference speed, establishing it as a practical and efficient solution for real-world black-box TTA.