SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.00202 · ICCV · 2021

HiFT: Hierarchical Feature Transformer for Aerial Tracking

Yiming Li, Bowen Li, Junjie Ye, Ziang Cao, Changhong Fu

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 4 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-22; 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/2108.00202.json · badge: /api/ran/2108.00202.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
vision4robotics/HiFT marked official in Papers with Code
Papers with Code archive
5 ran · 3 no recorded run
FunctionStatusWhere it lives
Cattention Ran
ran on a synthesized input · constructed an object; no result was computed
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("bdfe6baeda074a6f")
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, Cattention: 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)

# The forward method expects:
# - x: tensor with shape (batch, in_dim, height, width)
# - y: tensor with shape (batch, in_dim, height, width)
# The function concatenates x and y along channel dimension (dim=1)
# so we need compatible spatial dimensions

in_dim = 4
batch_size = 2
height = 3
width = 3

# Create input tensors
x = torch.randn(batch_size, in_dim, height, width)
y = torch.randn(batch_size, in_dim, height, width)

ARGS = {
    'in_dim': in_dim,
}
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 Cattention — 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 Cattention 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
TransformerDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("230070500d9d71a8")
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, TransformerDecoder: 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 torch.nn import ModuleList

torch.manual_seed(0)

# Create a minimal TransformerDecoderLayer
decoder_layer = nn.TransformerDecoderLayer(
    d_model=4,
    nhead=2,
    dim_feedforward=8,
    batch_first=False
)

# Create sample tensors with distinct dimensions
# tgt: (seq_len=5, batch=2, d_model=4)
tgt = torch.randn(5, 2, 4)

# memory: (seq_len=3, batch=2, d_model=4)
memory = torch.randn(3, 2, 4)

# Optional masks
tgt_mask = torch.zeros(5, 5)
memory_mask = torch.zeros(5, 3)

# Key padding masks
tgt_key_padding_mask = torch.zeros(2, 5, dtype=torch.bool)
memory_key_padding_mask = torch.zeros(2, 3, dtype=torch.bool)

# Layer normalization
norm = nn.LayerNorm(4)

ARGS = {
    "decoder_layer": decoder_layer,
    "num_layers": 2,
    "norm": norm
}
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 TransformerDecoder — 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 TransformerDecoder 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
TransformerDecoderLayer Ran
ran on a synthesized input
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("718fbdf281f5e895")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 torch.nn.functional as F
from typing import Optional, Any
from torch.nn import Module
from torch.nn import MultiheadAttention
from torch.nn import Dropout
from torch import nn, Tensor

def _get_activation_fn(activation):
    if activation == 'relu':
        return F.relu
    elif activation == 'gelu':
        return F.gelu
    raise RuntimeError('activation should be relu/gelu, not {}'.format(activation))

