SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.05300 · NeurIPS · 2020

Glance and Focus: a Dynamic Approach to Reducing Spatial Redundancy in Image Classification

Yulin Wang, Gao Huang, Shiji Song, Kangchen Lv, Rui Huang, Le Yang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 2 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2010.05300.json · badge: /api/ran/2010.05300.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
blackfeather-wang/gfnet-pytorch canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
blackfeather-wang/GFNet-Pytorch marked official in Papers with Code
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ActorCritic Ran
ran on a synthesized input · constructed an object; no result was computed
blackfeather-wang/GFNet-Pytorch/network.py
code served (permissive licence) · get_code("ff16fd088aa240e7")
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, ActorCritic: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a simple memory class to hold the required attributes
class Memory:
    def __init__(self):
        self.hidden = []
        self.states = []
        self.actions = []
        self.logprobs = []

# Define ARGS with all parameters for ActorCritic.__init__
ARGS = {
    'feature_dim': 4,
    'state_dim': 16,
    'hidden_state_dim': 8,
    'policy_conv': True,
    'action_std': 0.1,
}
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 ActorCritic — 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 ActorCritic 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
dynamic_evaluate Ran
ran; our contract draft was wrong, not the code
blackfeather-wang/gfnet-pytorch/inference.py
code served (permissive licence) · get_code("8f49cc1ffec8b4b7")
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 tuple, 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.

import torch

torch.manual_seed(0)

# logits: shape (n_stage, n_sample, c)
# - n_stage: number of stages
# - n_sample: number of samples
# - c: number of classes
logits = torch.randn(3, 2, 4)  # 3 stages, 2 samples, 4 classes

# targets: shape (n_sample,) with class indices
targets = torch.tensor([1, 2])  # 2 samples with class labels

# flops: shape (n_stage,) with flop counts per stage
flops = torch.tensor([100.0, 200.0, 300.0])  # 3 stages

# T: shape (n_stage,) with confidence thresholds per stage
T = torch.tensor([0.3, 0.5, 0.7])  # 3 stages with different thresholds

ARGS = {
    "logits": logits,
    "targets": targets,
    "flops": flops,
    "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 tuple, ndim 1, dtype family float — a tuple 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
dynamic_find_threshold Ran
ran; our contract draft was wrong, not the code
blackfeather-wang/gfnet-pytorch/inference.py
code served (permissive licence) · get_code("972a0b6e71a3501c")
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 1, dtype family float, shape (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 math

torch.manual_seed(0)

# Construct logits: shape (n_stage, n_sample, c)
# n_stage=3, n_sample=4, c=5
logits = torch.randn(3, 4, 5)

# Construct targets: shape (n_sample,)
targets = torch.randint(0, 5, (4,))

# Construct p: list of probabilities for each stage (except last)
# Length should be n_stage - 1 = 2
p = [0.5, 0.75]

ARGS = {
    "logits": logits,
    "targets": targets,
    "p": p,
}
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 1, dtype family float, shape (3,) — shape (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: none by the harness; any seed is in the setup block
generate_logits Not yet run
unverified (harvested, no recorded run)
blackfeather-wang/gfnet-pytorch/inference.py
code served (permissive licence) · get_code("25108bfdfc0ed9cd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 1 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
dynamic_evaluate 5 other papers
5 later
2105.15075 (2021-05)
Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition
2201.03014 (2022-01)
Glance and Focus Networks for Dynamic Visual Recognition
2203.03821 (2022-03)
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
and 2 more not named here
dynamic_find_threshold 2 other papers
2 later
2105.15075 (2021-05)
Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition
2201.03014 (2022-01)
Glance and Focus Networks for Dynamic Visual Recognition
generate_logits 1 other paper
1 later
2201.03014 (2022-01)
Glance and Focus Networks for Dynamic Visual Recognition

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

The accuracy of deep convolutional neural networks (CNNs) generally improves when fueled with high resolution images. However, this often comes at a high computational cost and high memory footprint. Inspired by the fact that not all regions in an image are task-relevant, we propose a novel framework that performs efficient image classification by processing a sequence of relatively small inputs, which are strategically selected from the original image with reinforcement learning. Such a dynamic decision process naturally facilitates adaptive inference at test time, i.e., it can be terminated once the model is sufficiently confident about its prediction and thus avoids further redundant computation. Notably, our framework is general and flexible as it is compatible with most of the state-of-theart light-weighted CNNs (such as MobileNets, EfficientNets and RegNets), which can be conveniently deployed as the backbone feature extractor. Experiments on ImageNet show that our method consistently improves the computational efficiency of a wide variety of deep models. For example, it further reduces the average latency of the highly efficient MobileNet-V3 on an iPhone XS Max by 20% without sacrificing accuracy. Code and pre-trained models are available at https: //github.com/blackfeather-wang/GFNet-Pytorch.

For agents

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

get_harvested_code_for_paper("2010.05300")
get_code_for_paper("2010.05300")
have("2010.05300")

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

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

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

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

Connect an agent — have() is free.