SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.02005 · 2019

Mining for Dark Matter Substructure: Inferring subhalo population properties from strong lenses with machine learning

arXiv · PDF · Open in the Atlas

Code that ran

8 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 6 have no contract verdict; 2 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/1909.02005.json · badge: /api/ran/1909.02005.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
smsharma/mining-for-substructure-lens canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
smsharma/mining-for-substructure-lens/inference/models/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
smsharma/mining-for-substructure-lens/inference/models/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

get_activation_function Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/utils.py
code served (permissive licence) · get_code("e5bf3661ec3f3bb9")
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 ReLU. 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
from torch import nn, optim

torch.manual_seed(0)

# The function get_activation_function takes a single parameter 'activation'
# which is a string that determines which activation function to return.
# Valid options are 'relu', 'tanh', and 'sigmoid'.

ARGS = {
    'activation': 'relu'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
mse_r Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/losses.py
code served (permissive licence) · get_code("ff44f8c48bb976eb")
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 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
from torch.nn import BCELoss, MSELoss

torch.manual_seed(0)

# Create small tensors for the function parameters
batch_size = 2
dim = 4

# s_hat: prediction tensor (not used in the function, but required as parameter)
s_hat = torch.randn(batch_size, dim)

# log_r_hat: log of predicted rates
log_r_hat = torch.randn(batch_size, dim)

# t_hat: predicted times (not used in the function, but required as parameter)
t_hat = torch.randn(batch_size, dim)

# y: binary labels (0 or 1)
y = torch.randint(0, 2, (batch_size, dim)).float()

# log_r: log of true rates
log_r = torch.randn(batch_size, dim)

# t: true times (not used in the function, but required as parameter)
t = torch.randn(batch_size, dim)

ARGS = {
    "s_hat": s_hat,
    "log_r_hat": log_r_hat,
    "t_hat": t_hat,
    "y": y,
    "log_r": log_r,
    "t": t,
}
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 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
mse_r0 Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/losses.py
code served (permissive licence) · get_code("26d1b0f66f1cdc8b")
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 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
from torch.nn import BCELoss, MSELoss

torch.manual_seed(0)

# Create small tensors with batch size 2
batch_size = 2
dim = 4

# s_hat: predictions for s, shape (batch_size, dim)
s_hat = torch.randn(batch_size, dim)

# log_r_hat: log of predicted r, shape (batch_size,)
log_r_hat = torch.randn(batch_size)

# t_hat: predictions for t, shape (batch_size, dim)
t_hat = torch.randn(batch_size, dim)

# y: binary labels, shape (batch_size,)
y = torch.randint(0, 2, (batch_size,)).float()

# log_r: log of true r, shape (batch_size,)
log_r = torch.randn(batch_size)

# t: true t values, shape (batch_size, dim)
t = torch.randn(batch_size, dim)

ARGS = {
    "s_hat": s_hat,
    "log_r_hat": log_r_hat,
    "t_hat": t_hat,
    "y": y,
    "log_r": log_r,
    "t": t,
}
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 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
mse_r1 Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/losses.py
code served (permissive licence) · get_code("f519b6028e48fe72")
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 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
from torch.nn import BCELoss, MSELoss

torch.manual_seed(0)

# Create small tensors for the function parameters
batch_size = 2
dim = 4

# s_hat: appears unused in function body, but create a tensor for it
s_hat = torch.randn(batch_size, dim)

# log_r_hat: used in torch.exp(), should be a tensor
log_r_hat = torch.randn(batch_size, dim)

# t_hat: appears unused in function body, but create a tensor for it
t_hat = torch.randn(batch_size, dim)

# y: used in multiplication with r_hat, should be a tensor
y = torch.randn(batch_size, dim)

# log_r: used in torch.exp(), should be a tensor
log_r = torch.randn(batch_size, dim)

# t: appears unused in function body, but create a tensor for it
t = torch.randn(batch_size, dim)

ARGS = {
    's_hat': s_hat,
    'log_r_hat': log_r_hat,
    't_hat': t_hat,
    'y': y,
    'log_r': log_r,
    't': t
}
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 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
r_from_s Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/utils.py
code served (permissive licence) · get_code("4eb498faf4ae75d6")
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 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 numpy as np

# The function r_from_s takes a parameter 's' and an optional 'epsilon' parameter
# s should be a numpy array or scalar that the function can perform arithmetic on
# The function clips the result between epsilon and None (no upper bound)

# Create a small numpy array for 's'
s_value = np.array([0.1, 0.5, 0.9, 0.3])

ARGS = {
    "s": s_value,
    "epsilon": 1e-06
}
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 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
s_from_r Ran
ran on a synthesized input
smsharma/mining-for-substructure-lens/inference/utils.py
code served (permissive licence) · get_code("c8e591b536d40760")
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 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 numpy as np

# Analyze the function:
# s_from_r(r) takes a parameter 'r' and applies:
# 1. Computes 1.0 / (1.0 + r)
# 2. Clips the result to [0.0, 1.0]
# So 'r' should be a numeric value or array that supports these operations

# Create a valid argument for 'r'
# It can be a scalar, list, or numpy array
r_value = np.array([0.5, 2.0, -0.5, 10.0])

ARGS = {
    "r": r_value
}
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 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

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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 6 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
conv3x3 686 other papers
154 dated earlier, 8 the same month, 524 later · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
44 dated earlier, 1 the same month, 385 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 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

The subtle and unique imprint of dark matter substructure on extended arcs in strong lensing systems contains a wealth of information about the properties and distribution of dark matter on small scales and, consequently, about the underlying particle physics. However, teasing out this effect poses a significant challenge since the likelihood function for realistic simulations of population-level parameters is intractable. We apply recently-developed simulation-based inference techniques to the problem of substructure inference in galaxy-galaxy strong lenses. By leveraging additional information extracted from the simulator, neural networks are efficiently trained to estimate likelihood ratios associated with population-level parameters characterizing substructure. Through proof-of-principle application to simulated data, we show that these methods can provide an efficient and principled way to simultaneously analyze an ensemble of strong lenses, and can be used to mine the large sample of lensing images deliverable by near-future surveys for signatures of dark matter substructure.

For agents

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

get_harvested_code_for_paper("1909.02005")
get_code_for_paper("1909.02005")
have("1909.02005")

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

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

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

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

Connect an agent — have() is free.