Forget, Anticipate and Adapt: Test Time Training for Long Videos


Abstract

Test Time Training (TTT) is a mechanism in which a model adapts to an incoming test-sample by performing some self-supervised (SSL) task and updating its weights even during inference. This procedure does not require labels at test-time. This paper focuses on TTT for long-videos. A major concern with existing approaches is: 1) they perform TTT updates using a sliding window containing frames in the past, whose compute increases linearly with the size of window. This becomes computationally intractable when the videos are hours long. 2) TTT is performed even when temporally close frames look similar, thereby consuming a lot of compute.
We present the Frame Forgetting Network (FFN) that: 1) operates on only three frames within the sliding window, namely the frame that exits, the current frame and the frame after that. The model still manages to retain temporal context and work for hours long-videos; 2) mathematically define a ‘surprise’ metric: how much ‘new information’ the incoming frame contains with respect to the past seen frame. This facilitates determining how to modify the effective window size during TTT and constitutes the core mechanism of an adaptive windowing algorithm. Additionally, we curate a dataset EpicTours containing up to 3 hour long videos of walking city-tours, whereas earlier datasets on this problem were only 5 min long. We demonstrate FFN’s empirical effectiveness on dense-segmentation, video classification tasks, generalization to depth-estimation, and multi-hour long videos. The project page can be found at https://github.com/rajatmodi62/ffn.

1 Introduction↩︎

Typically, machine learning models only update their weights during training, but freeze them during inference[1], [2]. However, as humans, we possess the ability to continuously learn and adapt to our ever-changing environment. Test Time Training (TTT) shows the promise of bringing a similar adaptive capability to artificial intelligence, allowing a model to continuously learn and update its weights even while testing, entirely without the need for ground-truth labels.
However, applying TTT to video processing presents a unique set of challenges. Existing online distillation methods are based on a student-teacher setup [3], with the teacher usually deployed on a remote server and the student on a local device. However, this is a bottleneck in offline real-world scenarios, such as disaster-prone regions, where server connectivity may be limited.
Consequently, the key challenge lies in determining how to perform TTT on videos locally, on-device, and computationally cheaply. This is especially critical for dense computer vision tasks, such as segmentation, where each pixel matters, and should ideally be achieved utilizing a single model.
Historically, there have been two approaches towards adaptation: either (i) train a dedicated video model specifically for the task, or (ii) start from a pre-trained image model and adapt it accordingly. Unfortunately, large-scale pre-training datasets for video remain limited, and efforts to repurpose image models are inherently constrained by the absence of explicit temporal information. Furthermore, existing TTT methods for videos rely on a sliding window approach[4]. A sliding window serves as a fixed-size temporal buffer that holds a defined number of preceding frames and moves forward step by step as the video advances. Because the model re-evaluates all frames currently inside this window, it performs a duplicate, highly expensive computation at every single timestep. This redundant computation is far too prohibitive for long videos, thereby limiting practical deployment
To overcome these limitations, we propose the Frame Forgetting Network (FFN). Our approach is built on the core insight that as the sliding window progresses, only one new frame enters, and one frame exits. Thus, a model only needs to pay the computational cost of processing these crucial frames instead of recalculating the entire window for every time-step.
Our FFN consists of two core components: a Memory Restoration Mechanism (MRM) and an Adaptive Window Algorithm (AWA). The MRM allows the model to actively ‘forget’ its adaptation on past frames exiting the window and ‘restore’ the model’s original predicted features using a temporal module. Next, the AWA algorithm can dynamically ‘anticipate’ when adaptation is required, improving the management of computational load. Through extensive experiments across \(11\) datasets, we validate FFN’s competitive performance on dense segmentation tasks, strong generalization on depth estimation, and ability to learn stable representations during recurrent video-processing.

2 Frame Forgetting Network↩︎

First, we shall talk about our problem statement, cover preliminaries on TTT, and then discuss our Frame Forgetting Network (FFN).

2.1 Problem statement↩︎

Given a streaming long-video \(\mathcal{V}=\{x_1,x_2,x_t,...,x_n\}\), a model can access only the past frames \(x_1,x_2,...,x_{t-1}\), the current frame \(x_t\), but not the future. The problem is focused on adaptation: for \(x_{t}\), how does the model decide when to ‘adapt’ or not. This adaptation should help improve downstream performance and be cheaper to compute. In this work, we focus on adaptation using TTT, an instantiation that allows a model to even update its weights during inference.

2.2 Preliminaries↩︎

TTT involves two phases, a) Training Time Training and b) Test Time Training.
Training Time Training: Fig1 (i) illustrates how a TTT setup works. We consider a model containing backbone \(f\), a downstream head \(h\) and a self-supervised (SSL) head \(g\) specializing in some task that does not require external labels (e.g., image reconstruction). First, we train \((f,g,h)\) jointly in a train set, which consists of densely-annotated images. This first phase is known as training-time-training[4].

