Rapid Network Adaptation: Learning to Adapt Neural Networks Using
  Test-Time Feedback
We propose a method for adapting neural networks to distribution shifts at
test-time. In contrast to training-time robustness mechanisms that attempt to
anticipate and counter the shift, we create a closed-loop system and make use
of a test-time feedback signal to adapt a network on the fly. We show that this
loop can be effectively implemented using a learning-based function, which
realizes an amortized optimizer for the network. This leads to an adaptation
method, named Rapid Network Adaptation (RNA), that is notably more flexible and
orders of magnitude faster than the baselines. Through a broad set of
experiments using various adaptation signals and target tasks, we study the
efficiency and flexibility of this method. We perform the evaluations using
various datasets (Taskonomy, Replica, ScanNet, Hypersim, COCO, ImageNet), tasks
(depth, optical flow, semantic segmentation, classification), and distribution
shifts (Cross-datasets, 2D and 3D Common Corruptions) with promising results.
We end with a discussion on general formulations for handling distribution
shifts and our observations from comparing with similar approaches from other
domains.
Teresa Yeo, Oğuzhan Fatih Kar, Zahra Sodagar, Amir Zamir
# Rapid Network Adaptation:

###### Abstract

We propose a method for adapting neural networks to distribution shifts at test-time. In contrast to **training-time** robustness mechanisms that attempt to **anticipate** and counter the shift, we create a **closed-loop** system and make use of a **test-time** feedback signal to adapt a network on the fly. We show that this loop can be effectively implemented using a **learning-based function**, which realizes an **amortized optimizer** for the network. This leads to an adaptation method, named Rapid Network Adaptation (RNA), that is notably **more flexible** and **orders of magnitude faster** than the baselines. Through a broad set of experiments using various adaptation signals and target tasks, we study the efficiency and flexibility of this method. We perform the evaluations using various datasets (Taskonomy, Replica, ScanNet, Hypersim, COCO, ImageNet), tasks (depth, optical flow, semantic segmentation, classification), and distribution shifts (Cross-datasets, 2D and 3D Common Corruptions) with promising results. We end with a discussion on general formulations for handling distribution shifts and our observations from comparing with similar approaches from other domains.

## 1 Introduction

Neural networks are found to be unreliable against distribution shifts [23, 37, 48, 46, 30]. Examples of such shifts include blur due to camera motion, object occlusions, changes in weather conditions and lighting, etc. The _training-time_ strategies to deal with this issue attempt to _anticipate_ the shifts that may occur and _counter_ them at the training stage - for instance, by augmenting the training data or updating the architecture with corresponding robustness inductive biases. As the possible shifts are _numerous_ and _unpredictable_, this approach has inherent limitations. This is the main motivation behind _test-time_ adaptation methods, which instead aim to _adapt_ to such shifts as they occur and recover from failure. In other words, these methods choose adaptation over anticipation (see Fig. 1). In this work, we propose a test-time adaptation framework that aims to perform an _efficient_ adaptation of a given main network using a feedback signal.

One can consider performing "test-time optimization" (TTO) for this purpose, similar to previous works [100, 117, 28]. This involves using SGD to finetune

Figure 1: **Adaptive vs non-adaptive neural network pipelines.**_Top:_ In order to be robust, non-adaptive methods include training-time interventions that _anticipate and counter_ the distribution shifts that will occur at test-time (_e.g._, via data augmentation). The learned model, \(f_{\theta}\), is frozen at test-time, thus upon encountering an out-of-distribution input, its predictions may collapse. _Bottom:_ Adaptive methods create a _closed-loop_ and use an _adaptation signal_ at test-time. The adaptation signal is a quantity that can be computed at test-time from the environment. \(h_{\phi}\) acts as a “controller” by taking in an error feedback, computed from the adaptation signal and model predictions, to adapt \(f_{\theta}\) accordingly. It can be implemented as a **(i)** standard optimizer (_e.g._, using SGD) or **(ii)** neural network. The former is equivalent to test-time optimization (TTO), while the latter aims to _amortize_ the optimization process, by training a controller network to adapt \(f_{\theta}\) – thus, it can be more efficient and flexible. In this work, we study the latter approach and show its efficiency and flexibility.
the network to reduce a proxy loss. While this can successfully adapt a network, it is unnecessarily _inefficient_ as it does not make use of the learnable regularities in the adaptation process, and consequently, unconducive for real-world applications. It also results in a _rigid_ framework as the update mechanism is fixed to be the same as the training process of neural networks (SGD). We show this process can be effectively amortized using a learning-based feed-forward controller network, which yields orders of magnitude _faster_ results (See Fig. 1, Sec. 4.3). In addition, it provides _flexibility_ advantages as the controller is implemented using a neural network and can be engineered to include arbitrary inductive biases and desired features that could counter the suboptimalities of the adaptation signal.

## 2 Related Work

Our work focuses on how to adapt a neural network in an efficient way at test-time on a range tasks and adaptation signals. We give an overview of relevant topics.

**Robustness methods**_anticipate_ the distribution shift that can occur and incorporate inductive biases into the model to help it generalize. Popular methods include data augmentation [67, 116, 63, 39, 112, 110, 36, 48], self-/pre-training [38, 104, 26, 78, 105, 81, 34], architectural changes [19, 8, 89, 68, 61] or ensembling [53, 73, 108, 79, 43, 74]. We focus on adaptation mechanisms and identifying practical adaptation signals that can be used at _test-time_.

**Conditioning methods** use _auxiliary inputs_ to adapt a model. Some examples include using HyperNetworks [33, 47] or cross-attention [86, 97]. A popular method that has been adopted in different problem settings, _e.g_., style transfer [25, 31, 40], few-shot learning [72, 83, 120, 95, 45], is performing feature-wise modulation [24, 77]. It involves training a model to use the auxiliary information to predict affine transformation parameters that will be applied to the features of the target model. Our formulation can be viewed to be a form of conditioning, and we show it results in a framework that is expressive, efficient, and generalizable.

**Amortized optimization methods** make use of learning to improve (_e.g_., speed-up) the solution of optimization problems, particularly for settings that require repeatedly solving similar instances of the same underlying problem [54, 11, 4, 115, 27, 103, 66, 14, 3]. Fully amortized optimization methods model the shared structure between past instances of solved problems to regress the solution to a new problem [33, 21, 57]. As adapting to distribution shifts can be cast as solving an optimization problem at test-time, our method can be seen as an amortized solution.