class TransformerDecoderLayer(Module):
    """TransformerDecoderLayer is made up of self-attn, multi-head-attn and feedforward network.
    This standard decoder layer is based on the paper "Attention Is All You Need".
    Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
    Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in
    Neural Information Processing Systems, pages 6000-6010. Users may modify or implement
    in a different way during application.

    Args:
        d_model: the number of expected features in the input (required).
        nhead: the number of heads in the multiheadattention models (required).
        dim_feedforward: the dimension of the feedforward network model (default=2048).
        dropout: the dropout value (default=0.1).
        activation: the activation function of intermediate layer, relu or gelu (default=relu).

    Examples::
        >>> decoder_layer = nn.TransformerDecoderLayer(d_model=512, nhead=8)
        >>> memory = torch.rand(10, 32, 512)
        >>> tgt = torch.rand(20, 32, 512)
        >>> out = decoder_layer(tgt, memory)
    """

    def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, activation='relu'):
        super(TransformerDecoderLayer, self).__init__()
        self.self_attn = MultiheadAttention(d_model, nhead, dropout=dropout)
        self.multihead_attn = MultiheadAttention(d_model, nhead, dropout=dropout)
        self.linear1 = nn.Linear(d_model, dim_feedforward)
        self.dropout = Dropout(dropout)
        self.linear2 = nn.Linear(dim_feedforward, d_model)
        self.norm1 = nn.LayerNorm(d_model)
        self.norm2 = nn.LayerNorm(d_model)
        self.norm3 = nn.LayerNorm(d_model)
        self.dropout1 = Dropout(dropout)
        self.dropout2 = Dropout(dropout)
        self.dropout3 = Dropout(dropout)
        self.activation = _get_activation_fn(activation)

    def __setstate__(self, state):
        if 'activation' not in state:
            state['activation'] = F.relu
        super(TransformerDecoderLayer, self).__setstate__(state)

    def forward(self, tgt: Tensor, memory: Tensor, tgt_mask: Optional[Tensor]=None, memory_mask: Optional[Tensor]=None, tgt_key_padding_mask: Optional[Tensor]=None, memory_key_padding_mask: Optional[Tensor]=None) -> Tensor:
        """Pass the inputs (and mask) through the decoder layer.

        Args:
            tgt: the sequence to the decoder layer (required).
            memory: the sequence from the last layer of the encoder (required).
            tgt_mask: the mask for the tgt sequence (optional).
            memory_mask: the mask for the memory sequence (optional).
            tgt_key_padding_mask: the mask for the tgt keys per batch (optional).
            memory_key_padding_mask: the mask for the memory keys per batch (optional).

        Shape:
            see the docs in Transformer class.
        """
        tgt2 = self.self_attn(tgt, tgt, tgt, attn_mask=tgt_mask, key_padding_mask=tgt_key_padding_mask)[0]
        tgt = tgt + self.dropout1(tgt2)
        tgt = self.norm1(tgt)
        tgt2 = self.multihead_attn(tgt, memory, memory, attn_mask=memory_mask, key_padding_mask=memory_key_padding_mask)[0]
        tgt = tgt + self.dropout2(tgt2)
        tgt = self.norm2(tgt)
        tgt2 = self.linear2(self.dropout(self.activation(self.linear1(tgt))))
        tgt = tgt + self.dropout3(tgt2)
        tgt = self.norm3(tgt)
        return tgt

INIT_ARGS = {
    'd_model': 8,
    'nhead': 2,
    'dim_feedforward': 16,
    'dropout': 0.1,
    'activation': 'relu'
}

ARGS = {
    'tgt': torch.randn(5, 2, 8),
    'memory': torch.randn(7, 2, 8),
    'tgt_mask': None,
    'memory_mask': None,
    'tgt_key_padding_mask': None,
    'memory_key_padding_mask': None
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("4664a61f9888f032")
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, TransformerEncoder: 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 torch import Tensor

torch.manual_seed(0)

# Create a minimal TransformerEncoderLayer
# The forward method expects: output = mod(output, srcc, src_mask=mask, src_key_padding_mask=src_key_padding_mask)
class MinimalEncoderLayer(nn.Module):
    def __init__(self, d_model=4, nhead=2, dim_feedforward=8, dropout=0.1):
        super().__init__()
        self.self_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout, batch_first=False)
        self.linear1 = nn.Linear(d_model, dim_feedforward)
        self.dropout = nn.Dropout(dropout)
        self.linear2 = nn.Linear(dim_feedforward, d_model)
        self.norm1 = nn.LayerNorm(d_model)
        self.norm2 = nn.LayerNorm(d_model)
        self.dropout1 = nn.Dropout(dropout)
        self.dropout2 = nn.Dropout(dropout)
        self.d_model = d_model
    
    def forward(self, src: Tensor, srcc: Tensor, src_mask=None, src_key_padding_mask=None):
        # Minimal implementation that accepts all the parameters the TransformerEncoder passes
        x = src
        # Self-attention
        attn_output, _ = self.self_attn(x, x, x, attn_mask=src_mask, key_padding_mask=src_key_padding_mask)
        x = self.norm1(x + self.dropout1(attn_output))
        # Feed-forward
        ff_output = self.linear2(self.dropout(torch.relu(self.linear1(x))))
        x = self.norm2(x + self.dropout2(ff_output))
        return x

