NAF: Zero-Shot Feature Upsampling via Neighborhood Attention Filtering

Loick Chambon, Paul Couairon, Eloi Zablocki, Alexandre Boulch, Nicolas Thome +1 more
11/23/2025
cs.CV

Official code: valeoai/NAF (118 stars, Apache-2.0, last commit 2026-04-10).

Abstract

Vision Foundation Models (VFMs) extract spatially downsampled representations, posing challenges for pixel-level tasks. Existing upsampling approaches face a fundamental trade-off: classical filters are fast and broadly applicable but rely on fixed forms, while modern upsamplers achieve superior accuracy through learnable, VFM-specific forms at the cost of retraining for each VFM. We introduce Neighborhood Attention Filtering (NAF), which bridges this gap by learning adaptive spatial-and-content weights through Cross-Scale Neighborhood Attention and Rotary Position Embeddings (RoPE), guided solely by the high-resolution input image. NAF operates zero-shot: it upsamples features from any VFM without retraining, making it the first VFM-agnostic architecture to outperform VFM-specific upsamplers and achieve state-of-the-art performance across multiple downstream tasks. It maintains high efficiency, scaling to 2K feature maps and reconstructing intermediate-resolution maps at 18 FPS. Beyond feature upsampling, NAF demonstrates strong performance on image restoration, highlighting its versatility. Code and checkpoints are available at https://github.com/valeoai/NAF.

View on arXivView PDF

Code Implementations(1)

valeoai/NAFOfficial100%
Apache-2.0

Official Implementation of NAF: Zero-Shot Feature Upsampling via Neighborhood Attention Filtering

1184Python, Jupyter NotebookNov 24, 20256 months agoApache-2.0
computer-visiondenoisingfeature-upsamplingfoundation-modelshigh-resolution

Similar Papers

Cite this paper

@article{chambon2025naf,
  title  = {NAF: Zero-Shot Feature Upsampling via Neighborhood Attention Filtering},
  author = {Loick Chambon and Paul Couairon and Eloi Zablocki and Alexandre Boulch and Nicolas Thome and Matthieu Cord},
  year   = {2025},
  eprint = {2511.18452},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.18452v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.18452.svg)](https://codeofpaper.com/paper/2511.18452)

Discussion