**Test-time adaptation methods for geometric tasks.** Many existing frameworks, especially in geometric tasks such as aligning a 3D object model with an image of it, in effect instantiate a task-specific case of closed-loop optimization for each image [66, 115, 69]. Common sources of their adaptation quantity include sensor data [101, 107, 15, 98, 111, 18], structure from motion (SFM) [102, 52], motion [12], and photometric and multi-view consistency constraints (MVC) [64, 50]. Many of the latter methods often focus on depth prediction and they introduce losses that are task-specific, _e.g_., [102] optimize a photometric consistency loss. We differ by aiming to investigate a more general framework for test-time adaptation that can be applied to several tasks. For MVC, while we adopt the same losses as [64], we show under collapsed predictions, optimizing only MVC constraints is not sufficient for recovering predictions; depth predictions need to be adapted and this can be done efficiently using our proposed framework (see Sec. 4.3).

**Test-time adaptation methods for semantic tasks.** Most of these works involve optimizing a self-supervised objective at test-time [92, 100, 60, 28, 29, 117, 9, 56, 109]. They differ in the choice of self-supervised objectives, _e.g_., prediction entropy [100], mutual information [56], and parameters optimized [9]. However, as we will discuss in Sec. 3.2, and as shown by [9, 28, 71], existing methods can _fail silently_, i.e. successful optimization of the adaptation signal loss does not necessarily result in better performance on the target task. We aim to have a more efficient and flexible method and also show that using proper adaptation signals results in improved performance.

**Weak supervision for semantic tasks** uses imperfect, _e.g_., sparse and noisy supervision, for learning. In the case of semantic segmentation, examples include scribbles [58] and sparse annotations [7, 75, 90, 118, 17]. For classification, coarse labels are employed in different works [106, 41]. We aim to have a more general method and adopt these as test-time adaptation signals. Further, we show that self-supervised vision backbones, _e.g_., DINO [10], can also be used to generate such signals and are useful for adaptation (See Sec. 3.2).

**Multi-modal frameworks** are models that can use the information from multiple sources, _e.g_., RGB image, text, audio, etc., [13, 5, 93, 55, 2, 16, 78, 1, 6, 32]. Schematically, our method has similarities to multi-modal learning (as many amortized optimization methods do) since it simultaneously uses an input RGB image and an adaptation signal. The main distinction is that our method implements a particular process toward adapting a network to a shift using an adaptation signal from the environment - as opposed to a generic multi-modal learning.

## 3 Method

In Fig. 1, we schematically compared methods that incorporate robustness mechanisms at training-time (thus anticipating the distribution shift) with those that adapt to shifts at test-time. Our focus is on the latter. In this section, we first discuss the benefits and downsides of com
mon adaptation methods (Sec. 3.1). We then propose an adaptation method that is fast and can be applied to several tasks (Sec. 3.1.1). To adapt, one also needs to be able to compute an adaptation signal, or _proxy_, at the test-time. In Sec. 3.2, we study a number of practical adaptation signals for a number of tasks.

### How to adapt at test-time?

An adaptive system is one that can respond to changes in its environment. More concretely, it is a system that can acquire information to characterize such changes, _e.g_., via an adaptation signal that provides an error feedback, and make modifications that would result in a reduction of this error (see Fig. 1). The methods for performing the adaptation of the network range from gradient-based updates, _e.g_. using SGD to fine-tune the parameters [92, 100, 28], to the more efficient semi-amortized [120, 96] and amortized approaches [99, 72, 83] (see Fig. 6 of [83] for an overview). As amortization methods train a controller network to substitute the explicit optimization process, they only require a forward pass at test-time. Thus, they are computationally efficient. Gradient-based approaches, _e.g_., TTO, can be powerful adaptation methods when the test-time signal is robust and well-suited for the task (see Fig. 4). However, they are inefficient, have the risk of failing silently and the need for carefully tuned optimization hyperparameters [9]. In this work, we focus on an amortization-based approach.

**Notation.** We use \(\mathcal{X}\) to denote the input image domain, and \(\mathcal{Y}\) to denote the target domain for a given task. We use \(f_{\theta}:\mathcal{X}\rightarrow\mathcal{Y}\) to denote the model to be adapted, where \(\theta\) denotes the model parameters. We denote the model before and after adaptation as \(f_{\theta}\) and \(f_{\hat{\theta}}\) respectively. \(\mathcal{L}\) and \(\mathcal{D}\) are the original training loss and training dataset of \(f_{\theta}\), _e.g_., for classification, \(\mathcal{L}\) will be the cross-entropy loss and \(\mathcal{D}\) the ImageNet training data. As shown in Fig. 1, \(h_{\phi}\) is a controller for \(f_{\theta}\). It can be an optimization algorithm, _e.g_., SGD, or a neural network. \(\phi\) denotes the optimization hyperparameters or the network's parameters. The former case corresponds to TTO, and the latter is the proposed RNA, which will be explained in the next subsection. Finally, the function \(g:\mathcal{X}^{M}\rightarrow\mathcal{Z}\) returns the adaptation signal by mapping a set of images \(\mathcal{B}=\{I_{1},...,I_{M}\}\in\mathcal{X}^{M}\) to a vector \(g(\mathcal{B})=z\in\mathcal{Z}\). This function \(g\) is given, _e.g_., for depth, \(g\) returns the sparse depth measurements from SFM.

#### 3.1.1 Rapid Network Adaptation (RNA)

For adaptation, we use a neural network for \(h_{\phi}\). The adaptation signal and model predictions are passed as inputs to \(h_{\phi}\) and it is trained to regress the parameters \(\hat{\theta}(\phi)=h_{\phi}(f_{\theta}(\mathcal{B}),z)\). This corresponds to an objective-based amortization of the TTO process [3]. Using both the adaptation signal \(z\) and model prediction \(f_{\theta}(\mathcal{B})\) informs the controller network about the potential _errors_ of the model. Note that we do not need to regress the gradients of the optimization process. Instead, we _simulate_ TTO by training RNA to reduce errors in the predictions using the error feedback signal. That is, the training objective for \(h_{\phi}\) is \(\min_{\phi}\,\mathbb{E}_{\mathcal{D}}\left[\mathcal{L}(f_{\hat{\theta}(\phi) }(\mathcal{B}),y)\right]\), where \((\mathcal{B},y)\sim\mathcal{D}\) is a training batch sampled from \(\mathcal{D}\). Note that the **original weights of \(f\) are frozen** and \(h_{\phi}\)**is a small network**, having only 5-20% of the number of parameters of \(f\), depending on the task. We call this method as _rapid network adaptation_ (RNA) and experiment with different variants of it in Sec. 4.

