SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.07641 · 2020

Quantifying the Effects of Contact Tracing, Testing, and Containment Measures in the Presence of Infection Hotspots

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 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 4 have no contract verdict; 0 failures of our instrument; 5 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/2004.07641.json · badge: /api/ran/2004.07641.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
covid19-model/simulator canonical (classifier label)
classifier basis: census
1 ran · 4 no recorded run
j-groeneveld/covid community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
FunctionStatusWhere it lives
create_ParallelSummary_from_DiseaseModel Ran
ran on a synthesized input
j-groeneveld/covid/sim/lib/parallel.py
code served (permissive licence) · get_code("8bc6f7220e683c94")
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 ParallelSummary. 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 numpy as np

class MockMobility:
    def __init__(self, n_people, n_sites):
        self.num_sites = n_sites
        self.n_people = n_people
        self.site_loc = np.array([[0.0, 0.0], [1.0, 1.0], [2.0, 2.0]])
        self.home_loc = np.array([[0.1, 0.1], [1.1, 1.1], [2.1, 2.1], [0.5, 0.5]])
        self.people_age = np.array([25, 30, 45, 60], dtype='int')

class MockDiseaseModel:
    def __init__(self):
        self.max_time = 100
        self.n_people = 4
        self.dynamic_tracing = True
        
        # Create mobility object
        self.mob = MockMobility(self.n_people, 3)
        
        # Initialize state dictionaries
        self.state = {
            'susc': np.ones(self.n_people, dtype='bool'),
            'expo': np.zeros(self.n_people, dtype='bool'),
            'ipre': np.zeros(self.n_people, dtype='bool'),
            'isym': np.zeros(self.n_people, dtype='bool'),
            'iasy': np.zeros(self.n_people, dtype='bool'),
            'posi': np.zeros(self.n_people, dtype='bool'),
            'nega': np.zeros(self.n_people, dtype='bool'),
            'resi': np.zeros(self.n_people, dtype='bool'),
            'dead': np.zeros(self.n_people, dtype='bool'),
            'hosp': np.zeros(self.n_people, dtype='bool'),
        }
        
        self.state_started_at = {
            'susc': -np.inf * np.ones(self.n_people, dtype='float'),
            'expo': np.inf * np.ones(self.n_people, dtype='float'),
            'ipre': np.inf * np.ones(self.n_people, dtype='float'),
            'isym': np.inf * np.ones(self.n_people, dtype='float'),
            'iasy': np.inf * np.ones(self.n_people, dtype='float'),
            'posi': np.inf * np.ones(self.n_people, dtype='float'),
            'nega': np.inf * np.ones(self.n_people, dtype='float'),
            'resi': np.inf * np.ones(self.n_people, dtype='float'),
            'dead': np.inf * np.ones(self.n_people, dtype='float'),
            'hosp': np.inf * np.ones(self.n_people, dtype='float'),
        }
        
        self.state_ended_at = {
            'susc': np.inf * np.ones(self.n_people, dtype='float'),
            'expo': np.inf * np.ones(self.n_people, dtype='float'),
            'ipre': np.inf * np.ones(self.n_people, dtype='float'),
            'isym': np.inf * np.ones(self.n_people, dtype='float'),
            'iasy': np.inf * np.ones(self.n_people, dtype='float'),
            'posi': np.inf * np.ones(self.n_people, dtype='float'),
            'nega': np.inf * np.ones(self.n_people, dtype='float'),
            'resi': np.inf * np.ones(self.n_people, dtype='float'),
            'dead': np.inf * np.ones(self.n_people, dtype='float'),
            'hosp': np.inf * np.ones(self.n_people, dtype='float'),
        }
        
        self.measure_list = [{'measure': 'lockdown', 'time': 10}]
        self.children_count_iasy = np.array([0, 1, 2, 0], dtype='int')
        self.children_count_ipre = np.array([1, 0, 1, 2], dtype='int')
        self.children_count_isym = np.array([0, 0, 1, 0], dtype='int')

sim = MockDiseaseModel()

ARGS = {
    'sim': sim
}
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 ParallelSummary — a ParallelSummary output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ParallelSummary 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
days_to_datetime Ran
ran on a synthesized input
j-groeneveld/covid/sim/lib/plot.py
code served (permissive licence) · get_code("86d2dbef3e59ef88")
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 DatetimeIndex. 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 pandas as pd
import numpy as np

# The function takes:
# 1. arr: a numeric array that gets multiplied by 24*60*60 (days to seconds conversion)
# 2. start_date: a date string that pd.Timestamp can parse

# Create a small array of day values
arr = np.array([0, 1, 2, 3], dtype=np.float64)

# Create a valid start date string
start_date = "2024-01-01"

ARGS = {
    "arr": arr,
    "start_date": start_date
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DatetimeIndex — a DatetimeIndex output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatetimeIndex output the recorded ndim 1 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
get_preprocessed_data_germany Ran
ran on a synthesized input
j-groeneveld/covid/sim/lib/data.py
code served (permissive licence) · get_code("79bb658971a9d8d4")
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 DataFrame. 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 pandas as pd
import os
import tempfile

# Create a temporary directory and CSV file for testing
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, 'RKI_COVID19.csv')