Figure 1: (i) Test Time Training setup: Here f is image-backbone, g is SSL head, h downstream head. Learning is self-supervised, where input test sample x_{t} is transformed into x_{t'} and compared again with x_{t}. (ii) TTT on videos relies on sliding windows, we denote two such windows W_t, W_{t+1} . Notice that they contain a lot of overlapping frames, requiring N operations everytime. (iii) (Ours) We can perform TTT by gradually operating on only 3 frames via a ‘forget, anticipate, adapt’ procedure.

Test Time Training: Here, the model is given access to a test-video consisting of several frames. The model looks at an incoming frame \(x_t\) and tries to reconstruct it. As in Fig1, this involves feed-forwarding \(x_t\) through the backbone \(f\), then through the SSL-head \(g\), thus computing the RGB reconstruction \(x'_t\). Next, we estimate the reconstruction loss \(\ell_{s}(x'_t, x_t)\), where \(x'_t = g{\circ}f(x_t)\). This may be used to update \(f,g\) over several iterations. The downstream head \(h\) is kept frozen throughout. This is known as test-time-training.

2.3 The Principle of locality↩︎

Figure 2: The Principle of Locality: The first 3 frames (outdoors, marked in red) may not be directly relevant to last 3 frames (indoors, marked in green), therefore during TTT, our model neglects them. Best viewed in color.

Adaptation in videos follows a ‘principle of locality’[4]. Intuitively, a frame at \(t=1\) (say indoors) may not be relevant to the frame at \(t=5k\) (say outdoors). Consider a current frame \(x_{t}\). Instead of looking at the entire past timesteps, existing TTT methods use a sliding window of size \(k\), which we denote by \(W_{t}\). More formally, the TTT update rule at \(x_t\) is governed by: \[f_{t}, g_{t} = \arg \min_{f,g} \frac{1}{k} \sum_{t'=t-k+1}^{t} \ell_{s}(g \circ f(x_{t}), x_{t}), \label{eq:ssl95update}\qquad{(1)}\] where \(k\) is the size of a window containing frames encountered in the past (illustrated by window \(W_t\) in Fig1). This creates two issues:

  1. The window \(W_t\) sums up the \(k\) past frames for each timestep. Inductively, \(W_t\) slides over time (e.g., \(W_{t+1}\)) with the model’s weights being reset after every update. The arg min operator requires backpropagation through \(f,g\) every timestep \(t\). Thus, TTT quickly becomes computationally intractable, with a \(2hr\) video (\(7200\) frames) taking up to \(8hrs\).

  2. The model wastes a lot of compute; for example, it shall perform TTT even when two successive frames are pixel-wise identical.

Note that \(f,g\) can change their weights over time as the model undergoes adaptation. We denote this by the subscript \(t\), namely \(f_t\), and \(g_t\).

2.4 Method↩︎

The sliding window-invariant: Consider a sliding window \(W_{t} = [x_{t-k}, x_{t-k+1}, \\...,x_{t-1}, x_{t}]\), and the next window \(W_{t+1}=[x_{t-k+1},...,x_{t},x_{t+1}]\). Mathematically, this reveals that both have the same number of frames except for two: frame numbered \(x_{t-k}\) that exits the window \(W_{t+1}\) and frame numbered \(x_{t+1}\) that enters the window \(W_{t+1}\).
The intuition that operating on sliding windows requires a mechanism to update a running state and only handle elements which come in/go out is well-known in data structures like arrays (e.g., Kadane’s Algorithm [5]). However, inducing such behavior is non-trivial in neural nets, which in-principle may be treated as forms of parallel distributed memories[6].
This reveals that while making a transition from \(W_{k}\rightarrow W_{k+1}\), we don’t need to process \(k\) frames. Rather, we can operate on only \(3\) frames by defining three mechanisms:

  1. Forget: for frame \(x_{t-k}\), ‘forget’ the model’s features after adaptation, and ‘restore’ the model’s predicted features to those prior to TTT.

  2. Anticipate: The current frame \(x_{t}\) under processing can be used to ‘anticipate’ what shall come next at \(x_{t+1}\). For brevity, we call this prediction \(x'_{t+1}\)

  3. Adapt: Compare \(x'_{t+1}\) with the actual frame \(x_{t+1}\). If the difference is greater than some threshold \(\tau\), the model chooses to adapt on \(x_{t}\). Otherwise, it can perform simple inference on \(x_{t}\) and move on. Note that inference is equivalent to the feed-forward \(f\circ h(x_t)\) through the model.

An initial approach might be to hard-code \(\tau\) to some value (say \(0.5\)). However, this makes the model’s behavior static: there might be some consecutive frames who have large pixel-difference, but do not deserve adaptation (for e.g., slight rotation of images of the same object). Thus, we need a mechanism that could govern this \(\tau\) dynamically.
Inspired by this, we present the Frame Forgetting Network (FFN). It consists of two components: 1) Memory Restoration Mechanism (MRM) 2) Adaptive Window Algorithm (AWA). MRM allows the model to ‘forget’ the frame that moves out of the window (\(x_{t-k}\)), while AWA allows the model to anticipate if \(x_{t}\) deserves adaptation, by dynamically estimating \(\tau\). Next, we explain these blocks.

2.5 The Memory Restoration Mechanism (MRM)↩︎

Figure 3: Frame Forgetting Network(i) Forget step: Backbone f_{t} takes the frame x_{t-k} to forget as input, along with timestep t-k, to get the feature encoding, f_{t}(x_{t-k}). To forget its adaptation on x_{t-k}, backbone is trained with pre-adapted features f_{t-k-1}(x_{t-k}) via L2 loss. (ii) Anticipate and Adapt step: Given frame x_{t} model predicts the next frame x'_{t+1}. This is compared with actual frame x_{t+1} to make estimate whether to adapt or not.

To forget the model’s adaptation on \(x_{t-k}\), we can first cache its features before adaptation; i.e., we estimate \(f_{t-k-1}(x_{t-k})\). The idea is that the current weights of the model \(f_t\) should be adjusted so that it can predict the earlier features \(f_{t-k-1}(x_{t-k})\). This suggests that the model \(f\) requires two things: i) input \(x_{t-k}\), and ii) a sense of time \(t-k\). We propose instilling this via a temporal module.
We implement a temporal module as a three layered MLP1. First, the timestep \(t-k\) corresponding to \(x_{t-k}\) is injected into the temporal module. Instead of conditioning the temporal module by a single integer, we implement \(t\) as a one-dimensional positional encoding, similar to the one used in transformers[8]. Note that injecting time \(t\) in an image-based backbone \(f\) may be cheaper than training a video-backbone from scratch. The output of temporal module is then used to condition the backbone \(f_{t-k-1}\), resulting in two input arguments \(x_{t-k},t-k\). Mathematically, we can minimize the following: \[\ell = f_t(x_{t-k},t-k) - f_{t-k-1}(x_{t-k}, t-k)\] This can be used to make a single gradient step through backpropagation and adjust the weights of the backbone \(f\).

2.6 Adaptive Window Algorithm (AWA)↩︎

An Anticipative Head: Given the current frame \(x_{t}\), we need to anticipate whether adaptation is required. The idea is to allow the model to take \(x_{t}\) as input, predict the next frame \(x_{t+1}'\), and compare with the real frame \(x_{t+1}\). The average of pixel-wise difference can then serve as an indicator if adaptation is required2. Thus, we define the visual space difference as \[ v_{visual}(t) = \frac{2}{\sqrt{h\times w}} \sum_{h,w} \frac{\|x_{t+1} - x_{t+1}'\|_2}{255} \label{eq:v95visual}\tag{1}\] One concern about equation 1 is that if an incoming frame \(x_{t+1}\) just ‘rotates’ slightly over the current frame \(x_{t}\), \(v_{visual}\) shall be very high owing to the fluctuations in the pixel space (for e.g., capturing a video over phone). Intuitively, however, these two frames still look almost the same. This means that low-level information might not be a reliable indicator.
Thus, we make use of the following observation: higher layers of a model \(f\) remain invariant to minor-changes in input frames. Inspired by this, we define a memory buffer \(B=[v_{latent}(t_1), v_{latent}(t_2), ...,v_{latent}(t_{last})]\), where \(v_{latent}(t_i) = f_{t_{i}}(x_{t_i})\). Note that different \(t_{i}\) here denote the timesteps when the model actually ‘adapted’ in the past, and need not be consecutive. The idea is that if the \(latent\) feature of the most recently adapted past frame (\(t_{last})\) is very similar to the latent feature of the current frame \(x_t\), we must not adapt. Please note that \(t_{last}\) need not be equal to \(t-1\). We define an anticipation matrix A as:

\[A = \frac{v_{latent}(t_i) \cdot v_{latent}({t_{last}})}{\|v_{latent}(t_i)\|_2 \|v_{latent}({t_{last}})\|_2} \label{eq:f95latent}\qquad{(2)}\]

The surprise metric: Both equations 1 and ?? can be unified together to define a metric that measures how much new information (surprise \(S\)) a frame \(x_{t}\) provides to the model. We define \(S\) as: \[S_t = \left[ \log(1 + v_{\text{visual}}(t)) \right] \times [1 - A]\] Next, we consider three cases: (a) when video contains static frames (e.g., CCTV camera feed): Here \(v_{visual}\approx 0, A\approx 1\), so surprise \(S_t \approx 0\); (b) when video contains a shaking camera (e.g., person captures a video with a head-mounted display): Here the scene remains the same, but frames change a lot. Therefore \(v_{visual}\uparrow\), \(A\approx constant\), so surprise \(S_t\) stays low ; (c) jump cuts, where the scene changes suddenly (say a transition from indoors to outdoors). There \(v_{visual}\uparrow\), \(A\uparrow\), however \(v_{visual}\) increases far more than \(A\)3, so surprise \(S_{t}\) takes on a very high value.
Both cases b) and c) suggest that if \(S_{t}\) exceeds or equals to some adaptive threshold \(\tau_t\), the model should perform TTT. Otherwise, it may perform inference on the frame \(x_t\) (i.e., a single forward pass \(h(f_{t-1}(x_t))\)) and move on to the next frame \(x_{t+1}\). In this case, \(f_{t}=f_{t-1}\), since it is not updated. Next, we derive \(\tau_t\).
Deriving the adaptive threshold \(\tau_t\): Recall that the buffer \(B\) contains latent features of all frames on which TTT was performed. We assume that the size of this buffer is \(N\). Each element in the buffer contains the latent feature \(v_{latent}(t_i)\), and the surprise computed at \(t_{i}\). We define \(\tau_t\) as : \[\mu_{t} = \frac{1}{W} \sum_{i=t-W}^{t-1} S_{i} \quad ; \quad \sigma_{t} = \sqrt{\frac{1}{W} \sum_{i=t-W}^{t-1} (S_{i} - \mu_{t})^{2}} \label{eq:running95avg}\tag{2}\] \[\tau_{t} = \mu_{t} + \sigma_{t}\] Intuitively, \(\mu_t\) tracks how the mean of surprise flows over time[11], [12], \(\sigma_t\) estimates variance, \(\tau_t\) is one standard deviation away from the mean4. Note that while the size of buffer \(N\) is fixed, the threshold \(\tau_t\) itself is dynamic. Therefore, unlike equation ?? where TTT was done for each iteration, the model now dynamically decides when to do TTT. Also, we are processing three frames in a timestep and not N.
Revisiting the cold-start problem: Initially, our model does not see any frame, hence the buffer \(B\) is empty. Therefore, it is difficult to make a reliable estimate of whether to adapt or not. This issue also appears as a cold-start problem in recommendation systems[13]. We attempt to resolve this by ‘adapting’ \(B\) initial-frames until the buffer is full. Since \(W<<<\) video-length, this approach worked quite well, albeit at the expense of some initial-lag in the system5.