There exist various options for implementing the amortization process, _e.g_., \(h_{\phi}\) can be trained to update the input image or the weights of \(f_{\theta}\). We choose to modulate the features of \(f_{\theta}\) as it has been shown to work well in different domains [24] and gave the best results. To do this, we insert \(k\) Feature-wise Linear Modulation (FiLM) layers [77] into \(f_{\theta}\) (see Fig. 2). Each FiLM layer performs: FiLM\((\mathbf{x}_{i};\gamma_{i},\beta_{i})=\gamma_{i}\odot\mathbf{x}_{i}+\beta_{i}\), where \(\mathbf{x}_{i}\) is the activation of layer \(i\). \(h_{\phi}\) is a network that takes as input the adaptation signal \(z\) and model predictions and outputs the coefficients \(\{\gamma_{i},\beta_{i}\}\) of all \(k\) FiLM layers. \(h_{\phi}\) is trained on the same dataset \(\mathcal{D}\) as \(f_{\theta}\), therefore, unlike TTO, it is _never exposed to distribution shifts during training_. Moreover, it is able to generalize to unseen shifts (see Sec. 4.3). See the supplementary for the full details, other RNA implementations we investigated, and a comparison of RNA against other approaches that aim to handle distribution shifts.

### Which test-time adaptation signals to use?

While developing adaptation signals is not the main focus of this study and is independent of the RNA method, we need to choose some for experimentation. Existing test-time adaptation signals, or proxies, in the literature include prediction entropy [100], spatial autoencoding [28], and self-supervised tasks like rotation prediction [92], contrastive [60] or clustering [9] objectives. The more aligned the adaptation signal is to the target task, the better the performance on the target task [92, 60]. More importantly, a poor signal can cause the adaptation to fail silently [9, 28]. Figure 3 shows how the original loss on the target task changes as different proxy losses from the literature, i.e. en

Figure 2: **Architecture of RNA.**\(x\) is the input image, \(f_{\theta}\) is the model to be adapted and \(f_{\theta}(x)\) the corresponding prediction. To perform adaptation, we freeze the parameters of \(f_{\theta}\) and insert several FiLM layers into \(f_{\theta}\). We then train \(h_{\phi}\) to take in \(z\), the adaptation signal, and \(f_{\theta}(x)\) to predict the parameters of these FiLM layers. This results in an adapted model \(f_{\hat{\theta}}\) and improved predictions, \(f_{\hat{\theta}}(x)\).
tropy [100], consistency between different middle domains [108, 113] are minimized. In all cases, the proxy loss decreases, however, the improvement in the target loss varies. Thus, successful optimization of existing proxy losses does not necessarily lead to better performance on the target task. In this paper, we adopt a few practical and real-world signals for our study. Furthermore, **RNA turns out to be less susceptible to a poor adaptation signal vs TTO** (see supplementary Tab. 1). This is because RNA is a neural network _trained_ to use these signals to improve the target task, as opposed to being fixed at being SGD, like in TTO.

#### 3.2.1 Employed test-time adaptation signals

We develop test-time adaptation signals for several geometric and semantic tasks as shown in Fig. 4. Our focus is not on providing an extensive list of adaptation signals, but rather on using practical ones for experimenting with RNA as well as demonstrating the benefits of using signals that are rooted in the known structure of the world and the task in hand. For example, geometric computer vision tasks naturally follow the multi-view geometry constraints, thus making that a proper candidate for approximating the test-time error, and consequently, an informative adaptation signal.

**Geometric Tasks.** The field of multi-view geometry and its theorems, rooted in the 3D structure of the world, provide a rich source of adaptation signals. We demonstrate our results on the following target tasks: monocular depth estimation, optical-flow estimation, and 3D reconstruction. For all, we first run a standard structure-from-motion (SFM) pipeline [88] to get sparse 3D keypoints. For depth estimation, we employ the z-coordinates of the sparse 3D keypoints i.e., noisy sparse depth, from each image as the adaptation signal. For optical flow, we perform keypoint matching across images. This returns noisy sparse optical flow which we use as the adaptation signal. Lastly, for 3D reconstruction, in addition to the previous two signals, we employ consistency between depth and optical flow predictions as another signal.

**Semantic Tasks.** For semantic segmentation, we first experiment with using a low number of click annotations for each class, similar to the works on active annotation tools [17, 90, 75]. This gives us sparse segmentation annotations. Likewise, for classification, we use the hierarchical structure of semantic classes, and use coarse labels generated from the WordNet tree [70], similar to [42]. Although these signals (click annotations and coarse labels) are significantly weaker versions of the actual ground truth, thus being cheaper to obtain, it may not be realistic to assume access to them at test-time for certain applications, _e.g_., real-time ones. Thus, we also show how these can be obtained via \(k\)-NN retrieval from the training dataset and patch matching using spatial features obtained from a pre-trained self-supervised vision backbone [10] (see Fig. 4).

To perform adaptation with RNA at test-time, we first compute the adaptation signal for the given task as described above. The computed signal and the prediction from the model before adaptation, \(f_{\theta}\), are concatenated to form the error feedback. This error feedback is then passed as inputs to \(h_{\phi}\) (see Fig. 1). These adaptation signals are practical for real-world use but they are also imperfect i.e., the sparse depth points do not correspond to the ground truth values. Thus, to perform controlled experiments and separate the performance of RNA and adaptation signals, we also provide experiments using ideal adaptation signals, e.g., masked ground truth. In the real world, these ideal signals can come from sensors like LiDAR.

## 4 Experiments

We demonstrate that our approach consistently outperforms the baselines for adaptation to **different distribu

Figure 4: **Examples of employed test-time adaptation signals.** We use a range of adaptation signals in our experiments. These are practical to obtain and yield better performance compared to other proxies. In the left plot, for depth and optical flow estimation, we use sparse depth and optical flow via SFM. In the middle, for classification, for each test image, we perform \(k\)-NN retrieval to get \(k\) training images. Each of these retrieved image has a one lot labeled associated with it, thus, combining them gives us a coarse label that we use as our adaptation signal. Finally, for semantic segmentation, after performing \(k\)-NN as we did for classification, we get a pseudo-labelled segmentation mask for each of these images. The features for each patch in the test image and the retrieved images are matched. The top matches are used as sparse supervision. See Sec. 4.1 for more details.

