SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.10516 · ICLR · 2024

FeatUp: A Model-Agnostic Framework for Features at Any Resolution

U Berkeley, Mit, Stephanie Fu, Mark Hamilton, Laura Brandt, Axel Feldmann, Zhoutong Zhang, William Mit

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.10516.json · badge: /api/ran/2403.10516.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mhamilton723/FeatUp canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
havrylovv/isegprobe community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
JBUFeatUpUpsampler Ran
ran on a synthesized input · constructed an object; no result was computed
havrylovv/isegprobe/core/model/upsamplers/JBUFeatUp.py
code served (permissive licence) · get_code("1ad470877f653af1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, JBUFeatUpUpsampler: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock upsampler that satisfies the interface expected by forward()
# The upsampler is called with (source, guidance) and should return a tensor
class MockUpsampler(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, source: torch.Tensor, guidance: torch.Tensor) -> torch.Tensor:
        # Return a tensor with upsampled shape
        # x16 upsampling means if source is (B, C, H, W), output is (B, C, 16*H, 16*W)
        batch_size = source.shape[0]
        channels = source.shape[1]
        return torch.randn(batch_size, channels, 256, 256)

# Patch torch.hub.load to return a mock object with an upsampler attribute
original_hub_load = torch.hub.load

def mock_hub_load(repo_or_dir, model, **kwargs):
    mock_result = Mock()
    mock_result.upsampler = MockUpsampler()
    return mock_result

torch.hub.load = mock_hub_load

ARGS = {
    'backbone_type': 'dino16',
    'use_norm': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type JBUFeatUpUpsampler — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a JBUFeatUpUpsampler output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
SAPAModule Ran
ran on a synthesized input · constructed an object; no result was computed
mhamilton723/FeatUp/featup/upsamplers.py
code served (permissive licence) · get_code("6db1eb8ec395be88")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SAPAModule: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Mock the external dependencies that are imported in the function
class MockSapa:
    @staticmethod
    def sim(q, k, kernel_size, up_factor):
        # Mock similarity computation
        # q: (B, H, W, E), k: (B, H, W, E)
        # Return attention logits of shape (B, H, W, kernel_size*kernel_size)
        batch, height, width, emb_dim = q.shape
        return torch.randn(batch, height, width, kernel_size * kernel_size)
    
    @staticmethod
    def atn(attn, v, kernel_size, up_factor):
        # Mock attention application
        # attn: (B, H, W, K*K), v: (B, H, W, D)
        # Return upsampled output of shape (B, H*up_factor, W*up_factor, D)
        batch, height, width, dim = v.shape
        return torch.randn(batch, height * up_factor, width * up_factor, dim)

# Inject mock into sys.modules so it can be imported
import sys
sys.modules['sapa'] = type(sys)('sapa')
sys.modules['sapa'].sim = MockSapa.sim
sys.modules['sapa'].atn = MockSapa.atn

# Mock timm for trunc_normal_
class MockTimm:
    @staticmethod
    def trunc_normal_(tensor, std=0.02):
        nn.init.trunc_normal_(tensor, std=std)

sys.modules['timm'] = type(sys)('timm')
sys.modules['timm.models'] = type(sys)('timm.models')
sys.modules['timm.models.layers'] = type(sys)('timm.models.layers')
sys.modules['timm.models.layers'].trunc_normal_ = MockTimm.trunc_normal_

# Create test tensors
# y and x should be (batch, channels, height, width)
batch_size = 2
dim_y = 4
dim_x = 3
height = 5
width = 6
up_factor = 2
up_kernel_size = 5
embedding_dim = 64

y = torch.randn(batch_size, dim_y, height, width)
x = torch.randn(batch_size, dim_x, height, width)

ARGS = {
    'dim_y': dim_y,
    'dim_x': dim_x,
    'up_factor': up_factor,
    'up_kernel_size': up_kernel_size,
    'embedding_dim': embedding_dim,
    'qkv_bias': True,
    'norm': nn.LayerNorm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sapa, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SAPAModule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SAPAModule output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
SAPAUpsampler Ran
ran on a synthesized input · constructed an object; no result was computed
mhamilton723/FeatUp/featup/upsamplers.py
code served (permissive licence) · get_code("faa80aeb64a3998b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SAPAUpsampler: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Mock the sapa module since it's imported in the forward pass
class MockSapa:
    @staticmethod
    def sim(q, k, up_kernel_size, up_factor):
        # Return attention scores with shape (..., num_patches)
        batch, h, w, emb_dim = q.shape
        batch_k, h_k, w_k, emb_dim_k = k.shape
        # Simplified: return scores for upsampled spatial dimension
        return torch.randn(batch, h * up_factor, w * up_factor, h_k * w_k)
    
    @staticmethod
    def atn(attn, v, up_kernel_size, up_factor):
        # Return upsampled values with shape (batch, h*up_factor, w*up_factor, v_channels)
        batch, h_up, w_up, _ = attn.shape
        v_channels = v.shape[-1]
        return torch.randn(batch, h_up, w_up, v_channels)

import sys
from types import ModuleType
sapa_module = ModuleType('sapa')
sapa_module.sim = MockSapa.sim
sapa_module.atn = MockSapa.atn
sys.modules['sapa'] = sapa_module

# Mock timm module
class MockTruncNormal:
    @staticmethod
    def trunc_normal_(tensor, std=0.02):
        nn.init.normal_(tensor, std=std)

timm_layers = ModuleType('timm.models.layers')
timm_layers.trunc_normal_ = MockTruncNormal.trunc_normal_
timm_models = ModuleType('timm.models')
timm_models.layers = timm_layers
timm = ModuleType('timm')
timm.models = timm_models
sys.modules['timm'] = timm
sys.modules['timm.models'] = timm_models
sys.modules['timm.models.layers'] = timm_layers

# Now define the setup arguments
ARGS = {
    'dim_x': 4,
}

# Create minimal test tensors for the forward pass
source = torch.randn(2, 3, 8, 8)  # batch=2, channels=3, height=8, width=8
guidance = torch.randn(2, 3, 128, 128)  # larger guidance image
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sapa, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SAPAUpsampler — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SAPAUpsampler output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mag Ran
ran; our contract draft was wrong, not the code
mhamilton723/FeatUp/featup/train_implicit_upsampler.py
code served (permissive licence) · get_code("4bef79d7a0a57273")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function mag takes a tensor t and computes the magnitude along dimension 1
# It expects t to have at least 2 dimensions
# t.square() squares each element
# .sum(1, keepdim=True) sums along dimension 1
# .sqrt() takes the square root

# Create a small tensor with shape (batch=2, features=4)
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseUpsampler Not yet run
unverified (harvested, no recorded run)
havrylovv/isegprobe/core/model/upsamplers/JBUFeatUp.py
code served (permissive licence) · get_code("8f7c7dc6bcee7b48")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Figure 1: FeatUp upsamples image features from any model backbone, adding spatial resolution to existing semantics. High-res features can be learned either as a per-image implicit network or a general-purpose upsampling operation; the latter is a drop-in module to improve downstream dense prediction tasks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.10516")
get_code_for_paper("2403.10516")
have("2403.10516")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.10516.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.10516.svg)](https://syntology.ai/paper/2403.10516)

Connect an agent — have() is free.