SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1701.03077 · 2017

A General and Adaptive Robust Loss Function

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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 8 have no contract verdict; 3 failures of our instrument; 0 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/1701.03077.json · badge: /api/ran/1701.03077.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
jonbarron/robust_loss_pytorch community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
andrewlstewart/StereoNet_PyTorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
analytical_base_partition_function Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/distribution.py
code served (permissive licence) · get_code("5c530a281cae6ed6")
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 numbers
import mpmath
import numpy as np

# The function takes two parameters: numer and denom
# Both should be integers representing a rational number alpha = numer/denom
# numer >= 0, denom > 0

ARGS = {
    'numer': 1,
    'denom': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
mpmath, numpy — 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
compute_volume Ran
ran; our contract draft was wrong, not the code
andrewlstewart/StereoNet_PyTorch/src/stereonet/model.py
code served (permissive licence) · get_code("4caa20778e7219ba")
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 Tensor, ndim 5, dtype family float, shape (2, 4, 3, 6, 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

torch.manual_seed(0)

batch = 2
channel = 4
height = 6
width = 8
max_downsampled_disps = 3

reference_embedding = torch.randn(batch, channel, height, width)
target_embedding = torch.randn(batch, channel, height, width)

ARGS = {
    'reference_embedding': reference_embedding,
    'target_embedding': target_embedding,
    'max_downsampled_disps': max_downsampled_disps,
    'side': 'left'
}
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 Tensor, ndim 5, dtype family float, shape (2, 4, 3, 6, 8) — shape (2, 4, 3, 6, 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: none by the harness; any seed is in the setup block
exp_safe Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/util.py
code served (permissive licence) · get_code("73edfd84903106b2")
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 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)

# The function exp_safe takes a single parameter x which is converted to a tensor
# and then torch.exp is applied to it with clamping to prevent overflow.
# We need to provide a valid input that can be converted to a tensor.

# Create a small tensor as input
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
generate_filters Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/wavelet.py
code served (permissive licence) · get_code("514aafa97b8410cf")
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 Filters. 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 collections
import numpy as np

Filters = collections.namedtuple('Filters', ['analysis_lo', 'analysis_hi', 'synthesis_lo', 'synthesis_hi'])
HalfFilters = collections.namedtuple('HalfFilters', ['lo', 'hi'])

def generate_filters(wavelet_type=None):
    """Generates the analysis and synthesis filters for a kind of wavelet.

  Currently only supports wavelet types where all filters have an odd length.
  TODO(barron): Generalize this to even filters as well, and support Haar and
  Debauchies wavelets.

  Args:
    wavelet_type: A string encoding the type of wavelet filters to return. This
      string is used as a key to the `supported_half_filters` dict in the code
      below, and so the string must be a valid key.

  Returns:
    If `wavelet_type` is not provided as input, this function returns a list of
    valid values for `wavelet_type`. If `wavelet_type` is a supported string,
    this function returns the wavelet type's `Filters` object.
  """
    supported_half_filters = {'CDF9/7': HalfFilters(lo=np.array([+0.852698679009, +0.377402855613, -0.110624404418, -0.02384946502, +0.037828455507]), hi=np.array([+0.788485616406, -0.418092273222, -0.040689417609, +0.064538882629])), 'LeGall5/3': HalfFilters(lo=np.array([0.75, 0.25, -0.125]) * np.sqrt(2.0), hi=np.array([1.0, -0.5]) / np.sqrt(2.0))}
    if wavelet_type is None:
        return list(supported_half_filters.keys())
    half_filters = supported_half_filters[wavelet_type]
    mirror = lambda f: np.concatenate([f[-1:0:-1], f])
    alternating_sign = lambda n: (-1) ** np.arange(n)
    analysis_lo = mirror(half_filters.lo)
    analysis_hi = mirror(half_filters.hi)
    synthesis_lo = analysis_hi * mirror(alternating_sign(len(half_filters.hi)))
    synthesis_hi = analysis_lo * mirror(alternating_sign(len(half_filters.lo)))
    return Filters(analysis_lo=analysis_lo, analysis_hi=analysis_hi, synthesis_lo=synthesis_lo, synthesis_hi=synthesis_hi)

ARGS = {
    'wavelet_type': 'CDF9/7'
}
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 Filters — a Filters 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
get_max_num_levels Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/wavelet.py
code served (permissive licence) · get_code("8c712984344bea6e")
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 int, ndim 0, dtype family int, 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 numpy as np

# The function expects sz to be a tuple of ints representing (batch, width, height)
# It accesses sz[1] and sz[2], so we need at least 3 elements
# Using distinct sizes: batch=2, width=64, height=48
sz = (2, 64, 48)

ARGS = {
    "sz": sz
}
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 int, ndim 0, dtype family int, 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
interpolate1d Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/cubic_spline.py
code served (permissive licence) · get_code("98d79f1edd61f3d8")
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 1, dtype family float, shape (5,) 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 small tensors for interpolation
# values: vector of knot values
values = torch.tensor([1.0, 2.0, 3.0, 4.0], dtype=torch.float32)

# tangents: vector of derivatives at each knot (same length as values)
tangents = torch.tensor([0.5, 0.3, -0.2, 0.1], dtype=torch.float32)

# x: query points for interpolation
# Mix of values: some in range [0, 3], some outside for extrapolation testing
x = torch.tensor([0.5, 1.5, 2.5, -0.5, 3.5], dtype=torch.float32)

ARGS = {
    "x": x,
    "values": values,
    "tangents": tangents,
}
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 1, dtype family float, shape (5,) — shape (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
log1p_safe Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/util.py
code served (permissive licence) · get_code("f647011be290b745")
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 1, dtype family float, shape (5,) 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)

# The function takes a single parameter 'x' which should be a tensor or tensor-like object
# It converts x to a tensor, clamps it, and applies log1p
# We'll create a small tensor with various values to test the clamping behavior

x = torch.tensor([0.1, -0.5, 1e38, -1e38, 0.0], dtype=torch.float32)

ARGS = {
    "x": x
}
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 1, dtype family float, shape (5,) — shape (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
log_safe Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/util.py
code served (permissive licence) · get_code("597871c4a40d74a5")
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 1, dtype family float, shape (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)

# The function log_safe takes a single parameter 'x' which should be a tensor-like object
# It converts x to a tensor, then applies torch.log while clamping to prevent NaNs
# We need to pass a valid input that can be converted to a tensor

# Create a small tensor with positive values (log requires positive inputs)
x = torch.tensor([0.1, 1.0, 2.5, 10.0])

ARGS = {
    "x": x
}
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 1, dtype family float, shape (4,) — shape (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
pad_reflecting Ran
ran on a synthesized input
jonbarron/robust_loss_pytorch/robust_loss_pytorch/wavelet.py
code served (permissive licence) · get_code("80863318ef18bec8")
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, 3, 9) 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 numpy as np

torch.manual_seed(0)

# Create a simple tensor to pad
# Use distinct dimensions: batch=2, channels=3, length=4
x = torch.randn(2, 3, 4)

# Padding parameters
padding_below = 2
padding_above = 3

# Axis along which to pad (0, 1, or 2)
axis = 2

ARGS = {
    "x": x,
    "padding_below": padding_below,
    "padding_above": padding_above,
    "axis": axis,
}
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 Tensor, ndim 3, dtype family float, shape (2, 3, 9) — shape (2, 3, 9) 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
robust_loss Ran
ran; our contract draft was wrong, not the code
andrewlstewart/StereoNet_PyTorch/src/stereonet/model.py
code served (permissive licence) · get_code("67e14f39a4f3d8e5")
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 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 tensor for x
x = torch.randn(2, 4)

# Set alpha parameter (must not be exactly 2 to avoid division by zero in abs(alpha - 2))
alpha = 1.5

# Set c parameter (scale parameter, should be positive)
c = 1.0

ARGS = {
    'x': x,
    'alpha': alpha,
    'c': c
}
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 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
soft_argmin Ran
ran; our contract draft was wrong, not the code
andrewlstewart/StereoNet_PyTorch/src/stereonet/model.py
code served (permissive licence) · get_code("81c9eec5240c5414")
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 Tensor, ndim 4, dtype family float, shape (2, 1, 4, 6) 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 a small cost tensor
# Shape: (batch_size, num_disparities, height, width)
batch_size = 2
num_disparities = 8
height = 4
width = 6

cost = torch.randn(batch_size, num_disparities, height, width)

# Maximum downsampled disparities
max_downsampled_disps = 12

ARGS = {
    'cost': cost,
    'max_downsampled_disps': max_downsampled_disps
}
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 Tensor, ndim 4, dtype family float, shape (2, 1, 4, 6) — shape (2, 1, 4, 6) 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 8 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
compute_volume 1 other paper
1 later
1807.08865 (2018-07)
StereoNet: Guided Hierarchical Refinement for Real-Time Edge-Aware Depth Prediction
robust_loss 1 other paper
1 later
1807.08865 (2018-07)
StereoNet: Guided Hierarchical Refinement for Real-Time Edge-Aware Depth Prediction
soft_argmin 1 other paper
1 later
1807.08865 (2018-07)
StereoNet: Guided Hierarchical Refinement for Real-Time Edge-Aware Depth Prediction

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

We present a generalization of the Cauchy/Lorentzian, Geman-McClure, Welsch/Leclerc, generalized Charbonnier, Charbonnier/pseudo-Huber/L1-L2, and L2 loss functions. By introducing robustness as a continuous parameter, our loss function allows algorithms built around robust loss minimization to be generalized, which improves performance on basic vision tasks such as registration and clustering. Interpreting our loss as the negative log of a univariate density yields a general probability distribution that includes normal and Cauchy distributions as special cases. This probabilistic interpretation enables the training of neural networks in which the robustness of the loss automatically adapts itself during training, which improves performance on learning-based tasks such as generative image synthesis and unsupervised monocular depth estimation, without requiring any manual parameter tuning.

For agents

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

get_harvested_code_for_paper("1701.03077")
get_code_for_paper("1701.03077")
have("1701.03077")

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

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

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

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

Connect an agent — have() is free.