3 Experiments on FFN↩︎

Here, we experiment with FFN across a wide range of benchmarks, for example, (i) dense tasks like semantic, instance, and panoptic segmentation; (ii) generalization across video depth-estimation; (iii) action-classification; (iv) segmentation on multi-hour long videos.
Datasets: We report video segmentation results in COCO-Videos[4], KITTI-STEP[14]. For action classification, we report UCF101[15], Something-Something v2[16]. Similarly, for depth-estimation, we create a similar setup as Video-DepthAnything (CVPR’2025)[17], and show results on \(6\) datasets (KITTI[18], Scannet[19], Bonn[20], NYUv2[21], Sintel[22]). As shown in Table 2, most of these datasets contain only videos up to \(5 mins\) long.

Figure 4: EpicTours dataset: Our dataset consists of up to 3 hour long videos of walking tours across cities spanning the globe. We provide manual annotations at semantic/instance level for studying TTT on videos. Dataset shall be made publicly available.

To address this, we propose a new video segmentation dataset, EpicTours Dataset, which contains multi-hour-long videos of people exploring cities across the globe, representing geographical diversity. Our videos are densely annotated with the help of SAM 3 inference [23], manually filtered/refined by expert human annotators. Notably, our EpicTours dataset contains videos up to 3 hours long, with \(30\) classes (subset of COCO). This enables us to study the applicability of our FFN on real-world scenarios, for example, videos containing multiple-people. Please refer to the supplementary for more details.

Table 1: TTT Results for segmentation. Time is in seconds per frame (A100 GPU). s.w: sliding window holding \(k\) frames for TTT. no s.w.: TTT is done non-overlapping sliding windows. FFN offers competitive performance with lower time. \(^\dagger\): effects of individual components analyzed later.
Setting Method COCO Videos KITTI-STEP
3-4 (lr)5-7 Inst.\(\uparrow\) Pan.\(\uparrow\) Val.\(\uparrow\) Test\(\uparrow\) Time\(\downarrow\)
Independent frames Main Task Only 16.7 13.9 53.8 52.5 1.8
MAE Joint Training 16.5 13.5 53.5 52.5 1.8
TTT-MAE No Memory 35.4 20.1 53.6 52.5 3.8
Full Video Offline TTT-MAE All Frames 33.6 19.6 53.2 51.2 1.8
Stream LN Adapt 16.5 14.7 53.8 52.5 2.0
Tent 16.6 14.6 53.8 52.2 2.8
Tent w/ Class Bal. 16.7 14.8 53.8 52.5 3.7
Self-Train - - 54.7 54.0 6.6
Self-Train w/ Class Bal. - - 54.1 53.6 6.9
Online TTT-MAE (n.o. s.w.) 35.3 20.8 48.1 51.7 0.4
Online TTT-MAE (s.w.) 37.6 21.7 55.4 54.3 4.1
2-7 FFN (Ours)\(^\dagger\) 45.1 29.6 57.3 59.5 0.7

Metrics: For instance, panoptic and semantic segmentation we report Average Precision (AP), Panoptic Quality (PQ), and mIoU respectively. Similarly, for video-depth estimation, we report AbsRel:Absolute Relative Error, and \(\delta_1\) which denotes \(\%\) of pixels where the ratio between the prediction and the ground truth falls below a threshold of \(1.25\). For action-classification, we report top-1 accuracy.

Table 2: EpicTours Dataset. Our dataset contains videos averaging 1.5 hours with dense annotations. len means average length in seconds.
Video Dataset Len (s) \(\uparrow\) Frames\(\uparrow\)
CityScapes [24] 1.8 3k
DAVIS [25] 3.5 3.4k
YouTube [26] 4.5 123k
KITTI-S [27] 40.0 8k
COCO-V 309.0 30k
EpicTours 5300.4 2.49M

r0.35

Implementation details: For segmentation (Tab1, Tab[tbl:tab:epic95tour95results]), we initialize the backbone \(f\) with Mask2former, SSL-task head \(g\) from scratch. We train \(g\) jointly during the training-time phase on both image datasets / a single long video. Similarly, \(h\) the task-specific head (segmentation) utilizes Mask2former’s pre-trained weights. For depth-estimation (Tab3), we leverage the Video-Depth Anything architecture. For video-classification (Tab¿tbl:tab:classification?), we adopt the self-supervised backbone (DINOv3)[28] backbone (a very-recent foundational model). We set the memory buffer size \(W=50\), perform a single gradient step per incoming-frame, and use the Adam optimizer. Our SSL-head \(g\) is trained with next-frame anticipation instead of current-frame reconstruction. We perform experiments with \(3\) seeds and report their mean accuracy. All experiments are performed on a single ampere of 80 GB.
Baselines: Inspired by [4], we consider multiple baselines that span image-models, offline video processing, test-time-adaptation (TTA), test-time-training. In 1, we categorize our baselines as (i) independent frames: the main task only means zero-shot per-frame inference on a model trained on image-segmentation. MAE joint-training jointly pretrains MAE[29] for reconstruction/segmentation. Similarly, TTT-MAE memory takes the previous MAE-joint training baseline, performs TTT on each frame independently (ii) full-video: an ideal offline-oracle, allowed to access the entire video (iii) stream: a tougher setup where a model only encounters frames one-by-one, ‘without’ peeking in the future.
Our TTA baselines include the pioneering TENT approach[30], layer-norm adaptation, self-training with confident pseudo-labels (to rule out whether improvements are due to self-supervision or TTT on videos). Next, we consider the TTT-Online baseline [4] across two setups (a) without sliding window: we perform TTT on a window of \(w\) frames and then move onto a non-overlapping window; (b) with overlapping sliding window: the original setup in [4]. Finally, we consider zero-shot foundational models like DinoV3, evaluating feature robustness on general representation-learning.
FFN can surpass TTT-online on segmentation: In Tab 1 for the COCO-Videos dataset, our FFN obtains \(45.1 (+7.5\uparrow)\) for instance segmentation, \(29.6\) \((+7.9\uparrow)\) for panoptic segmentation. Similarly, on the KITTI-STEP validation set, FFN gets \(57.3 (+1.9\uparrow)\), \(59.5(+5.2\uparrow)\) on the testing split. One takeaway is that the streaming baselines (including our FFN) can surpass the offline TTT-MAE oracle, which can access entire video, thereby validating the principle-of-locality. Similarly, FFN performs competitively with TTA baselines like Tent.