Figure 3: **Adaptation using different signals. Not all improvements in proxy loss translates into improving the target task’s performance.** We show the results of adapting a pre-trained depth estimation model to a dex-cuts blur corruption by optimizing different adaptation signals: prediction entropy [100], a self-supervised task (sobel edge prediction error [108]), and sparse depth obtained from SFM. The plots show how the \(\ell_{1}\) target error with respect to ground-truth depth (green, left axis) changes as the proxy losses (blue, right axis) are optimized (shaded regions represent the 95% confidence intervals across multiple runs of stochastic gradient descent (SGD) with different learning rates). Only adaptation with the sparse depth (SFM) proxy leads to a reduction of the target error. This signifies the importance of employing proper signals in an adaptation framework. Furthermore, we show that RNA is less susceptible to poorer adaptation signal, which results in comparable or improved performance while being significantly faster (see supplementary Table 1).
tion shifts** (2D and 3D Common Corruptions [37, 48, 49], cross-datasets), over **different tasks** (monocular depth, image classification, semantic segmentation, optical flow) and **datasets** (Taskonomy [114], Replica [91], ImageNet [22], COCO [59], ScanNet [20], Hypersim [84]). The source code can be found on our project page.

### Experimental Setup

We describe our experimental setup, i.e. different adaptation signals, adaptation mechanisms, datasets and baselines, for different tasks. See Tab. 1 for a summary.

**Baselines.** We evaluate the following baselines:

_Pre-Adaptation Baseline_: The network \(f_{\theta}\) that maps from RGB to the target task,, depth estimation, with no test-time adaptation. We denote this as Baseline for brevity.

_Densification_: A network that maps from the given adaptation signal for the target task to the target task,, sparse depth from SFM to dense depth. This is a control baseline and shows what can be learned from the test-time supervision alone, without employing input image information or a designed adaptation architecture. See Sec. 4.3 for a variant which includes the image as an additional input.

_TTO (episodic)_: We adapt the Baseline model, \(f_{\theta}\), to each batch of input images by optimizing the loss computed from the prediction and adaptation signal (see Tab. 1 for the adaptation signal used for each task) at test-time. Its weights are reset to the Baseline model's after optimizing each batch, similar to [100, 117].

_TTO (online)_: We continually adapt to a distribution shift defined by a corruption and severity. Test data is assumed to arrive in a stream, and each data point has the same distribution shift,, noise with a fixed standard deviation [100, 92]. The difference with TTO (episodic) is that the model weights are not reset after each iteration. We denote this as TTO for brevity.

_TTO with Entropy supervision (TENT [100])_: We adapt the Baseline model trained with log-likelihood loss by optimizing the entropy of the predictions. This is to reveal the effectiveness of entropy as a signal as proposed in [100].

_TTO with Sobel Edges supervision (TTO-Edges)_: We adapt the Baseline model trained with an additional decoder that predicts a self-supervised task, similar to [92]. We choose to predict Sobel edges as it has been shown to be robust to certain shifts [108]. We optimize the error of the edges predicted by the model and edges extracted from the RGB image to reveal the value of edge error as a supervision.

**RNA configurations.** At test-time, we first get the predictions of the Baseline model and compute the adaptation signal. The predictions and adaptation signal are then concatenated and passed to \(h_{\phi}\) which adapts \(f_{\theta}\) to \(f_{\hat{\theta}}\). The test images are then passed to \(f_{\hat{\theta}}\) to get the final predictions. We evaluate following variants of RNA.

_RNA (frozen \(f\))_: Baseline model weights, \(f_{\theta}\), are frozen when training \(h_{\phi}\). We call this variant _RNA_ for brevity.

_RNA (jointly trained \(f\))_: In contrast to the _frozen \(f\)_ variant, here we train \(h_{\phi}\) jointly with the Baseline network. This variant requires longer training.

**Adaptation signal.** As described in Sec. 3.2, we compute a broad range of test-time signals from the following processes. Each case describes a process applied on query image(s) in order to extract a test-time quantity. As mentioned in Sec. 3.2.1, the adaptation signal and prediction from \(f_{\theta}\) form the error feedback and the input to \(h_{\phi}\).

_Structure-from-motion (SFM)_: Given a batch of query images, we use COLMAP [88] to run SFM, which returns sparse depth. The percentage of valid pixels, i.e. depth measurements, is about 0.16% on Replica-CC and 0.18% on Replica. For ScanNet we use the pre-computed sparse depth from [85], which has about 0.04% valid pixels. As running SFM on corrupted images results in noisy sparse depth, we train \(h_{\phi}\) to be invariant to noise from the _adaptation signal_[111, 85]. Note that RNA is always trained with clean RGB inputs and only the signal has been corrupted during training.

_Masked ground truth (GT)_: We apply a random mask to the GT depth of the test image. We fixed the valid pixels to 0.05% of all pixels, i.e. similar sparsity as SFM (see the supplementary for other values). This a _control_ proxy as it enables a better evaluation of the adaptation methods without conflating with the shortcomings of adaptation signals. It is also a scalable way of simulating sparse depth from real-world sensors,, LiDAR, as also done in [101, 65, 44].

_Click annotations_: We generate click annotations over random pixels for each class in a given image using GT - simulating an active annotation pipeline. The number of pixels ranges from 3 to 25, i.e. roughly 0.01% of the total pixels, similar to [7, 75, 90, 118, 17].

_Patch matching_: To not use GT click annotations, for each test image, we first retrieve its \(k\)-NN images from the original clean training dataset using DINO features [10]. We

Figure 5: RNA can achieve similar performance as TTO in a much shorter time. We compare how the \(\ell_{1}\) errors of the adaptation mechanisms decrease over wall-clock time (s). The errors are averaged over all episodes (and all corruptions for Replica-CC). RNA only requires a forward pass at test-time, while TTO requires multiple forward and backward passes. On ScanNet and Replica-CC, RNA takes 0.01s, while TTO takes 3s to achieve similar performance. Furthermore, RNA is _not trained with test-time shifts_ unlike TTO, thus, it learned to use the additional supervision to adapt to _unseen shifts_.
then get segmentation masks on these \(k\) images. If the training dataset has labels for segmentation we use them directly, otherwise we obtain them from a pretrained network. For each of the \(k\) training images and test image, we extract non-overlapping patches. The features for each patch that lie inside the segmentation masks of the \(k\) training images are matched to the features of every patch in the test image. These matches are then filtered and used as sparse segmentation annotations. See Fig. 4 for illustration.

