SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.02859 · NeurIPS · 2021

Convolutional Neural Networks with Gated Recurrent Connections

Xiaolin Hu, Hu, Jianfeng Wang

arXiv · PDF · Open in the Atlas

Code that ran

2 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 5 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/2106.02859.json · badge: /api/ran/2106.02859.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
Jianf-Wang/GRCNN canonical (classifier label)
classifier basis: classifier_2025
2 ran · 5 no recorded run
FunctionStatusWhere it lives
SKConv Ran
ran on a synthesized input
Jianf-Wang/GRCNN/models/cifar/GRCNN.py
code served (permissive licence) · get_code("11f70d3ff645a6cf")
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, 64, 8, 8) 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
from torch.nn import init
from functools import reduce

class SKConv(nn.Module):

    def __init__(self, in_channels, out_channels, stride=1, M=2, r=16, L=32, groups=32):
        super(SKConv, self).__init__()
        d = max(in_channels // r, L)
        self.M = M
        self.out_channels = out_channels
        self.conv = nn.ModuleList()
        for i in range(M):
            if i == 0:
                conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=stride, padding=1, groups=groups, bias=False)
            else:
                conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, stride=stride, padding=0, groups=groups, bias=False)
            init.kaiming_normal_(conv1.weight)
            self.conv.append(nn.Sequential(conv1, nn.BatchNorm2d(out_channels, momentum=0.05), nn.ReLU(inplace=True)))
        self.global_pool = nn.AdaptiveAvgPool2d(1)
        conv_fc = nn.Conv2d(out_channels, d, 1, bias=False)
        init.normal_(conv_fc.weight, std=0.01)
        self.fc1 = nn.Sequential(conv_fc, nn.BatchNorm2d(d, momentum=0.05), nn.ReLU(inplace=True))
        self.fc2 = nn.Conv2d(d, out_channels * M, 1, 1, bias=False)
        init.normal_(self.fc2.weight, std=0.01)
        self.softmax = nn.Softmax(dim=1)

    def forward(self, input):
        batch_size = input.size(0)
        output = []
        for i, conv in enumerate(self.conv):
            output.append(conv(input))
        U = reduce(lambda x, y: x + y, output)
        s = self.global_pool(U)
        z = self.fc1(s)
        a_b = self.fc2(z)
        a_b = a_b.reshape(batch_size, self.M, self.out_channels, -1)
        a_b = self.softmax(a_b)
        a_b = list(a_b.chunk(self.M, dim=1))
        a_b = list(map(lambda x: x.reshape(batch_size, self.out_channels, 1, 1), a_b))
        V = list(map(lambda x, y: x * y, output, a_b))
        V = reduce(lambda x, y: x + y, V)
        return V


INIT_ARGS = {
    'in_channels': 32,
    'out_channels': 64,
    'stride': 1,
    'M': 2,
    'r': 16,
    'L': 32,
    'groups': 32
}

ARGS = {
    'input': torch.randn(2, 32, 8, 8)
}

if __name__ == '__main__':
    model = SKConv(**INIT_ARGS)
    model.eval()
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 64, 8, 8)")
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, 64, 8, 8) — shape (2, 64, 8, 8) 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)
onehot Ran
ran; our contract draft was wrong, not the code
Jianf-Wang/GRCNN/imagenet_train.py
code served (permissive licence) · get_code("d0518506614f0121")
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, 4) 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)

# Create a small label tensor with batch size 2
# Labels should be integers in range [0, n_classes)
label = torch.tensor([[1], [2]], dtype=torch.long).squeeze(1)

# Number of classes
n_classes = 4

ARGS = {
    "label": label,
    "n_classes": n_classes,
}
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, 4) — shape (2, 4) 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
GRCL Not yet run
unverified (harvested, no recorded run)
Jianf-Wang/GRCNN/models/cifar/GRCNN.py
code served (permissive licence) · get_code("7aca3aedc66e5e98")
How it ran

no invocation recorded.

grcnn55 Not yet run
unverified (harvested, no recorded run)
Jianf-Wang/GRCNN/models/imagenet/GRCNN.py
code served (permissive licence) · get_code("cc453fc743d8ac40")
How it ran

no invocation recorded.

mixup Not yet run
unverified (harvested, no recorded run)
Jianf-Wang/GRCNN/imagenet_train.py
code served (permissive licence) · get_code("775068f2f6a6a019")
How it ran

no invocation recorded.

skgrcnn109 Not yet run
unverified (harvested, no recorded run)
Jianf-Wang/GRCNN/models/imagenet/GRCNN.py
code served (permissive licence) · get_code("54b05c44ab4afec0")
How it ran

no invocation recorded.

skgrcnn55 Not yet run
unverified (harvested, no recorded run)
Jianf-Wang/GRCNN/models/imagenet/GRCNN.py
code served (permissive licence) · get_code("9bd3d2701f23bcfc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-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

The convolutional neural network (CNN) has become a basic model for solving many computer vision problems. In recent years, a new class of CNNs, recurrent convolution neural network (RCNN), inspired by abundant recurrent connections in the visual systems of animals, was proposed. The critical element of RCNN is the recurrent convolutional layer (RCL), which incorporates recurrent connections between neurons in the standard convolutional layer. With increasing number of recurrent computations, the receptive fields (RFs) of neurons in RCL expand unboundedly, which is inconsistent with biological facts. We propose to modulate the RFs of neurons by introducing gates to the recurrent connections. The gates control the amount of context information inputting to the neurons and the neurons' RFs therefore become adaptive. The resulting layer is called gated recurrent convolution layer (GRCL). Multiple GRCLs constitute a deep model called gated RCNN (GRCNN). The GRCNN was evaluated on several computer vision tasks including object recognition, scene text recognition and object detection, and obtained much better results than the RCNN. In addition, when combined with other adaptive RF techniques, the GRCNN demonstrated competitive performance to the state-of-the-art models on benchmark datasets for these tasks. The codes are released at https://github.com/Jianf-Wang/GRCNN.

For agents

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

get_harvested_code_for_paper("2106.02859")
get_code_for_paper("2106.02859")
have("2106.02859")

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

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

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

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

Connect an agent — have() is free.