Table 3: Generalization of TTT to video-depth estimation. Table shows zero-shot baselines containing both single image [31] and video depth estimation models [32][35]. For TTT baselines, we benchmark the strongest baseline (TTT-Online). Results may indicate FFN’s competitiveness with current state of the art. (s.w.): denotes sliding window. (\(^\dagger\)): contains 50 frames. (\(^\ddagger\)): contains 170 frames. [31], [34].
Method / Metrics KITTI [18] Scannet [19] Bonn [20] NYUv2 [21] Sintel [22] \(^\dagger\) Scannet \(^\ddagger\)
2-3 (lr)4-5 (lr)6-7 (lr)8-9 (lr)10-11 (lr)12-12 AbsRel (↓) \(\delta_1\) (↑) AbsRel (↓) \(\delta_1\) (↑) AbsRel (↓) \(\delta_1\) (↑) AbsRel (↓) \(\delta_1\) (↑) AbsRel (↓) \(\delta_1\) (↑) TAE (↓)
Zero-shot baselines
DAv2-L [31] 0.137 0.815 0.150 0.768 0.127 0.864 0.094 0.928 0.390 0.541 1.140
NVDS [32] 0.233 0.614 0.207 0.628 0.199 0.674 0.217 0.598 0.408 0.464 2.176
NVDS + DAv2-L 0.227 0.617 0.194 0.658 0.191 0.700 0.184 0.679 0.449 0.503 2.536
ChronoDepth [33] 0.243 0.576 0.199 0.665 0.199 0.665 0.173 0.771 0.192 0.673 1.022
DepthCrafter [34] 0.164 0.753 0.169 0.730 0.153 0.803 0.141 0.822 0.299 0.695 0.639
DepthAnyVideo [35] - - - - - - - - 0.405 0.659 0.967
Video Depth-Anything [36] 0.083 0.946 0.087 0.933 0.070 0.961 0.064 0.967 0.300 0.633 0.570
TTT baselines
Online TTT-MAE (s.w.) 0.071 0.958 0.076 0.949 0.064 0.970 0.058 0.974 0.265 0.710 0.495
FFN (Ours) 0.059 0.972 0.062 0.965 0.051 0.982 0.049 0.988 0.230 0.762 0.380

TTT results on hours long videos: evaluated on proposed EpicTours dataset.

FFN for performing TTT with better compute-accuracy tradeoffs: One concern about TTT is that it involves backpropagation through both backbone \(f\), SSL-head \(g\), for every incoming frame, making it slow in practice. For example, as shown in Tab1, TTT-Online takes \(4.1sec\) per frame. Fortunately, FFN processes only \(3\) frames per window and consumes \(0.7sec\) per timestep. It also gets a higher result (\(45.1\) vs \(37.6\)) showing a better compute-accuracy tradeoff. We acknowledge the potential to make TTT even faster.
FFN can generalize to video depth-estimation: We test the generalization ability of FFN on a challenging video depth-estimation task (Table 3). In particular, FFN performs well across the board on all \(6\) datasets.
FFN can classify coarse-actions in videos: While segmentation only tests per-frame fine-grained understanding, we also study how well FFN understands the temporal aspect. Thus, we subject FFN to action-classification in UCF101/ Something-Somethingv2. We notice gains of \(0.8\uparrow\), \(0.7\uparrow\), respectively. Note that SSv2 is especially challenging; it requires FFN to reason about direction of time: e.g., moving something up vs down.
FFN’s effectiveness on realistic hours long videos: In Tab[tbl:tab:epic95tour95results], we subject our FFN to an even tougher task: how well can it adapt to hours long videos captured in the real-world, often on low-resolution devices like cellphones. In the EpicTours dataset, FFN shows promising gains of \(6.5\%\uparrow\) for semantic segmentation, \(5.3\%\uparrow\) for instance segmentation. A use-case may be to deploy FFN on drones for disaster-relief efforts or food-delivery.

4 Ablations on FFN↩︎

Here, we discuss ablations on the Frame Forgetting Network presented in Tab1.
Rope encoding performs best: Recall that FFN injects temporal information about an incoming frame by conditioning the backbone \(f\) with time (Fig 3). Table ¿tbl:tab:ablation95pe? shows that the the rope-based time encoding outperforms both relative and absolute time encodings. Intuitively, rope can rotate both query/key matrices in latent space, and encode both relative/absolute positions simultaneously.

Impact of various choices on memory buffer \(F\).
Impact of different losses for computing \(f_{latent}\).
Figure 5: First three plots show panoptic segmentation on COCO-Videos whereas last plot shows semantic segmentation on our EpicTours dataset. (i) Effect of increasing the size of buffer B (ii) Increasing number of iterations on each test sample during TTT (iii) Effect of training SSL head with current-frame reconstruction/ vs next-frame. (iv) FFN’s performance remains stable even when subjected to 3 hour long videos, whereas TTT-Online degrades rapidly.

Temporal conditioning of the backbone \(f\) helps: We perform an ablation where we remove \(t\) as a condition of the backbone \(f\) and find that performance drops from 45.1 to \(42.7\) on COCO-Videos instance segmentation. This shows that instilling a notion of time in \(f\) helps.
Memory buffer B can take inspiration from both FIFO/MBC policies: In Table [tbl:tab:ablation95memory95buffer], we implement two variations of the memory buffer \(B\). MBC means that an incoming frame is merged with the ‘most-similar’ frame. MBC performs better than the FIFO queue[37]. Alternatively, one may also ‘merge’ an incoming frame (MBC) and consider it as ‘most recent’ element in a FIFO-queue6, achieving even better results.
Cosine loss performs best on \(v_{latent}\): In Tab[tbl:tab:latent95loss], we experiment with different types of loss to compute \(v_{latent}\) (in eq@eq:eq:f95latent ), and find that cosine works the best. Intuitively, cosine projects all features to a unit-hypersphere, cancels out their magnitudes, and only measures angle difference, leading to a better estimate.
Increasing buffer length helps, but only up to a limit: In Fig5 (i), we see that FFN performs well as buffer-size increases up to \(50\) frames, then drops. This helps validate the insight that keeping only some past-frames is important, and keeping everything worsens the performance. Intuitively, the capacity of the model \(f\) is finite, trying to remember everything leads to instability during learning.
Increasing TTT iterations improves performance: Fig5 (ii) shows that increasing TTT iterations improves performance. Note that FFN remains almost constant, which means that it manages to learn a lot even with just one gradient-step, whereas TTT-online needs several steps to reach its peak.
Anticipating the ‘next’ frame is better than ‘current’ frame prediction in \(f_{visual}\): Fig5 (iii) shows that it is better to predict what shall come one step in the future, rather than just predicting the current frame, thereby showing that ‘anticipation’ can provide a unique inductive bias to a neural net.
FFN retains stable performance for long videos: In Fig5 (iv), we plot FFN’s average performance as it continues to perform TTT over 3 hour long videos on our EpicTour dataset. Note that TTT-online degrades beyond 50 mins, whereas FFN improves/retains performance over time, indicating drift is less of an issue as compared to TTT-online. We refer the reader to supplementary material for additional ablations.

5 Related Work↩︎

There are several works operating within the regime of ‘online model distillation’ [3]: here the teacher is generally kept on the Internet, while a student sitting on an edge-device makes decision when to adapt or not. In FFN, we aim to adapt a single model on-device and don’t require a teacher. Moreover, we focus on improving the quality of generated predictions and not explicitly matching the real-time performance of detectors, which remains an open challenge[4].
The idea of ‘principle of locality’ can be traced back to Vapnik et al [38], [39]. This also found applications in [40], [40][42]. FFN’s difference lies in how it implements this locality: methods like TTT-Online[4] ‘reset’ weights after certain set of frames is processed. However, FFN’s rely on the ‘forgetting’ principle: restore a model’s baseline prior to adaptation. Although both aim to achieve identical goals (locality), the FFN’s mechanism is different. While ideas on forgetting are typically used to unlearn ‘bad’ representations in safety-alignment[43], we showcase the application of this principle for representational-restoration.
Similarly, the computer vision community has used the idea of test-time-training for several applications  [44][47], especially depth estimation [48][52]. Other works such as [53][56] explore online-learning and their extensions to videos [57]. Although the videos considered in such papers are mostly synthetic/very short, we also show results on long-realistic videos.
Finally, video compression algorithms [58] also implement a mechanism to measure surprise: they measure how much change a new frame offers relative to a previous frame, which in turn is used to inform compression. The key idea is that most redundant frames are assigned short length codes[59]. However, this process is typically not learned, whereas FFN learns via an anticipative-head. Furthermore, in video-compression, the size of the file grows with the number of frames encountered, whereas in FFN all the knowledge of a video is squeezed into a finite set of weights[60].