_Coarse labels (WordNet)_: We generate 45 coarse labels from the 1000-way ImageNet labels, i.e. making the labels 22x coarser, using the WordNet tree [70], similar to [41]. See supplementary for more details on the construction and results for other coarse label sets.

_Coarse labels (DINO \(k\)-NN)_: For each test image, we retrieve the \(k\)-NN images from the training dataset using DINO features [10]. Each of these \(k\) training images is associated with an ImageNet class, thus, combining \(k\) one-hot labels gives us a coarse label.

_Keypoint matching_: We perform keypoint matching across images to get sparse optical flow.

### Adaptation with RNA vs TTO

Here we summarize our observations from adapting with RNA vs TTO. As described, TTO represents the approach of closed-loop adaptation using the adaptation signal but without benefiting from any amortization and learning (the adaptation process is fixed to be standard SGD). These observations hold across different tasks. See Sec. 4.3 for results.

**RNA is efficient.** As RNA only requires a forward pass at test-time, it is orders of magnitude faster than TTO and is able to attain comparable performance to TTO. In Fig. 5, we compare the runtime of adaption with RNA and TTO for depth prediction. On average, for a given episode, RNA obtains similar performance as TTO in 0.01s, compared to TTO's 3-5s. Similarly, for dense 3D reconstruction, RNA is able to adapt in 0.008s compared to TTO's 66s (see Fig. 9). This suggests a successful amortization of the adaptation optimization by RNA.

Furthermore, RNA's training is also efficient as it only requires training a small model, i.e. 5-20% of the Baseline model's parameters, depending on the task. Thus, RNA has a fixed overhead, and small added cost at test-time.

**RNA's predictions are sharper than TTO for dense prediction tasks.** From the last two rows of Fig. 6, it can be seen that RNA retains fine-grained details. This is a noteworthy point and can be attributed to the fact that _RNA benefits from a neural network, thus its inductive biases can be beneficial (and further engineered) for such advantages_. This is a general feature that RNA, and more broadly using a learning-based function to amortize adaptation optimization, brings - in contrast to limiting the adaptation process to be SGD, as represented by TTO.

**RNA generalizes to unseen shifts.** RNA performs better than TTO for low severities (see supplementary for more details). However, as it was _not exposed to any corruptions_, the performance gap against TTO narrows at high severities as expected, which is _exposed to corruptions_ at test-time.

We hypothesize that the generalization property of RNA is due to the following reasons. Even though \(f_{\theta}\) was trained to convergence, it does not achieve exactly 0 error. Thus, when \(h_{\phi}\) is trained with a frozen \(f_{\theta}\) with the training data, it can still learn to correct the errors of \(f_{\theta}\), thus, adapting \(f_{\theta}\).

### Experiments using Various Target Tasks

In this section, we provide a more comprehensive set of evaluations covering various target tasks and adaptation signals. In all cases, RNA is a fixed general framework without being engineered for each task and shows supportive results.

**Depth.** We demonstrate the results quantitatively in Tab. 2 and Fig. 5 and qualitatively in Fig. 6. In Tab. 2, we compare RNA against all baselines, and over several distribution shifts and different adaptation signals. Our RNA variants outperform the baselines overall. TTO (online) has a better performance than TTO (episodic) as it assumes a smoothly changing distribution shift, and it continuously updates the model weights. RNA (jointly trained \(f\)) has a better performance among RNA variants. This is reasonable as the target model is not frozen, thus, is less restrictive.

As another baseline, we trained a single model that takes as input _a concatenation of the RGB image and sparse supervision_, i.e. multi-modal input. However, its average per

\begin{table}
\begin{tabular}{l|l l l l l} \hline \hline
**Task** & **Adaptation signal** & **Adapted model** & **Training data** & **ODOD evaluation data** & **Baselines** \\ \hline \multirow{2}{*}{Depth} & \multirow{2}{*}{SFM, marked GT} & \multirow{2}{*}{UNet [57], DPT [80]} & \multirow{2}{*}{Taxonomy} & _For SYM:_Regina, Replica-CC, ScanNet, & Pre-adaptation, classification, \\  & & & & _For small GT:_Taxonomy-CC,_DTC:_Hyperprint_ & TINT, TTO edges, TTO \\ \hline \multirow{2}{*}{Optical flow} & \multirow{2}{*}{Keypoint matching} & \multirow{2}{*}{RAPT [80]} & \multirow{2}{*}{FlyingChain, PlyingThings [80]} & \multirow{2}{*}{Replica-CC} & Pre-adaptation \\ \cline{1-1} \cline{5-5} \cline{7-7} \multirow{2}{*}{3D reconstruction} & \multirow{2}{*}{SFM, keypoint matching, consistency} & \multirow{2}{*}{Depth, optical flow models} & \multirow{2}{*}{Depth, optical flow data} & \multirow{2}{*}{Replica-CC} & Pre-adaptation, TTO \\ \cline{1-1} \cline{5-5} \cline{7-7} \multirow{2}{*}{Semantic segmentation} & \multirow{2}{*}{Click annotations, patch matching} & \multirow{2}{*}{FCN [62]} & \multirow{2}{*}{COCO} & \multirow{2}{*}{FCFC} & \multirow{2}{*}{FCFC} \\ \cline{1-1} \cline{5-5} \cline{7-7} \multirow{2}{*}{Classification} & \multirow{2}{*}{Came labels} & & (D classes from Pascal VOC) & \multirow{2}{*}{For patch matching: ImageNet-C} & \multirow{2}{*}{deactivation, TENT, TTO} \\ \cline{1-1} \cline{5-5} \cline{7-7}  & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: **Overview of the experiments for different target tasks, adaptation methods, and adaptation signals. For each task, we list the adaptation signal (Sec. 3.2) that we use for adaptation. We also list the models that we adapt, and the out-of-distribution (OOD) data used for evaluations and the relevant baselines. When there are different options for adaptation signal, _e.g._, in the case of depth, the signal is denoted in italics followed by the corresponding OOD dataset. The weights for the semantic segmentation, classification and optical flow models were taken from PyTorch [76].**
formance on Taskonomy-CC was 42.5% worse than RNA's (see sup. mat. Sec. 3.2). Among the baselines that do not adapt, densification is the strongest under distribution shift due to corruptions. This is expected as it does not take the RGB image as input, thus, it is not affected by the underlying distribution shift. However, as seen from the qualitative results in Figs. 6, 7, unlike RNA, densification is unable to predict fine-grained details (which quantitative metrics often do not well capture). We also show that the gap between RNA and densification widens with sparser supervision (see sup. mat. Fig. 1), which confirms that RNA is making use of the error feedback signal, to adapt \(f\).

