SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.00416 · CVPR · 2021

Unsupervised Degradation Representation Learning for Blind Super-Resolution

Wei An, Xiaoyu Dong, Longguang Wang, Yulan Guo, Yingqian Wang, Jungang Yang, Qingyu Xu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 0 have no contract verdict; 7 failures of our instrument; 1 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/2104.00416.json · badge: /api/ran/2104.00416.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
LongguangWang/DASR canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
anisotropic_gaussian_kernel Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/utils/util.py
code served (permissive licence) · get_code("7087050521a2ecfe")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 5) as a later run recorded it. 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, 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

torch.manual_seed(0)

# Parameters for anisotropic_gaussian_kernel
batch = 2
kernel_size = 5

# Create a covariance matrix (2x2 for 2D coordinates)
# Must be positive definite and invertible
covar = torch.tensor([
    [[2.0, 0.5], [0.5, 1.5]],
    [[1.8, 0.3], [0.3, 1.2]]
], dtype=torch.float32)

ARGS = {
    "batch": batch,
    "kernel_size": kernel_size,
    "covar": covar
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 5) — shape (2, 5, 5) 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
cal_sigma Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/utils/util.py
code served (permissive licence) · get_code("28534d0602b136e0")
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 Tensor, ndim 3, dtype family float, shape (2, 2, 2) 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.functional as F

torch.manual_seed(0)

# Create small tensors for the function parameters
sig_x = torch.randn(2)  # batch size 2
sig_y = torch.randn(2)  # batch size 2
radians = torch.randn(2)  # batch size 2

ARGS = {
    'sig_x': sig_x,
    'sig_y': sig_y,
    'radians': radians,
}
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 Tensor, ndim 3, dtype family float, shape (2, 2, 2) — shape (2, 2, 2) 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
calc_psnr Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/utility.py
code served (permissive licence) · get_code("8956c7aa0c145edf")
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 torch
import math

torch.manual_seed(0)

# Create small tensor arguments for sr and hr
# The function expects 4D tensors (batch, channels, height, width)
# and performs operations like .size(1), .div(), .mul_(), .sum(dim=1, keepdim=True)
# and slicing [:, :, shave:-shave, shave:-shave]
# We need tensors large enough that after shaving (scale + 6 or scale pixels),
# there's still a valid region to compute MSE on

batch_size = 2
channels = 3
height = 20
width = 20

sr = torch.randn(batch_size, channels, height, width)
hr = torch.randn(batch_size, channels, height, width)

scale = 2
rgb_range = 255

ARGS = {
    "sr": sr,
    "hr": hr,
    "scale": scale,
    "rgb_range": rgb_range,
    "benchmark": False
}
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 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
calc_ssim Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LongguangWang/DASR/utility.py
code served (permissive licence) · get_code("351137eb5d75b2c1")
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 float64, ndim 0, 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 numpy as np
import cv2
import math

torch.manual_seed(0)

# Create small test tensors with shape (1, 3, 32, 32)
# This is (batch, channels, height, width) format
# The function expects to squeeze and transpose these

img1 = torch.rand(1, 3, 32, 32) * 255.0
img1 = img1.float().clamp(0, 255)

img2 = torch.rand(1, 3, 32, 32) * 255.0
img2 = img2.float().clamp(0, 255)

ARGS = {
    'img1': img1,
    'img2': img2,
    'scale': 2,
    'benchmark': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
default_conv Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/model/common.py
code served (permissive licence) · get_code("8b0e794d4d8f9b13")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Conv2d. 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)

ARGS = {
    'in_channels': 3,
    'out_channels': 5,
    'kernel_size': 3,
    'bias': True
}
Setup block drafted by
a language model, Claude Sonnet 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
isotropic_gaussian_kernel Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/utils/util.py
code served (permissive licence) · get_code("7ffe7c33005ae801")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 5) as a later run recorded it. 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, 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)

ARGS = {
    "batch": 2,
    "kernel_size": 5,
    "sigma": torch.tensor([1.0, 1.5])
}
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 Tensor, ndim 3, dtype family float, shape (2, 5, 5) — shape (2, 5, 5) 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
quantize Ran
ran; our contract draft was wrong, not the code
LongguangWang/DASR/utility.py
pointer only (licence: MIT); the stored copy get_code serves, from cidanshi/nitedr-nighttime-image-de-raining, is pointer only (licence: NONE) · get_code("b1c1acd3c89a39f3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from cidanshi/nitedr-nighttime-image-de-raining, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

concat_all_gather Not yet run
unverified (harvested, no recorded run)
LongguangWang/DASR/moco/builder.py
code served (permissive licence) · get_code("73cecca9f3575f09")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 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.

FunctionAlso present inEarliest-datedOthers named
concat_all_gather 138 other papers
16 dated earlier, 2 the same month, 118 later, 2 same year, order not determinable · 33 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 135 more not named here
default_conv 57 other papers
11 dated earlier, 46 later · 2 only as an assembly brick
1707.02921 (2017-07)
Enhanced Deep Residual Networks for Single Image Super-Resolution
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
and 54 more not named here
quantize 12 other papers
7 dated earlier, 4 later, 1 same year, order not determinable
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
1803.04626 (2018-03)
Maintaining Natural Image Statistics with the Contextual Loss
1806.07366 (2018-06)
Neural Ordinary Differential Equations
and 9 more not named here

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

are developed based on an assumption that the degradation is fixed and known (e.g., bicubic downsampling). However, these methods suffer a severe performance drop when the real degradation is different from their assumption. To handle various unknown degradations in real-world applications, previous methods rely on degradation estimation to reconstruct the SR image. Nevertheless, degradation estimation methods are usually time-consuming and may lead to SR failure due to large estimation errors. In this paper, we propose an unsupervised degradation representation learning scheme for blind SR without explicit degradation estimation. Specifically, we learn abstract representations to distinguish various degradations in the representation space rather than explicit estimation in the pixel space. Moreover, we introduce a Degradation-Aware SR (DASR) network with flexible adaption to various degradations based on the learned representations. It is demonstrated that our degradation representation learning scheme can extract discriminative representations to obtain accurate degradation information. Experiments on both synthetic and real images show that our network achieves state-ofthe-art performance for the blind SR task. Code is available at: https://github.com/LongguangWang/ DASR.

For agents

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

get_harvested_code_for_paper("2104.00416")
get_code_for_paper("2104.00416")
have("2104.00416")

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

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

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

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

Connect an agent — have() is free.