6 Additional Discussions↩︎

We shall now discuss some directions that might help inspire further research on FFN. Please note that while these are relevant to FFN, their precise implementation remains beyond the scope of this work. Although TTT requires only one gradient step, it remains slow in practice. One reason is that it still relies on backpropagation. It creates a subtle ‘layer-lock’[61]: the first layer has to ‘wait’ for the gradients from the last layer to come back, thereby wasting compute cycles. Alternatives include local-learning algorithms like forward-forward[60], target propagation[62] or no-prop [63], which can update these weights during the feed-forward phase only. A key challenge remains that these algorithms still do not surpass backpropagation’s performance on large scale datasets.
TTT relies on the assumption that the ‘useful’ video frames keep ‘streaming’ continuously. However, there might be cases where there are no changes in the incoming frames (e.g., stationary cameras). During that time, learning does not happen, and FFN remains idle. An alternate mechanism was discussed by [64], [65]: make FFN enter a "sleeping" phase, sample the data from within FFN itself, and perform a few iterations of gradient descent. A key challenge remains how to "sample" efficiently[66], which was later partially resolved by score-matching networks relying on Langevin dynamics[67]. Further, we showed that anticipating the next-frame works better than the current-frame prediction. This lends itself to the question: Is it possible to meta-learn the SSL task itself. Recent works like TTT-MLP have just started exploring this interesting direction[68].

7 Conclusion↩︎

In this work, we introduced the Frame Forgetting Network (FFN): for performing test-time-training on videos which may be hours long. That is, a memory restoration mechanism allows the FFN to restore the representation of a model before adaptation. Our key contribution is the logic of handling sliding temporal-windows by operating selectively on exiting and entering frames, rather than doing duplicate processing at each time-step.
Next, we discuss an adaptive anticipative head that decides when to do TTT on an incoming frame. Finally, we introduced the EpicTours dataset, which contains hours long videos to effectively study this important problem. Our empirical results and ablations may help validate further merits of such an approach. In the future, we hope to explore FFN for hours long video generation [69]. May the force be with you. May you live long and prosper.

Table of Contents


A Broader Impact
B Reproducibility Statement
C Additional Ablations
D Details of Datasets
E A brief overview of architectures
F Qualitative Demonstrations of EpicTours Dataset -


8 Broader Impact↩︎

This research introduces the Frame Forgetting Network (FFN) for efficient test-time training on long videos, along with the EpicTours dataset for benchmarking adaptation on multi-hour video streams. FFN demonstrates that test-time training can be made computationally tractable for hours-long videos by operating on only three frames per sliding window transition. This may benefit the real-world deployment of video understanding systems in resource-constrained environments, such as edge devices, drones, and mobile platforms.
Similarly, by removing the dependency on a remote teacher model, FFN supports fully on-device adaptation. This is particularly relevant for offline scenarios such as disaster-relief efforts, autonomous navigation, and remote surveillance, where server connectivity may be limited or unavailable. Our adaptive windowing algorithm (AWA) reduces unnecessary computation by dynamically deciding when adaptation is needed, rather than performing TTT on every frame. This may help contribute to more energy-efficient video processing pipelines.
We do not anticipate direct negative social impacts from this work, beyond what existing on-device models already face. However, we acknowledge that video understanding technologies, including those built on TTT, could potentially be applied in surveillance contexts. We encourage the responsible use of such technologies, in accordance with applicable regulations and ethical guidelines.

9 Reproducibility Statement↩︎

To ensure the reproducibility of our experiments, we provide a comprehensive overview of the model architectures, hyperparameters, evaluation procedures, datasets, and baselines employed in this supplementary material. We provide complete dataset details in 11 and architecture details in 12. Our code and data will be made publicly available for future research purposes. The videos will be made available under the Creative Commons (CC) license.
For segmentation experiments (Tab. 1, Tab. 5), we initialize the backbone \(f\) with Mask2Former [70] pre-trained weights, train the SSL head \(g\) from scratch jointly during the training-time phase, and use Mask2Former’s pre-trained weights for the downstream head \(h\). For depth estimation (Tab. 3), we leverage the Video Depth Anything architecture [36]. For video classification (Tab. 4), we adopt the DINOv3 [28] backbone.
Across all experiments, we set the memory buffer size \(W = 50\), perform a single gradient step per incoming frame, and use the Adam optimizer. The SSL head \(g\) is trained with the next-frame anticipation objective instead of the current-frame reconstruction (as discussed in the main paper and validated in Fig. 5(iii)). We perform all experiments with 3 random seeds and report their mean accuracy. All experiments are conducted on a single NVIDIA Ampere (80GB) GPU.
During the training-time phase, \(g\) may be trained on both image datasets and a single long video; the anticipative head itself can be learned with as few as one long video. At test time, the downstream head \(h\) is kept frozen throughout, and only the backbone \(f\) and SSL head \(g\) receive gradient updates. The adaptive windowing algorithm (AWA) uses the surprise metric \(S_t\) and the dynamic threshold \(\tau_t = \mu_t + \sigma_t\) (Eq. 7 of the main paper) to dynamically determine whether TTT is performed on a given frame.

10 Additional Ablations↩︎

Here, we provide some additional ablations for our FFN.

Table 4: Ablation on varying number of MLP layers in temporal module. We report results for instance segmentation on COCO-Videos dataset. Higher is better.
Layers 1 3 5 10
41.2 45.1 43.8 39.5

10pt

Varying the number of MLP layers in the temporal module: Tab [tbl:tab:varying95mlp95layers] reveals that optimal number of layers for temporal module is \(3\).

Positional encodings do not repeat even if sampled for very long videos: Another criticism may be that FFN relies on temporally binding (a.k.a conditioning) the backbone with different timesteps. Since the positional encodings are circular, eventually they might end up repeating, which would mean that the network could no longer distinguish between timsesteps of different indices. We refer to this problem as the ‘temporal symmetry problem’.

Listing lst:positional_hash: Our Implementation of checking collisions in positional encodings.

import numpy as np
import hashlib
import collections

def get_1d_positional_encoding_np(t, d, lambda_=10000):
    """Computes sinusoidal positional encoding for a time step."""
    half_d = int(np.ceil(d / 2))
    indices = np.arange(half_d)
    inv_freq = 1.0 / (lambda_ ** (indices / (d / 2)))
    sin_inp = t * inv_freq
    emb = np.concatenate([np.sin(sin_inp), np.cos(sin_inp)])
    return emb[:d].astype(np.float32)

def get_full_float_hash(vec):
    """Computes a unique 64-bit signature from raw float memory."""
    raw_bytes = np.ascontiguousarray(vec).tobytes()
    h = hashlib.blake2b(raw_bytes, digest_size=8)
    return int(h.hexdigest(), 16)

# Configuration for temporal windows
total_time = [60, 3600, 86400, 2592000]
wavelengths = [500, 5000, 10000, 20000, 50000]
all_hashes = []