**Dense 3D Reconstruction.** We aim to reconstruct a 3D point cloud of a scene given a sequence of corrupted images. To do so, we make use of multiple adaptation signals from multi-view geometry. First, we compute the noisy sparse depth and optical flow from SFM and use it to

\begin{table}
\begin{tabular}{l|c c c|c c c|c|c} \hline \hline
**Adaptation Signal** & \multicolumn{4}{c|}{**SFM**} & \multicolumn{4}{c|}{**Sparse CT**} & \multicolumn{1}{c}{**Relative**} \\ \hline
**Dataset** & \multicolumn{1}{c}{**Rogica**} & \multicolumn{1}{c|}{**ScansNet**} & \multicolumn{1}{c}{**Tashionometry**} & \multicolumn{1}{c|}{**Hypermin**} & \multicolumn{1}{c}{**Rantine**} \\ \hline
**Sift** & **CDS** & **CC** & **CDS** & **None** & **CC** & **3DCC** & **CDS** & \\ \hline Pre-algorithmic Baseline & 1.75 & 6.08 & 3.30 & 2.68 & 5.74 & 4.75 & 33.64 & 1.00 \\ Densification & 2.50 & 4.19 & 2.33 & 1.72 & 1.72 & 1.72 & 17.25 & 1.00 \\ TENT [100] & 2.03 & 6.09 & 4.03 & 5.51 & 5.51 & 4.48 & 35.45 & 15.85 \\ TOT-dglies [72] & 1.73 & 6.14 & 3.28 & 2.70 & 5.69 & 4.74 & 33.69 & 20.95 \\ RNA (from \(f\)) & 1.72 & 4.26 & **1.77** & **1.12** & 1.68 & 1.49 & 16.17 & **1.56** \\ RNA (jointly trained \(f\)) & **1.66** & 3.41 & **1.74** & **1.11** & **1.50** & **1.37** & 17.13 & **1.56** \\ \hline \hline \end{tabular}
\end{table}
Table 2: **Quantitative adaptation results on depth estimation. \(\ell_{1}\) errors on the depth prediction task. (Lower is better. Multiplied by 100 for readability. The best models within 0.0003 error are shown in bold).) We generate distribution shifts by applying Common Corruptions (CC), 3D Common Corruptions (3DCC) and from performing cross-dataset evaluations (CDS). The results from CC and 3DCC are averaged over all distortions and severity levels on Taskonomy and 3 severity levels on Replica data. The adaptation signal from Taskonomy is masked GT (fixed at 0.05% valid pixels) while that from Replica and ScanNet is sparse depth from SFM. RNA and TTO notably outperform the baselines. RNA successfully matches the performance of TTO while being around 10 times faster.** See supplementary for the losses for different corruption types, sparsity levels, and the results of applying RNA to other adaptation signals.**

Figure 6: **Qualitative results of RNA vs the baselines for semantic segmentation on random query images on COCO-CC (left) and depth on images from ScanNet, Taskonomy-3DCC and Replica-CC (right). For semantic segmentation, we use 15 pixel annotations per class. For Taskonomy-3DCC, we use sparse depth with 0.05% valid pixels (30 pixels per image). See Fig. 7 for results on different adaptation signal levels. For ScanNet and Replica-CC, the adaptation signal is sparse depth measurements from SFM [88] with similar sparsity ratios to Taskonomy-3DCC. The predictions with proposed adaptation signals are shown in the last two rows. They are noticeably more accurate compared to the baselines. Comparing TTO and RNA’s predictions are more accurate for segmentation, and sharper than TTO for depth (see the ellipses) while being significantly faster. See 4.2 and supplementary for more results.**

Figure 7: **Qualitative adaptation results on semantic segmentation on random query images on COCO-CC. RNA notably improves the prediction quality using error feedback from as few as 3 random pixels.**
adapt the depth and optical flow models. The results from this adaptation can be found in the previous paragraph (for depth) and supplementary (for optical flow). Next, the two models are adapted to make their predictions consistent with each other. This is achieved using multi-view consistency (MVC) constraints, similar to [64]. The predictions from the adapted models are then used in the backprojection to attain a 3D point cloud.

Figure 9 shows the point cloud visualizations on a scene from the Replica dataset. The sequence of input images was corrupted with Gaussian Noise. This results in collapsed depth predictions, thus, the reconstructions are poor (Baseline column) and performing MVC is not helpful (Baseline+MVC). Adapting the depth predictions using TTO and MVC improves the reconstruction notably while RNA achieves a similar performance significantly faster.

**Semantic Segmentation.** We experiment with click annotations and DINO patch matching as adaptation signals.

_Click annotations:_ In Fig. 8, we show how the IoU changes with the adaptation signal level on COCO-CC. As the Baseline and TENT do not make use of this signal, their IoU is a straight line. RNA clearly outperforms the baselines for all levels of adaptation signal. Figure 7 shows the qualitative results with increasing supervision, and Fig. 6 (left) a comparison against all baselines, demonstrating higher quality predictions with RNA.

_DINO patch matching:_ We perform patch matching on DINO features (described in Sec. 4.1) to get the adaptation signal. As the patch matching process can be computationally expensive, we demonstrate our results on all cat classes in ImageNet and over one noise, blur and digital corruption for 3 levels of severity. We used the predictions of a pre-trained FCN on the clean images as pseudolabels to compute IoU. The mean IoU averaged over these corruptions and severities is 48.98 for the baseline model, 53.45 for TTO. RNA obtains a better IOU of 58.04, thus it can make use of the sparse annotations from DINO patch matching.

**Image Classification.** We experiment with coarse labels from WordNet and DINO \(k\)-NN as adaptation signals.

_Coarse labels (WordNet):_ Table 3 shows the results from using 45-coarse labels on ImageNet-{C,3DCC,V2}. This corresponds to 22x coarser supervision compared to the 1000 classes that we are evaluating on. TENT seems to have notable improvements in performance under corruptions for classification, unlike for semantic segmentation and depth. We show that using coarse supervision results in even better performance, about a further 5 pp reduction

Figure 8: **Quantitative adaptation results on semantic segmentation**. Each point shows the mean IOU over 15 corruptions and 5 severities. RNA significantly improves over baselines. Black dashed line shows the mean IOU of the baseline model for _clean_ validation images, and is provided as an upper bound on performance. Numbers in the legend denote averages over all supervision pixel counts. See supplementary for a breakdown.