# Create encoder layer
d_model = 4
nhead = 2
encoder_layer = MinimalEncoderLayer(d_model=d_model, nhead=nhead)

# Create norm layer
norm = nn.LayerNorm(d_model)

# Number of layers
num_layers = 3

# Prepare source tensor: (seq_len=5, batch_size=2, d_model=4)
src = torch.randn(5, 2, d_model)
srcc = torch.randn(5, 2, d_model)

# Optional mask (can be None, or a tensor)
mask = None

# Optional src_key_padding_mask (batch_size=2, seq_len=5)
src_key_padding_mask = None

ARGS = {
    'encoder_layer': encoder_layer,
    'num_layers': num_layers,
    'norm': norm,
}
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 TransformerEncoder — 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 TransformerEncoder 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
_get_clones Ran
ran; our contract draft was wrong, not the code
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("37d6ff7b5e1aa609")
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 ModuleList. 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 copy
from torch.nn import ModuleList

torch.manual_seed(0)

# Create a simple nn.Module to use as the module parameter
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the module
module = SimpleModule()

# Number of clones to create
N = 5

ARGS = {
    "module": module,
    "N": N
}
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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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
HiFT Not yet run
unverified (harvested, no recorded run)
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("50bed04a0efc0e40")
How it ran

no invocation recorded.

Transformer Not yet run
unverified (harvested, no recorded run)
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("41477e5be2425999")
How it ran

no invocation recorded.

TransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
vision4robotics/HiFT/pysot/models/utile/utile.py
code served (permissive licence) · get_code("4119dfc79a334f6d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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.

FunctionAlso present inEarliest-datedOthers named
_get_clones
brick of this paper's assembly: helper
6 other papers
2 dated earlier, 4 later · 2 only as an assembly brick
2103.06495 (2021-03)
Read Like Humans: Autonomous, Bidirectional and Iterative Language Modeling for Scene Text Recognition
2103.14146 (2021-03)
Describing and Localizing Multiple Changes with Transformers
2203.08459 (2022-03)
KinyaBERT: a Morphology-aware Kinyarwanda Language Model
and 3 more not named here
TransformerDecoder
brick of this paper's assembly: helper
1 other paper
1 later
2404.13999 (2024-04)
CoFInAl: Enhancing Action Quality Assessment with Coarse-to-Fine Instruction Alignment

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-22.

Repositories linked to this paper

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

Abstract

Most existing Siamese-based tracking methods execute the classification and regression of the target object based on the similarity maps. However, they either employ a single map from the last convolutional layer which degrades the localization accuracy in complex scenarios or separately use multiple maps for decision making, introducing intractable computations for aerial mobile platforms. Thus, in this work, we propose an efficient and effective hierarchical feature transformer (HiFT) for aerial tracking. Hierarchical similarity maps generated by multi-level convolutional layers are fed into the feature transformer to achieve the interactive fusion of spatial (shallow layers) and semantics cues (deep layers). Consequently, not only the global contextual information can be raised, facilitating the target search, but also our end-to-end architecture with the transformer can efficiently learn the interdependencies among multi-level features, thereby discovering a tracking-tailored feature space with strong discriminability. Comprehensive evaluations on four aerial benchmarks have proven the effectiveness of HiFT. Real-world tests on the aerial platform have strongly validated its practicability with a real-time speed. Our code is available at https: //github.com/vision4robotics/HiFT.

For agents

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

get_harvested_code_for_paper("2108.00202")
get_code_for_paper("2108.00202")
have("2108.00202")

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

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

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

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

Connect an agent — have() is free.