SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.02557 · CVPR · 2022

MixFormer: Mixing Features across Windows and Dimensions

Jian Wang, Errui Ding, Jingdong Wang, Qiang Chen, Jian Cheng, Qinghao Hu, Tao Hu, Qiman Wu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 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 10 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2204.02557.json · badge: /api/ran/2204.02557.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
flytocc/PaddleClas community (classifier label)
classifier basis not recorded on the link
5 ran · 4 no recorded run
clearlon/stylemixformer community
Papers with Code archive
5 ran · 0 no recorded run
FunctionStatusWhere it lives
AttentionCC Ran
ran on a synthesized input
clearlon/stylemixformer/styleformer/archs/styleformer_util.py
code served (permissive licence) · get_code("5d037926d5843004")
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 4, 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
from einops import rearrange

class AttentionCC(nn.Module):

    def __init__(self, dim, num_heads, bias):
        super(AttentionCC, self).__init__()
        self.num_heads = num_heads
        self.temperature = nn.Parameter(torch.ones(num_heads, 1, 1))
        self.qkv = nn.Conv2d(dim, dim * 3, kernel_size=1, bias=bias)
        self.qkv_dwconv = nn.Conv2d(dim * 3, dim * 3, kernel_size=3, stride=1, padding=1, groups=dim * 3, bias=bias)

    def forward(self, x, channel_attn):
        b, c, h, w = x.shape
        qkv = self.qkv_dwconv(self.qkv(x))
        q, k, v = qkv.chunk(3, dim=1)
        v = channel_attn * v
        q = rearrange(q, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
        k = rearrange(k, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
        v = rearrange(v, 'b (head c) h w -> b head c (h w)', head=self.num_heads)
        q = torch.nn.functional.normalize(q, dim=-1)
        k = torch.nn.functional.normalize(k, dim=-1)
        attn = q @ k.transpose(-2, -1) * self.temperature
        attn = attn.softmax(dim=-1)
        out = attn @ v
        out = rearrange(out, 'b head c (h w) -> b (head c) h w', head=self.num_heads, h=h, w=w)
        return out


INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'bias': True,
}

ARGS = {
    'x': torch.randn(2, 4, 3, 5),
    'channel_attn': torch.randn(2, 4, 3, 5),
}

if __name__ == '__main__':
    model = AttentionCC(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: {ARGS['x'].shape}")
    assert output.shape == ARGS['x'].shape, f"Shape mismatch: {output.shape} vs {ARGS['x'].shape}"
    print("Success!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, 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)
ChannelInteraction Ran
ran on a synthesized input · constructed an object; no result was computed
clearlon/stylemixformer/styleformer/archs/styleformer_util.py
code served (permissive licence) · get_code("5e935e13456b2294")
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, ChannelInteraction: 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 ChannelInteraction module takes a single parameter: dim
# It expects input tensors with shape (batch, dim, height, width)
# where dim is the number of channels

ARGS = {
    "dim": 4
}

# Verify the setup works by instantiating and running the module
if __name__ == "__main__":
    model = nn.ChannelInteraction(**ARGS)
    # Create a small test input tensor: (batch=2, channels=4, height=3, width=3)
    x = torch.randn(2, 4, 3, 3)
    output = model(x)
    print(f"Input shape: {x.shape}")
    print(f"Output shape: {output.shape}")
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 ChannelInteraction — 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 ChannelInteraction 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
MixRestormer Ran
ran on a synthesized input · constructed an object; no result was computed
clearlon/stylemixformer/styleformer/archs/styleformer_util.py
code served (permissive licence) · get_code("05212f4e91896ff3")
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, MixRestormer: 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)

# Define ARGS dict with all parameters for MixRestormer
ARGS = {
    'dim': 4,
    'num_heads': 2,
    'drop_type': 'dropout',
    'drop_out_rate': 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MixRestormer — 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 MixRestormer 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
SimpleGate Ran
ran on a synthesized input
clearlon/stylemixformer/styleformer/archs/styleformer_util.py
code served (permissive licence) · get_code("abc6ee09587fed69")
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 4, dtype family float, shape (2, 4, 4, 3) 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
import torch.nn as nn

class SimpleGate(nn.Module):
    """
    copy from NAFNet
    """

    def forward(self, x):
        x1, x2 = x.chunk(2, dim=1)
        return x1 * x2


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 8, 4, 3)
}

if __name__ == '__main__':
    model = SimpleGate(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
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 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 4, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SpatialInteraction Ran
ran on a synthesized input · constructed an object; no result was computed
clearlon/stylemixformer/styleformer/archs/styleformer_util.py
code served (permissive licence) · get_code("f21f09acc77e8d76")
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, SpatialInteraction: 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 SpatialInteraction module takes a single parameter: dim
# It constructs a Sequential model with Conv2d layers
# The forward method takes a tensor x and applies the sequential model to it

# For a minimal valid setup:
# - dim should be a positive integer that works with the architecture
#   (dim must be divisible by 4 since it uses dim // 4)
# - We'll use dim=4 (smallest that's divisible by 4 and reasonable)

ARGS = {
    "dim": 4
}
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 SpatialInteraction — 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 SpatialInteraction 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
extract Ran
ran on a synthesized input
flytocc/PaddleClas/test_tipc/extract_loss.py
code served (permissive licence) · get_code("efe80a6faca7b66d")
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 float, ndim 0, dtype family float, shape () 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 argparse
import re
import sys
from io import StringIO

# Mock the argument parser to avoid actual command-line parsing
class MockArgs:
    def __init__(self):
        self.valid_expr = '*'
        self.extract_expr = '^{%s}$,'
        self.reduction_expr = 'print'
        self.discard = 0
        self.debug = False

# Override sys.argv to avoid argparse reading actual command line
original_argv = sys.argv
sys.argv = ['test']

def parameter_parser():
    parser = argparse.ArgumentParser(description='Support Args:')
    parser.add_argument('-v', '--valid-expr', type=str, default='*', help='when not match, the line will discard.')
    parser.add_argument('-e', '--extract-expr', type=str, default='^{%s}$,', help='the extract expr for the loss: loss {%f}')
    parser.add_argument('-r', '--reduction-expr', type=str, default='print', help='print | sum | mean')
    parser.add_argument('-n', '--discard', type=int, default=0, help='while reduction, discard [0:n] and [-n:]')
    parser.add_argument('-d', '--debug', type=bool, default=False, help='debug')
    return parser.parse_args()

args = parameter_parser()

def log(*inp, **kargs):
    if args.debug:
        print(*inp, **kargs)

def extract(line, extract_expr):
    """
    return tuple, the output will be 
    """
    log('Extract_expression is : ', extract_expr)
    x = re.findall('\\{%(.)\\}', extract_expr)
    assert len(x) == 1, 'Must exist a {%d} | {%f} | {%s} '
    t = x[0]
    type_converter = {'f': float, 'i': int, 's': str}
    type_extracter = {'f': '(\\\\d+\\\\.\\\\d+)', 'i': '(\\\\d+)', 's': '(.*?)'}
    log(type_extracter[t])
    pattern = re.sub('\\{%(.)\\}', type_extracter[t], extract_expr, 1)
    log('Created Pattern is: ', pattern)
    x = re.findall(pattern, line)
    if len(x) == 0:
        return None
    assert len(x) == 1, f'Multi Match for `{extract_expr}` in line: \n{line}'
    log('Find in line: ', x[0].strip())
    return type_converter[t](x[0].strip())

# Define test arguments for the extract function
ARGS = {
    'line': 'loss 3.14',
    'extract_expr': 'loss {%f}'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
is_valid Ran
ran on a synthesized input
flytocc/PaddleClas/test_tipc/extract_loss.py
code served (permissive licence) · get_code("413184c918d844c8")
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 bool, ndim 0, dtype family float, shape () 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

ARGS = {
    "line": "hello world",
    "valid_expr": "world"
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
rerange_index Ran
ran on a synthesized input
flytocc/PaddleClas/ppcls/loss/comfunc.py
code served (permissive licence) · get_code("21421188135068e9")
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 ndarray, ndim 1, dtype family int, shape (16,) 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 numpy as np

ARGS = {
    "batch_size": 4,
    "samples_each_class": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (16,) — shape (16,) 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
similar_model_names Ran
ran on a synthesized input
flytocc/PaddleClas/paddleclas.py
code served (permissive licence) · get_code("398221cc3d60f209")
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 list, ndim 1, 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.

from difflib import SequenceMatcher

ARGS = {
    'name': 'resnet',
    'names': ['resnet50', 'resnet18', 'vgg16', '__private_model', 'densenet121', 'mobilenet_v2', 'inception_v3'],
    'thresh': 0.1,
    'topk': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
unique_shape Ran
ran on a synthesized input
flytocc/PaddleClas/ppcls/loss/afdloss.py
code served (permissive licence) · get_code("0c3f60f3f5d20da9")
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 tuple. 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - It takes s_shapes as a parameter
# - It iterates over s_shapes
# - It checks if each s_shape is in unique_shapes (using 'in' operator and equality comparison)
# - It appends s_shapes to a list
# - Returns a tuple of (n_s, unique_shapes)

# s_shapes should be an iterable of shape-like objects that support equality comparison
# Shapes are typically tuples of integers

s_shapes = [
    (2, 4),
    (3, 5),
    (2, 4),
    (3, 5),
    (1, 6),
    (2, 4),
]

ARGS = {
    "s_shapes": s_shapes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
check_model_file Not yet run
unverified (harvested, no recorded run)
flytocc/PaddleClas/paddleclas.py
code served (permissive licence) · get_code("fab16299446cee0f")
How it ran

no invocation recorded.

cosine_similarity Not yet run
unverified (harvested, no recorded run)
flytocc/PaddleClas/ppcls/loss/dist_loss.py
code served (permissive licence) · get_code("bffab447a4eca741")
How it ran

no invocation recorded.

inter_class_relation Not yet run
unverified (harvested, no recorded run)
flytocc/PaddleClas/ppcls/loss/dist_loss.py
code served (permissive licence) · get_code("58f2b08eed947b76")
How it ran

no invocation recorded.

pearson_correlation Not yet run
unverified (harvested, no recorded run)
flytocc/PaddleClas/ppcls/loss/dist_loss.py
code served (permissive licence) · get_code("a7997903cea7558c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 3 later) and 10 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
SimpleGate
brick of this paper's assembly: model
13 other papers
1 the same month, 12 later · 12 only as an assembly brick
2204.04676 (2022-04)
Simple Baselines for Image Restoration
2208.09703 (2022-08)
SnowFormer: Context Interaction Transformer with Scale-awareness for Single Image Desnowing
2211.09800 (2022-11)
InstructPix2Pix: Learning to Follow Image Editing Instructions
and 10 more not named here
inter_class_relation 5 other papers
5 later
2205.10536 (2022-05)
Knowledge Distillation from A Stronger Teacher
2305.15032 (2023-05)
How to Distill your BERT: An Empirical Study on the Impact of Weight Initialisation and Distillation Objectives
2406.01512 (2024-06)
MAD: Multi-Alignment MEG-to-Text Decoding
and 2 more not named here
pearson_correlation 3 other papers
3 later
2205.10536 (2022-05)
Knowledge Distillation from A Stronger Teacher
2405.14124 (2024-05)
Mixture of Experts Meets Prompt-Based Continual Learning
2509.23871 (2025-09)
Taught Well Learned Ill: Towards Distillation-conditional Backdoor Attack
rerange_index 3 other papers
3 dated earlier
1807.11626 (2018-07)
MnasNet: Platform-Aware Neural Architecture Search for Mobile
1904.05049 (2019-04)
Drop an Octave: Reducing Spatial Redundancy in Convolutional Neural Networks with Octave Convolution
2111.09883 (2021-11)
Swin Transformer V2: Scaling Up Capacity and Resolution

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

While local-window self-attention performs notably in vision tasks, it suffers from limited receptive field and weak modeling capability issues. This is mainly because it performs self-attention within non-overlapped windows and shares weights on the channel dimension. We propose Mix-Former to find a solution. First, we combine local-window self-attention with depth-wise convolution in a parallel design, modeling cross-window connections to enlarge the receptive fields. Second, we propose bi-directional interactions across branches to provide complementary clues in the channel and spatial dimensions. These two designs are integrated to achieve efficient feature mixing among windows and dimensions. Our MixFormer provides competitive results on image classification with EfficientNet and shows better results than RegNet and Swin Transformer. Performance in downstream tasks outperforms its alternatives by significant margins with less computational costs in 5 dense prediction tasks on MS COCO, ADE20k, and LVIS. Code is available at https://github.com/ PaddlePaddle/PaddleClas.

For agents

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

get_harvested_code_for_paper("2204.02557")
get_code_for_paper("2204.02557")
have("2204.02557")

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

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

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

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

Connect an agent — have() is free.