\begin{table}
\begin{tabular}{l l|c c c c c} \hline \hline
**Adaptation Signal** & **Dataset** & **Class** & **IN-C** & **IN-M** & **DNC-V2** & **IoU-Baseline** \\ \hline \multirow{2}{*}{-} & Pre-algorithm Baseline & 32.83 & 61.66 & 54.97 & 37.15 & 1.00 \\  & TENT & 24.67 & 64.19 & 47.13 & 37.07 & 5.31 \\ \hline \multirow{2}{*}{\begin{tabular}{l} Coarse labels \\ (nonlinear) \\ \end{tabular} } & Descriptor & 55.95 & 55.90 & 55.90 & 55.00 \\  & TTO (online) & 24.72 & **64.20** & **46.30** & 36.70 & 5.72 \\  & ERA (linear \(f\)) & **16.72** & 41.21 & **40.37** & **25.53** & **1.39** \\ \hline \multirow{2}{*}{
\begin{tabular}{l} Coarse labels \\ (DEN) \\ \end{tabular} } & DINO (\(k\)-NN) & 35.56 & 25.64 & 48.24 & 37.39 & - & - \\  & TTO (online) & 24.59 & 51.59 & 49.18 & 36.69 & 5.72 \\ \cline{1-1}  & ERA (linear \(f\)) & 24.36 & 54.86 & 52.29 & 36.88 & **1.39** \\ \hline \hline \end{tabular}
\end{table}
Table 3: **Quantitative adaptation results on on ImageNet (IN) classification task.** We evaluate on the clean validation set, ImageNet-{C,3DCC,V2}. We report average error (%) for 1000-way classification task over all corruptions and severities. For the coarse labels with WordNet supervision, we use 45-coarse labels. For DINO \(k\)-NN, we set \(k=20\).

Figure 9: **Adaptation results for 3D reconstruction.** Using appropriate adaptation signals from multi-view geometry can recover accurate 3D reconstructions. We report the average \(\ell_{1}\) error between ground truth 3D coordinates and the estimated ones. The titles above each column refers to the depth model used to get the reconstruction. TTO+MVC corresponds to the predictions after multi-view consistency optimization. It can be seen that RNA and TTO improve the reconstructions over the baselines with RNA being significantly faster. See supplementary Fig. 4 for more results and the corresponding error maps.
in error. Furthermore, on uncorrupted data, i.e. clean, and ImageNet-V2 [82], RNA gives roughly 10 pp improvement in performance compared to TTO. Thus, coarse supervision provides a useful signal for adaptation while requiring much less effort than full annotation [106]. See supplementary for results on other coarse sets.

_Coarse labels (DINO \(k\)-NN):_ We also show results from using coarse sets generated from DINO \(k\)-NN retrieval. This is shown in the last 3 rows of Tab. 3. Both RNA and TTO use this coarse information to outperform the non-adaptive baselines. However, they do not always outperform TENT, which could be due to the noise in retrieval.

### Ablations and additional results

**Adaptation of other architectures of the main network \(f_{\theta}\).** Previous results in the paper were from adapting \(f_{\theta}\) with a UNet architecture. Here, we study the performance of RNA on other architectures of \(f_{\theta}\), namely, the dense prediction transformer (DPT) [80] for depth and ConvNext [61] for image classification. Table 4 shows the results of incorporating RNA to these architectures. In both cases, RNA is able to improve on the error and runtime of TTO. Thus, RNA can be applied to a range of architectures.

**Controlling for different number of parameters.** We ran a control experiment where all methods have the same architecture, thus, same number of parameters. The results are in Table 5. RNA still returns the best performance. Thus, its improvement over the baselines is not due to a different architecture or number of parameters but due to its test-time adaptation mechanism.

**Implementations of \(h_{\phi}\) with different architectures.** We experiment with different architectures for \(h_{\phi}\)_e.g._, HyperNetworks [33], other FiLM variants, or adapting the input instead of the model parameters. Instead of adding FiLM layers to adapt \(f_{\theta}\) (denoted as FiLM-\(f\)), as described in Sec. 3.1, we also experimented with adding FiLM layers to a UNet model that is trained to update the input image \(x\) (denoted as FiLM-\(x\)). For FiLM-\(x\), only \(x\) is updated and there is no adaptation on \(f_{\theta}\). Lastly, as Hypernetworks [33] have been shown to be expressive and suitable for adaptation, we trained a HyperNetwork, in this case an MLP, to predict the weights of a 3-layer convolutional network that updates \(x\) (denoted as HyperNetwork-\(x\)). The results of adaptation with these variants of RNA are shown in Table 6. The FiLM-\(f\) variant performed best, thus, we adopted it as our main architecture. See supplementary Sec. 2.2 for further details and a conceptual discussion on the trade-offs of the choices of implementing this closed-loop "control" system, namely those that make stronger model-based assumptions.

## 5 Approaches for handling distribution shifts

In this section, we provide a unified discussion about the approaches that aim to handle distribution shifts. Figure 10 gives an overview of how these approaches can be characterized. **Open-loop** systems predict \(y\) by only using their inputs _without receiving feedback_. Training-time robustness methods, image modifications, and multi-modal methods fall into this category. These methods assume the learned model is frozen at the test-time. Thus, they aim to incorporate inductive biases at training time that could be useful against distribution shifts at the test-time. The **closed-loop** systems, on the other hand, are _adaptive_ as they make use of a live error feedback signal that can be computed at test-time from the model predictions and an adaptation signal.

**Model-based vs. Model-free**: The closed-loop systems can be instantiated as _model-based_ or _model-free_ adaptation methods. The former involves making stronger assumptions and performs adaptation by estimating the parameters of _specifically modeled distribution shifts_ (e.g. blur) using the feedback signal. This is depicted as \(e\) in Fig. 10. While this approach often leads to strongly handling the modeled shift and a more interpretable system, conversely it is less likely to generalize to shifts that were not modeled. Our experiments with modeling possible distribution shifts, e.g. the intensity of a noise or blur corruption, did not show significantly better results than the model-free variant, likely for this reason (see supplementary, Sec. 2.2). In contrast, model-free methods do not make explicit assumptions

