TL;DR
LILA (Linear In-Context Learning) is a novel self-supervised framework that trains encoder-decoder models on unlabeled videos to produce high-resolution, pixel-accurate feature maps. By forcing the network to learn a linear mapping that remains consistent across video frames, LILA effectively filters out noise from off-the-shelf depth and motion estimators, significantly boosting performance on downstream tasks like video object segmentation, semantic segmentation, and surface normal estimation using only a single image at inference time.
What Problem Does This Paper Address?
Modern vision foundation models (like DINOv2 or CLIP) generate incredibly rich semantic representations, but they typically operate at a patch level (e.g., $14\times14$ pixel blocks). For dense pixel-level tasks like object segmentation or surface normal estimation, we need pixel-fine accuracy. Simply upsampling these low-resolution feature maps often introduces artifacts or fails to capture fine-grained spatial and temporal boundaries.
While video-based pre-training can capture dynamic scene properties, existing methods either don't scale well to dense pixel predictions or require multi-frame video sequences during inference. The authors tackle a key challenge: How can we learn dense, pixel-level, temporally consistent feature representations from uncurated, unlabeled videos, while keeping inference simple enough to run on a single image?
Methods
The authors introduce LILA (Linear In-Context Learning), an encoder-decoder training strategy. They freeze a pre-trained vision transformer backbone (like DINOv2) and train a DPT (Dense Prediction Transformer) decoder.
The core training mechanism relies on a clever "in-context" formulation across pairs of video frames—a context frame ($I_t$) and a query frame ($I_{t+\Delta}$):
- Cue Map Generation: For each frame pair, they extract off-the-shelf, pixel-level "cues": optical flow (motion), monocular depth (geometry), and refined low-resolution encoder features (semantics).
- Linear Ridge Regression: Using the context frame's dense features ($x_0$), they solve a closed-form linear ridge regression problem to find an optimal linear projection matrix ($W^*$) that maps $x_0$ to the context frame's cue maps ($G_{\text{context}}$).
- In-Context Consistency Loss: They apply this exact same matrix $W^*$ to the query frame's features ($x_\Delta$). The network is optimized to minimize the error between this projection ($x_\Delta W^*$) and the query frame's actual cue maps ($G_{\text{query}}$).
An edge-preserving gradient matching loss is also added to ensure sharp boundaries. Crucially, at test time, the depth and optical flow networks are completely discarded; LILA takes a single image and outputs a high-resolution feature map.
Datasets
- Training:
- YouTube-VOS (2019): ~4,000 high-resolution video sequences of everyday scenes.
- Kinetics-700: ~650,000 video clips of human actions (used to test scalability on uncurated data).
- Evaluation:
- DAVIS-2017: Video Object Segmentation (VOS) benchmark.
- NYUv2: Indoor scene dataset used for surface normal estimation.
- COCO-Stuff & ADE20K: Challenging benchmarks for semantic segmentation.
Key Insights and Ideas
- Noise Filtering via Linear Constraints: Off-the-shelf depth and optical flow models are notoriously noisy and contain frame-specific artifacts. However, because LILA forces a single linear transformation ($W^*$) to hold true across different frames, it acts as a powerful regularizer. Frame-specific noise is suppressed, forcing the decoder to learn clean, underlying spatio-temporal structures.
- Synergy of Modalities: The authors find that combining motion (flow), geometry (depth), and semantics (self-distillation) creates a strong synergistic effect. Omitting geometric and motion cues causes a massive drop in downstream performance (e.g., -5.3% in VOS accuracy).
- Efficiency: Because the ridge regression optimization happens over the feature dimension ($d$) rather than the number of pixels ($N$), it has a closed-form solution that is highly efficient to compute during training.
Key Results
LILA consistently outperforms standard foundation model baselines and state-of-the-art feature upsampling methods (like FeatUp and LoftUp) across all evaluated tasks:
- Video Object Segmentation (DAVIS-2017): Built on top of DINOv2-S14, LILA achieves a $\mathcal{J}\&\mathcal{F}$ score of 73.9% (local $k$-NN), outperforming the raw DINOv2 baseline by 8.8% and beating LoftUp (which requires heavy mask supervision from SAM) by 7.9%.
- Surface Normal Estimation (NYUv2): LILA significantly reduces Root Mean Squared Error (RMSE) across all backbones (e.g., reducing DINOv2-S14 RMSE from 29.71 to 28.53) and yields much sharper structural details for indoor furniture.
- Semantic Segmentation (COCO-Stuff): LILA boosts the mIoU of DINOv2-L14 by +4.1% when trained on YouTube-VOS, and +4.6% when scaled up to the uncurated Kinetics dataset.
Limitations and Future Work
The primary limitation of LILA is its dependency on the quality of the off-the-shelf cue estimators (like SEA-RAFT and DepthAnythingV2). The framework's applicability is bounded by domains where these underlying models can produce plausible depth and motion fields. For instance, the authors noted that when tested on out-of-domain aerial imagery, LILA's representations became confounded by heavy shadows, leading to less meaningful feature maps. Future work could explore integrating more robust or diverse cue modalities to extend LILA to broader domains.
Summary updated