TL;DR
LILA (Linear In-Context Learning) is a novel training framework that allows encoder-decoder models to learn high-resolution, pixel-accurate feature descriptors directly from unlabelled videos. By forcing the model to find a shared linear mapping between video frames and their corresponding geometric and motion cues, LILA filters out training noise and delivers temporally consistent representations. Remarkably, while it learns from video dynamics, it requires only a single image at inference time, significantly outperforming existing feature upsampling methods on dense downstream tasks.
What Problem Does This Paper Address?
Modern vision foundation models (like the DINO family) are incredibly powerful at capturing semantic concepts, but they suffer from a major spatial limitation: they process images in patches, yielding low-resolution feature grids (e.g., one feature vector per 14x14 pixel patch).
If you want to perform pixel-precise tasks like video object segmentation, semantic segmentation, or surface normal estimation, you need pixel-level granularity. Naively upsampling the input image is computationally expensive and hurts performance due to resolution discrepancies between training and inference. Meanwhile, existing video-based representation learning methods either focus on high-level action recognition (losing pixel details) or require complex multi-frame inputs at test time.
The authors bridge this gap by learning dense, pixel-fine feature grids from unlabelled video data that inherently encode both geometric structure and temporal consistency, all while maintaining a standard single-image inference pipeline.
Methods
LILA uses a frozen vision transformer backbone (like DINOv2) paired with a trainable DPT (Vision Transformers for Dense Prediction) decoder. The core novelty lies in how this decoder is trained using Linear In-Context Learning.
During training, the model takes a pair of adjacent video frames: a context frame ($I_t$) and a query frame ($I_{t+\Delta}$).
- Cue Generation: Off-the-shelf, pre-trained networks generate dense, pixel-level "cue maps" for both frames, consisting of monocular depth, forward/backward optical flow, and refined low-resolution encoder features.
- Linear In-Context Mapping: LILA solves a ridge regression problem on the context frame to find an optimal linear projection matrix ($W^*$) that maps the decoder's generated pixel features to the context frame's cue maps.
- Consistency Loss: The framework then applies this exact same linear mapping ($W^*$) to the query frame's features. The training objective minimizes the reconstruction error between this projection and the query frame's actual cue maps, alongside an edge-preserving gradient matching loss.
By forcing a simple linear relationship to hold true across different frames over time, the network is incentivized to learn representations that are robust to frame-specific noise and highly consistent across time and space.
Datasets
- Training: The smaller LILA variants (ViT-S14, ViT-B14) were trained on YouTube-VOS (YT-VOS), containing 3,978 high-resolution video sequences. The larger variant (ViT-L14) was additionally trained on Kinetics-700, a massive, uncurated dataset of 650K video clips.
- Evaluation:
- DAVIS-2017: The standard benchmark for video object segmentation (VOS).
- NYUv2: Used for evaluating pixel-level surface normal estimation.
- COCO-Stuff & ADE20K: Used to evaluate dense semantic segmentation performance, including zero-shot capabilities.
Key Insights and Ideas
- Noise Filtering via Linearity: Off-the-shelf depth and flow models provide notoriously noisy predictions on uncurated videos. Standard Empirical Risk Minimization (ERM) tends to absorb this noise. LILA's cross-frame linear formulation acts as a powerful regularizer, filtering out temporally unstable noise because a single linear matrix must explain the geometry of both frames.
- Synergistic Cue Modalities: The ablation studies show that combining semantic self-distillation, motion (flow), and geometry (depth) creates a sum greater than its parts. Removing the geometric or motion cues caused a massive drop in downstream video object segmentation accuracy.
- Zero-Shot Transfer: By utilizing text embeddings from CLIP during linear probing, LILA demonstrates strong zero-shot semantic segmentation capabilities on unseen object categories, proving it captures generalized visual patterns rather than just memorizing training classes.
Key Results
LILA consistently outperforms both its base foundation models and state-of-the-art feature upsampling alternatives (like FeatUp and LoftUp) across all evaluated tasks.
- Video Object Segmentation (DAVIS-2017): Built on top of DINOv2-S14, LILA improved the baseline VOS accuracy by nearly 10% $\mathcal{J}\mathcal{F}$ in linear probing, outperforming LoftUp by 4.3% $\mathcal{J}\mathcal{F}$ without requiring any mask-based supervision (like SAM).
- Surface Normal & Semantic Segmentation: LILA brought a confident boost to all metrics on NYUv2 and COCO-Stuff. Qualitatively, it resolves exceptionally sharp boundaries around fine and dynamic structures, such as bicycle spokes or complex background details.
Limitations and Future Work
Because LILA relies entirely on off-the-shelf models to generate its training cues (e.g., DepthAnythingV2 and SEA-RAFT), its performance is inherently bounded by the domain coverage of those models.
When tested on extreme out-of-domain data, LILA yields reasonable representations for medical imagery (like chest X-rays) but struggles with aerial imagery, where complex shadows frequently confound the underlying depth and optical flow estimators. Future work will likely explore adapting LILA to broader cue modalities to overcome these domain constraints.
Summary updated