\begin{table}
\begin{tabular}{l|c c c|c c c} \hline \hline
**Method/Sight** & **None** & **Talcohn/ency-CC** & **Talcohn/ency-300C** & **Hypern** & **BlandedMC** \\ \hline Pre-align & 0.027 & 0.057 & 0.048 & 0.336 & 3.450 \\ RNA (ObjectNet-\(x\)) & 0.019 & 0.041 & 0.003 & 0.257 & 2.887 \\ RNA (FiLM-\(x\)) & 0.019 & 0.009 & 0.003 & 0.279 & 2.636 \\ RNA (FiLM-\(f\)) & 0.013 & 0.004 & 0.000 & 0.198 & 2.310 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Implementations of the controller network \(h_{\phi}\) with different architectures. \(\ell_{1}\) errors on the depth estimation task under distribution shifts are reported. The adaptation signal here is masked GT, fixed at 0.05% of valid pixels.

\begin{table}
\begin{tabular}{l|c c c c c} \hline \hline
**Shift** & 
\begin{tabular}{c} **Pre-adaptation** \\ **Baseline** \\ \end{tabular} & **Densification** & **TTO** & **RNA** \\ \hline CC & 0.045 & 0.023 & 0.019 & **0.018** \\ \hline \hline \end{tabular}
\end{table}
Table 5: Controlling for number of parameters. \(\ell_{1}\) errors (multiplied by 100 for readability) on the depth estimation task, evaluated on the Taskonomy test set under a subset of common corruptions. Each method is using the same architecture and number of parameters. The adaptation signal here is masked GT, fixed at 0.05% of valid pixels.
about the distributions shifts and learn to adapt only from the data and based on the error feedback signal. Our proposed method RNA belongs to model-free approaches, and as we showed in the paper, it generalized to a diverse set of unseen distribution shifts.

**Observations on RNA vs. RMA**[51]. It should be noted that the above observation about model-free vs. model-based approaches and estimating distribution shifts with specific fixed parameters varies based on the domain and problem of interest. For example, in Rapid Motor Adaptation (RMA), Kumar et al. [51] learned to adapt a policy for legged robots from the data that simulated a fixed set of relevant environment parameters, such as ground friction, terrain height, etc. They showed predicting environment shifts grounded in this fixed set of parameters turns out to be sufficient for a robust adaption generalizable from the simulator to various challenging real-world scenarios. This success _did not duplicate_ for the image recognition problems addressed in this paper despite our attempts. This can be attributed to the lack of a similarly comprehensive simulator and relevant parameter set to sufficiently encapsulate real-world image distortions, as well as possibly the lack of needed inductive biases in the adaption networks.

**RNA vs. Denoising.** The denoising methods, and in general the methods performing modification in the input image, e.g., domain adaptation methods that aim to map an image in the target domain to the style of the source domain [119], are concerned with reconstructing plausible images _without_ taking the downstream prediction \(x\to y\) into account (shown as gray in Fig. 10). Moreover, it has been shown that imperceptible artifacts in the denoised & modified image could result in degraded predictions [37, 108, 29]. In contrast, RNA performs updates with the goal of reducing the error of the target task.

**Multi-modal methods.** The closed-loop adaptation methods have schematic similarities to multi-modal learning approaches as they simultaneously use multiple input sources: an RGB input image and an adaptation signal. The main distinction is the adaptation methods implement a particular process toward adapting a network to a shift using an adaptation signal from the environment - as opposed to performing a generic learning using multiple inputs.

**Using only the adaptation signal \(z\) vs. error feedback as input to \(h_{\phi}\).** In the case where only the adaptation signal, \(z\), is passed as input, it is possible that the side-network is implicitly modelling an error feedback signal. This is because it is trained alongside the main model (\(x\to y\)), thus, it sees and learns to correct the main model's errors during training. We found that having an error feedback signal as input results in better performance on average, thus, we adopted this as our main method.

## 6 Conclusion and Limitations

We presented RNA, a method for efficient adaptation of neural networks at test-time using a closed-loop formulation. It involves training a side network to use a test-time adaptation signal to adapt a main network. This network acts akin to a "controller" and adapts the main network based on the adaptation signal. We showed that this general and flexible framework can generalize to unseen shifts, and as it only requires a forward pass at test-time, it is orders of magnitude faster than TTO. We evaluated this approach using a diverse set of adaptation signals and target tasks. We briefly discuss the limitations and potential future works:

_Different instantiation of RNA and amortization._ While we experimented with several RNA variants (see supplementary for details), further investigation toward a stronger instantiation of RNA which can generalize to more shifts and handle more drastic changes, e.g. via building in a more explicit "model" of the shifts and environment (see the discussion about [51]), is important. In general, as the role of the controller network is to amortize the training optimization of the main network, the amortized optimization literature [3] is one apt resource to consult for this purpose.

Figure 10: An overview of methods that aim to handle distribution shifts. Left: Open-loop systems predict \(y\) by only using their inputs _without receiving feedback_. The first and popular example of open-loop systems is training-time robustness methods (data augmentation, architectural changes, etc.). The next example is the methods that modify the input \(x\), e.g. denoising or style changes, to recover the original image before corruption, independent of \(y\). Furthermore, there are multi-modal methods that use an additional input \(z\). As the learned model is frozen at test-time, these methods need to _anticipate_ the distribution shift by incorporating inductive biases at training time (See also Fig. 1 of the main paper). **Right:** In contrast, closed-loop systems make use of its current output, \(y\), and an adaptation signal, \(z\), to form an _error feedback signal_ that can be used to update its predictions. Thus, they _adapt_ to the shifts as they occur. We can then group closed-loop systems into model-based and model-free methods. The former performs adaptation by estimating the parameters \(e\) of specific modeled distribution shift families, while the latter performs adaptation in a data-driven way without explicitly modeling certain distribution shifts. Adaptation can be performed via running an optimization, i.e. TTO via SGD, or via amortization, i.e., training a side controller network to predict TTO updates that minimize the error feedback. Our proposed method, RNA, belongs to the model-free adaptation approach that makes use of amortization for efficiency.
_Hybrid mechanism for activating TTO in RNA_. TTO constantly adapts a model to a distribution shift, hence, in theory, it can adapt to any shift despite being comparatively inefficient. To have the best of both worlds, investigating mechanisms for selectively activating TTO within RNA when needed can be useful.

_Finding adaptation signals for a given task._ While the focus of this study was not on developing new adaption signals, we demonstrated useful ones for several core vision tasks, but there are many more. Finding these signals requires either knowledge of the target task so a meaningful signal can be accordingly engineered or core theoretical works on understanding how a proxy and target objectives can be "aligned" for training.

**Acknowledgement:** The authors would like to thank Onur Beker. This work was partially supported by the ETH4D and EPFL EssentialTech Centre Humanitarian Action Challenge Grant.