for w in wavelengths:
    for time in total_time:
        signature_hash = collections.defaultdict(int)
        for t in range(time):
            pos = get_1d_positional_encoding_np(t=t, d=2, lambda_=w)
            h = get_full_float_hash(np.sort(pos))
            signature_hash[h] += 1
        all_hashes.append({'wavelength': w, 'time': time, 'hash': signature_hash})

In the code above, we implement 1D absolute positional encodings. For a particular timestep, we return a \(d\) dimensional vector, and subsequently hash it to an integer. Simultaneously, we track potential collisions in the hash in case two different timesteps led to the same encodings.
Key observation: We observe that this formulation does not suffer from any collisons, thereby indicating that the neural network is always given unique inputs for different time indices. We also test extreme case by reducing the dimensionality \(d\) of positional encoding to \(2\) (one sin, another cosine) and found that it still broke symmetry. This means that the cyclic nature of sines, and cosines, can still work. This might also help validate the idea that a particular signal can be written as a superposition of sines and cosines (fourier’s expansion)

11 Datasets↩︎

Next, we describe the details of every dataset used in our experiments.
COCO-Videos COCO-Videos [4] is a video dataset derived from the COCO benchmark, designed to evaluate test-time training in video streams. It contains approximately 30k frames with videos averaging around 309 seconds in length. The dataset provides dense annotations suitable for evaluating both instance segmentation and panoptic segmentation.
KITTI-STEP: KITTI-STEP [14] extends the KITTI benchmark with dense, temporally consistent panoptic segmentation annotations. It contains approximately 8k frames with video sequences averaging 40 seconds in length. The dataset includes both a validation and a test split. We report on semantic segmentation performance in terms of mIoU in both splits. KITTI-STEP is particularly relevant to our evaluation because its driving sequences exhibit gradual scene transitions; this allows us to study how FFN’s principle of locality and adaptive windowing handle slowly evolving visual content, as opposed to the more abrupt scene changes found in other benchmarks.
UCF101: UCF101 [71] is a widely-used action recognition benchmark containing 13,320 video clips spanning 101 action categories. The videos are collected from YouTube and cover a diverse range of human actions. We report top-1 classification accuracy on this dataset. While our primary focus is on dense per-pixel tasks like segmentation, UCF101 allows us to evaluate whether FFN’s adaptation mechanism can also benefit coarse video understanding.
Something-Something v2:(SSv2) [16] is a video understanding dataset that requires temporal reasoning about object interactions. It contains more than 220k short video clips spanning 174 fine-grained action categories. Notably, SSv2 requires models to reason about the direction of time (, “moving something up” vs.”moving something down”), making it a challenging benchmark for temporal understanding. We report top-1 classification accuracy. SSv2 is especially interesting for FFN because it tests whether our anticipative SSL objective, which predicts the next frame rather than reconstructing the current one, can capture the temporal directionality that this benchmark demands.
ScanNet: ScanNet [19] is a richly-annotated dataset of 3D indoor scene reconstructions. It contains RGB-D video sequences captured in a variety of indoor environments. We use ScanNet to evaluate the video depth estimation, reporting AbsRel and \(\delta_1\) metrics. Following prior work [36], we also report the Temporal Alignment Error (TAE) on a 170-frame variant of ScanNet. The TAE metric is particularly informative for FFN, as it measures temporal consistency of depth predictions across frames; this directly tests whether FFN’s memory restoration mechanism and adaptive windowing can maintain coherent depth estimates over time.
Bonn: Bonn [20] is a dataset designed for 3D reconstruction in dynamic environments using RGB-D cameras. It provides ground-truth depth annotations for indoor scenes. We use Bonn to evaluate video depth estimation and report AbsRel and \(\delta_1\) metrics. Unlike ScanNet and NYUv2, Bonn specifically targets dynamic indoor environments where objects and people may move throughout the scene. This makes it a useful test of whether FFN’s adaptation can handle non-static visual content during depth estimation.
NYUv2: NYUv2 [21] is a widely-used indoor depth estimation benchmark containing RGB-D images captured with a Microsoft Kinect sensor. It provides dense depth annotations for a variety of indoor scenes. We evaluate video depth estimation on NYUv2 and report AbsRel and \(\delta_1\) metrics. NYUv2 covers a broad range of room layouts and furniture configurations, making it a robust generalization test. Together with KITTI (outdoor), ScanNet (indoor 3D), and Bonn (dynamic indoor), NYUv2 rounds out a diverse evaluation suite that allows us to assess FFN’s depth estimation across varied environments and sensor characteristics.
Sintel: Sintel [22] is a synthetic benchmark derived from the open-source animated film Sintel. It provides ground-truth depth and optical flow annotations. Following prior work, we evaluate a 50-frame variant and report AbsRel and \(\delta_1\) metrics for video depth estimation. The synthetic nature of Sintel introduces a significant domain gap relative to the real-world datasets above; strong performance here may indicate that FFN’s self-supervised adaptation can bridge the gap between a model’s training domain and previously unseen visual styles.
CityScapes: CityScapes [72] is a large-scale dataset to understand semantic urban scenes, containing video sequences captured from a vehicle driving through various cities. It provides fine-grained pixel-level annotations for 19 semantic classes. As shown in Tab. 2 of the main paper, CityScapes videos average only 1.8 seconds with approximately 3k frames, making it representative of the short-video regime that our EpicTours dataset aims to extend. We include CityScapes in Tab. 2 primarily to contextualize the scale gap: while existing benchmarks operate on seconds-long clips, FFN is designed for videos that are orders of magnitude longer.
DAVIS: DAVIS [25] is a benchmark dataset for video object segmentation, containing densely annotated video sequences averaging 3.5 seconds with approximately 3.4k frames. It is widely used to evaluate methods on short video clips and serves as a reference point in Tab. 2 to compare video lengths across datasets. Although DAVIS provides high-quality per-frame annotations, its short clip lengths mean that temporal adaptation methods like FFN have limited opportunity to demonstrate their long-range benefits on this benchmark alone.

12 Architecture↩︎

12.1 Mask2Former↩︎

Our segmentation experiments employ Mask2Former [70] as the backbone architecture. Mask2Former is a universal architecture for image segmentation that unifies semantic, instance, and panoptic segmentation under a single framework. It consists of three main components: (i) a pixel-level feature extraction backbone, (ii) a Transformer-based decoder with masked attention, and (iii) a set of learnable object queries that produce per-segment predictions. The key innovation of Mask2Former is its masked cross-attention mechanism, which restricts attention to localized regions around predicted segments rather than the full image, improving both efficiency and segmentation quality.
In our FFN framework, we use Mask2Former’s pre-trained backbone as \(f\) and its pre-trained task-specific head as \(h\). The SSL head \(g\) is trained from scratch. During the training-time phase, \((f, g, h)\) are trained jointly. During test-time training, only \(f\) and \(g\) are updated, while \(h\) is kept frozen.

12.2 TTT-MAE: Test-Time Training with Masked Autoencoders↩︎

Our self-supervised learning (SSL) task for test-time training is based on the Masked Autoencoder (MAE) framework [73], [74]. MAE operates by randomly masking a large proportion of input image patches and training the model to reconstruct the missing patches. This reconstruction task provides a strong self-supervised signal that captures both local and global image structure. In the TTT-MAE setup [74], the MAE reconstruction objective serves as the self-supervised task during both the training-time and test-time phases. Specifically, given an incoming frame \(x_t\), the SSL head \(g\) takes the backbone features \(f(x_t)\) and produces a reconstruction \(x'_t = g \circ f(x_t)\). The reconstruction loss \(\ell_s(x'_t, x_t)\) is then used to update the backbone \(f\) and SSL head \(g\) via backpropagation.
The key advantage of using MAE as the SSL task is that it does not require any external labels, making it well-suited for test-time training where ground-truth annotations are unavailable. In our FFN, we replace the standard current-frame reconstruction objective with a next-frame anticipation objective, where the SSL head is trained to predict the upcoming frame rather than reconstruct the current one.