# Create sample data that matches the expected structure
sample_data = {
    'Datenstand': ['2020-03-15'] * 10,
    'IdLandkreis': [9263] * 10,
    'Refdatum': ['2020-03-14'] * 10,
    'Landkreis': ['LK Tübingen'] * 10,
    'IdBundesland': [8] * 10,
    'Bundesland': ['Baden-Württemberg'] * 10,
    'Geschlecht': ['M', 'W'] * 5,
    'Altersgruppe': ['A00-A04', 'A05-A14', 'A15-A34', 'A35-A59', 'A60-A79', 'A80+', 'A00-A04', 'A05-A14', 'A15-A34', 'A35-A59'],
    'Meldedatum': ['2020-03-10', '2020-03-11', '2020-03-12', '2020-03-13', '2020-03-14', '2020-03-15', '2020-03-16', '2020-03-17', '2020-03-18', '2020-03-19'],
    'NeuerFall': [1, 1, 1, 1, 1, 0, 1, 1, 1, 1],
    'NeuerTodesfall': [0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
}

df_sample = pd.DataFrame(sample_data)
df_sample.to_csv(csv_path, index=False)

# Monkey-patch the path in the module to use our temp file
import sys
from unittest.mock import patch

# We need to ensure the function reads from our temp path
# Create the directory structure expected by the function
lib_data_cases = os.path.join(temp_dir, 'lib', 'data', 'cases')
os.makedirs(lib_data_cases, exist_ok=True)
actual_csv_path = os.path.join(lib_data_cases, 'RKI_COVID19.csv')
df_sample.to_csv(actual_csv_path, index=False)

# Change working directory temporarily or mock the read
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'landkreis': 'LK Tübingen',
    'start_date_string': '2020-03-10',
    'until': 10,
    'end_date_string': '2020-03-19'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
initialize_q_batch Ran
ran on a synthesized input
covid19-model/simulator/sim/lib/kg.py
code served (permissive licence) · get_code("3ac747670be2d60d")
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 (1, 3, 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
import warnings
from botorch.exceptions import BadInitialCandidatesWarning

torch.manual_seed(0)

# Create small test tensors
# X: b x q x d tensor
# b=2 (batch size), q=3 (q-batch size), d=4 (feature dimension)
X = torch.rand(2, 3, 4)

# Y: b tensor of acquisition function values
Y = torch.tensor([0.5, 1.5])

# n: number of initial conditions to generate (must be < b)
n = 1

# eta: temperature parameter
eta = 1.0

ARGS = {
    "X": X,
    "Y": Y,
    "n": n,
    "eta": eta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
botorch, 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 (1, 3, 4) — shape (1, 3, 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
get_mobility_reduction Not yet run
unverified (harvested, no recorded run)
covid19-model/simulator/sim/lib/mobility_reduction.py
code served (permissive licence) · get_code("b67f139be49a79d5")
How it ran

no invocation recorded.

get_preprocessed_data_germany Not yet run
unverified (harvested, no recorded run)
covid19-model/simulator/sim/lib/data.py
code served (permissive licence) · get_code("ade86c6a316487b8")
How it ran

no invocation recorded.

get_preprocessed_data_switzerland Not yet run
unverified (harvested, no recorded run)
covid19-model/simulator/sim/lib/data.py
code served (permissive licence) · get_code("adac5df960188505")
How it ran

no invocation recorded.

get_preprocessed_data_switzerland Not yet run
unverified (harvested, no recorded run)
j-groeneveld/covid/sim/lib/data.py
code served (permissive licence) · get_code("33c0e521d5ae8d09")
How it ran

no invocation recorded.

get_properties Not yet run
unverified (harvested, no recorded run)
covid19-model/simulator/sim/lib/experiment.py
code served (permissive licence) · get_code("9ab6c0971409903a")
How it ran

no invocation recorded.

Also present in other papers' code

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

Multiple lines of evidence strongly suggest that infection hotspots, where a single individual infects many others, play a key role in the transmission dynamics of COVID-19. However, most of the existing epidemiological models fail to capture this aspect by neither representing the sites visited by individuals explicitly nor characterizing disease transmission as a function of individual mobility patterns. In this work, we introduce a temporal point process modeling framework that specifically represents visits to the sites where individuals get in contact and infect each other. Under our model, the number of infections caused by an infectious individual naturally emerges to be overdispersed. Using an efficient sampling algorithm, we demonstrate how to estimate the transmission rate of infectious individuals at the sites they visit and in their households using Bayesian optimization and longitudinal case data. Simulations using fine-grained and publicly available demographic data and site locations from Bern, Switzerland showcase the flexibility of our framework. To facilitate research and analyses of other cities and regions, we release an open-source implementation of our framework.

For agents

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

get_harvested_code_for_paper("2004.07641")
get_code_for_paper("2004.07641")
have("2004.07641")

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

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

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

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

Connect an agent — have() is free.