Figure 6: Diversity of our EpicTours Dataset: Each row contains different videos, different columns contain frames in each video. Best viewed in color.
Figure 7: Diversity of our EpicTours Dataset: Each row contains different videos, different columns contain frames in each video. Best viewed in color.
Figure 8: Diversity of our EpicTours Dataset: Each row contains different videos, different columns contain frames in each video. Best viewed in color.

References↩︎

[1]
M. Oquab et al., “Dinov2: Learning robust visual features without supervision,” arXiv preprint arXiv:2304.07193, 2023.
[2]
M. Caron et al., “Emerging properties in self-supervised vision transformers,” 2021, booktitle = ICCV.
[3]
R. T. Mullapudi, S. Chen, K. Zhang, D. Ramanan, and K. Fatahalian, “Online model distillation for efficient video inference,” arXiv preprint arXiv:1812.02699, 2018.
[4]
R. Wang et al., “Test-time training on video streams,” Journal of Machine Learning Research, vol. 26, no. 9, pp. 1–29, 2025.
[5]
J. Bentley, “Programming pearls: Algorithm design techniques,” Communications of the ACM, vol. 27, no. 9, pp. 865–873, 1984.
[6]
booktitle=Proceedings. of the A. M. of the C. S. S. Hinton Geoffrey E, “Learning distributed representations of concepts,” 1986, vol. 8.
[7]
B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng, “Nerf: Representing scenes as neural radiance fields for view synthesis,” Communications of the ACM, vol. 65, no. 1, pp. 99–106, 2021.
[8]
A. Vaswani et al., “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017.
[9]
M. Zhang, J. Lucas, J. Ba, and G. E. Hinton, “Lookahead optimizer: K steps forward, 1 step back,” Advances in neural information processing systems, vol. 32, 2019.
[10]
A. van den Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018.
[11]
D. Wei, J. J. Lim, A. Zisserman, and booktitle=Proceedings. of the I. conference on computer vision and pattern recognition Freeman William T, “Learning and using the arrow of time,” 2018, pp. 8052–8060.
[12]
D. Layzer, “The arrow of time,” Scientific American, vol. 233, no. 6, pp. 56–69, 1975.
[13]
J. Wei, J. He, K. Chen, Y. Zhou, and Z. Tang, “Collaborative filtering and deep learning based recommendation system for cold start items,” Expert systems with applications, vol. 69, pp. 29–39, 2017.
[14]
M. Weber et al., “Step: Segmenting and tracking every pixel,” arXiv preprint arXiv:2102.11859, 2021.
[15]
K. Soomro, A. R. Zamir, and booktitle=arXiv. preprint arXiv:1212. 0402. Shah Mubarak, “UCF101,” 2012.
[16]
R. Goyal et al., “The" something something" video database for learning and evaluating visual common sense,” 2017, pp. 5842–5850.
[17]
L. Yang et al., “Depth anything v2,” Advances in Neural Information Processing Systems, vol. 37, pp. 21875–21911, 2024.
[18]
A. Geiger, P. Lenz, C. Stiller, and R. Urtasun, “Vision meets robotics: The kitti dataset,” The International Journal of Robotics Research, vol. 32, no. 11, pp. 1231–1237, 2013.
[19]
A. Dai, A. X. Chang, M. Savva, M. Halber, T. Funkhouser, and booktitle=Proceedings. of the I. conference on computer vision and pattern recognition Nießner Matthias, “Scannet: Richly-annotated 3d reconstructions of indoor scenes,” 2017, pp. 5828–5839.
[20]
E. Palazzolo, J. Behley, P. Lottes, P. Giguère, and C. Stachniss, “ReFusion: 3D reconstruction in dynamic environments for RGB-d cameras exploiting residuals , booktitle = iros,” 2019, [Online]. Available: https://www.ipb.uni-bonn.de/pdfs/palazzolo2019iros.pdf , codeurl = {https://github.com/PRBonn/refusion}, videourl = {https://youtu.be/1P9ZfIS5-p4}.
[21]
P. K. Nathan Silberman Derek Hoiem and R. Fergus, “Indoor segmentation and support inference from RGBD images , booktitle = ECCV,” 2012.
[22]
D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black, A naturalistic open source movie for optical flow evaluation,” 2012, pp. 611?625, language=en–US.
[23]
N. Carion et al., “Sam 3: Segment anything with concepts,” arXiv preprint arXiv:2511.16719, 2025.
[24]
M. Cordts et al., “2016 IEEE conference on computer vision and pattern recognition (CVPR) , title=The Cityscapes Dataset for Semantic Urban Scene Understanding,” 2016, pp. 3213–3223, keywords=Urban areas;Semantics;Visualization;Benchmark testing;Vehicles;Training;Complexity theory, doi: 10.1109/CVPR.2016.350.
[25]
F. Perazzi, J. Pont-Tuset, B. McWilliams, L. Van Gool, M. Gross, and A. Sorkine-Hornung, “A benchmark dataset and evaluation methodology for video object segmentation , booktitle = Computer Vision and Pattern Recognition,” 2016.
[26]
N. Xu et al., “Youtube-vos: Sequence-to-sequence video object segmentation,” 2018, pp. 585–601.
[27]
L. Kong, S. Xie, H. Hu, L. X. Ng, B. Cottereau, and W. T. Ooi, “Robodepth: Robust out-of-distribution depth estimation under corruptions,” Advances in Neural Information Processing Systems, vol. 36, pp. 21298–21342, 2023.
[28]
O. Siméoni et al., “Dinov3,” arXiv preprint arXiv:2508.10104, 2025.
[29]
“Masked autoencoders are scalable vision learners,” CoRR, vol. abs/2111.06377, 2021 , eprinttype = {arXiv}, eprint = {2111.06377}, timestamp = {Tue, 16 Nov 2021 12:12:31 +0100}, bib, [Online]. Available: https://dblp.org/rec/journals/corr/abs-2111-06377.bib , bibsource = {dblp computer science bibliography, https://dblp.org}.
[30]
D. Wang, E. Shelhamer, S. Liu, B. Olshausen, and T. Darrell, “Tent: Fully test-time adaptation by entropy minimization,” arXiv preprint arXiv:2006.10726, 2020.
[31]
L. Yang et al., “Depth anything V2,” arXiv:2406.09414, 2024.
[32]
Y. Wang et al., “Neural video depth stabilizer,” 2023, pp. 9466–9476.
[33]
J. Shao et al., “Learning temporally consistent video depth from video diffusion priors,” arXiv preprint arXiv:2406.01493, 2024.
[34]
W. Hu et al., “Depthcrafter: Generating consistent long depth sequences for open-world videos,” arXiv preprint arXiv:2409.02095, 2024.
[35]
H. Yang et al., “Depth any video with scalable synthetic data,” arXiv preprint arXiv:2410.10815, 2024.
[36]
S. Chen et al., “Video depth anything: Consistent depth estimation for super-long videos,” 2025, pp. 22831–22840.
[37]
B. He et al., “Ma-lmm: Memory-augmented large multimodal model for long-term video understanding,” 2024, pp. 13504–13514.
[38]
A. Gammerman, V. Vovk, and V. Vapnik, “Learning by transduction , booktitle = In Uncertainty in Artificial Intelligence,” 1998, pp. 148–155.
[39]
V. Vapnik and S. Kotz, Estimation of dependences based on empirical data: Empirical inference science (information science and statistics). Springer-Verlag , address = Berlin, Heidelberg, 2006 , isbn = {0387308652}.
[40]
L. Bottou and V. Vapnik, “Local learning algorithms,” Neural computation, vol. 4, no. 6, pp. 888–900, 1992.
[41]
H. Zhang, A. C. Berg, M. Maire, and booktitle=2006. I. C. S. C. on C. V. and P. R. (CVPR’06). Malik Jitendra, “SVM-KNN: Discriminative nearest neighbor classification for visual category recognition,” 2006 , organization={IEEE}, vol. 2, pp. 2126–2136.
[42]
M. Hardt and Y. Sun, “Test-time training on nearest neighbors for large language models,” arXiv preprint arXiv:2305.18466, 2023.
[43]
X. Qi et al., “Safety alignment should be made more than just a few tokens deep,” arXiv preprint arXiv:2406.05946, 2024.
[44]
V. Jain and booktitle=CVPR. 2011. Learned-Miller Erik, “Online domain adaptation of a pre-trained cascade of classifiers,” 2011 , organization={IEEE}, pp. 577–584.
[45]
A. Shocher, N. Cohen, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Irani Michal, “?zero-shot? Super-resolution using deep internal learning,” 2018, pp. 3118–3126.
[46]
Y. Nitzan et al., “MyStyle: A personalized generative prior,” arXiv preprint arXiv:2203.17272, 2022.
[47]
B. Xie, S. Li, M. Li, C. H. Liu, G. Huang, and G. Wang, “Sepico: Semantic-guided pixel contrast for domain adaptive semantic segmentation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023.
[48]
A. Tonioni, O. Rahnama, T. Joy, L. D. Stefano, T. Ajanthan, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Torr Philip HS, “Learning to adapt for stereo,” 2019, pp. 9661–9670.
[49]
A. Tonioni, F. Tosi, M. Poggi, S. Mattoccia, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Stefano Luigi Di, “Real-time self-adaptive deep stereo,” 2019, pp. 195–204.
[50]
Z. Zhang, S. Lathuiliere, E. Ricci, N. Sebe, Y. Yan, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Yang Jian, “Online depth learning against forgetting in monocular videos,” 2020, pp. 4494–4503.
[51]
Y. Zhong, H. Li, and booktitle=Proceedings. of the E. C. on C. V. (ECCV). Dai Yuchao, “Open-world stereo video matching with deep rnn,” 2018, pp. 101–116.
[52]
X. Luo, J.-B. Huang, R. Szeliski, K. Matzen, and J. Kopf, “Consistent video depth estimation,” ACM Transactions on Graphics (ToG), vol. 39, no. 4, pp. 71–1, 2020.
[53]
N. Hansen et al., “Self-supervised policy adaptation during deployment,” arXiv preprint arXiv:2007.04309, 2020.
[54]
Y. Sun et al., “Online learning of unknown dynamics for model-based controllers in legged locomotion,” IEEE Robotics and Automation Letters, vol. 6, no. 4, pp. 8442–8449, 2021.
[55]
Y. Liu, P. Kothari, B. van Delft, B. Bellot-Gurlet, T. Mordan, and A. Alahi, “TTT++: When does self-supervised test-time training fail or thrive?” Advances in Neural Information Processing Systems, vol. 34, 2021.
[56]
L. Yuan, B. Xie, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Li Shuang, “Robust test-time adaptation in dynamic scenarios,” 2023, pp. 15922–15932.
[57]
R. Volpi, P. De Jorge, D. Larlus, and booktitle=Proceedings. of the I. C. on C. V. and P. R. Csurka Gabriela, “On the road to online adaptation for semantic image segmentation,” 2022, pp. 19184–19195.
[58]
T. Wiegand, G. J. Sullivan, G. Bjontegaard, and A. Luthra, “Overview of the h. 264/AVC video coding standard,” IEEE Transactions on circuits and systems for video technology, vol. 13, no. 7, pp. 560–576, 2003.
[59]
R. S. Sutton, “Generalization in reinforcement learning: Successful examples using sparse coarse coding,” Advances in neural information processing systems, vol. 8, 1995.
[60]
G. Hinton, “The forward-forward algorithm: Some preliminary investigations,” arXiv preprint arXiv:2212.13345, vol. 2, no. 3, p. 5, 2022.
[61]
S. Löwe, P. O’Connor, and B. Veeling, “Putting an end to end-to-end: Gradient-isolated learning of representations,” Advances in neural information processing systems, vol. 32, 2019.
[62]
D.-H. Lee, S. Zhang, A. Fischer, and booktitle=Joint. european conference on machine learning and knowledge discovery in databases Bengio Yoshua, “Difference target propagation,” 2015 , organization={Springer}, pp. 498–515.
[63]
Q. Li, Y. W. Teh, and R. Pascanu, “NoProp: Training neural networks without full back-propagation or full forward-propagation,” arXiv preprint arXiv:2503.24322, 2025.
[64]
C. Metz, “Geoffrey hinton?the ?godfather? Of AI and neural networks,” MIT Technology Review, 2021, [Online]. Available: https://www.technologyreview.com/2021/04/16/1021871/geoffrey-hinton-glom-godfather-ai-neural-networks/.
[65]
G. E. Hinton, P. Dayan, B. J. Frey, and R. M. Neal, “The" wake-sleep" algorithm for unsupervised neural networks,” Science, vol. 268, no. 5214, pp. 1158–1161, 1995.
[66]
G. E. Hinton, T. J. Sejnowski, and D. H. Ackley, Boltzmann machines: Constraint satisfaction networks that learn. Carnegie-Mellon University, Department of Computer Science Pittsburgh, PA, 1984.
[67]
Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole, “Score-based generative modeling through stochastic differential equations,” arXiv preprint arXiv:2011.13456, 2020.
[68]
Y. Sun et al., “Learning to (learn at test time): Rnns with expressive hidden states,” arXiv preprint arXiv:2407.04620, 2024.
[69]
K. Dalal et al., “One-minute video generation with test-time training,” arXiv preprint arXiv:2504.05298, 2025.
[70]
B. Cheng, I. Misra, A. G. Schwing, A. Kirillov, and R. Girdhar, “Masked-attention mask transformer for universal image segmentation,” 2022, booktitle = CVPR.
[71]
K. Soomro, A. R. Zamir, and M. Shah, “UCF101: A dataset of 101 human actions classes from videos in the wild,” arXiv preprint arXiv:1212.0402, 2012.
[72]
M. Cordts et al., “The cityscapes dataset for semantic urban scene understanding,” 2016, pp. 3213–3223.
[73]
K. He, X. Chen, S. Xie, Y. Li, P. Dollár, and booktitle=Proceedings. of the I. conference on computer vision and pattern recognition Girshick Ross, “Masked autoencoders are scalable vision learners,” 2022, pp. 16000–16009.
[74]
Y. Gandelsman, Y. Sun, X. Chen, and A. Efros, “Test-time training with masked autoencoders,” Advances in Neural Information Processing Systems, vol. 35, pp. 29374–29385, 2022.

  1. This is because neural fields work well with coordinate information[7]↩︎

  2. This anticipative-head may be learned with as few as 1 long-video during the training phase of TTT. We also experimented with the k-step future-frame predictor[9], [10], but found the next timestep predictor to work quite well (similar to classical auto-regression in language models)↩︎

  3. there are more numbers of pixels in \(v_{visual}\) than the dimensions in \(A\), so we multiply with the factor of \(\frac{2}{\sqrt{N}}\) in Eq@eq:eq:v95visual to compensate.↩︎

  4. Statistically, the central limit theorem says that the majority Gaussian probability mass lies in one standard deviation, which informed this choice.↩︎

  5. Buffer \(B\) should contain 60 frames initially. Each frame takes \(0.7sec\) for TTT, which incurs about 42 seconds of lag as \(B\) gets initialized.↩︎

  6. After merging, we swap the merged position with last position in the FIFO queue (similar to the quicksort algorithm). This prevents the bottleneck of shifting all elements one by one to achieve sorting. The former operation is a single swap, whereas the latter is computationally expensive (and CPU becomes the bottleneck instead of GPU).↩︎