SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.12653 · September 2026

SWARM: A Multilingual Human-Annotated Dataset for Russian Propaganda Detection in Search Engine Results

Manuel Tonneau, Elizaveta Kuznetsova, Ilaria Vitulano, Mykola Makhortykh, Martha Stolze, Abhinav Dubey, Farhan Shaikh, Hale Dedeoglu, Clara Riechert, Ella Kuka, Maryna Sydorova

arXiv · PDF · Open in the Atlas

Code that ran

22 of 26 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 19 failures of our instrument; 4 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/2609.12653.json · badge: /api/ran/2609.12653.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
manueltonneau/swarm canonical (classifier label)
classifier basis: census
22 ran · 4 no recorded run
FunctionStatusWhere it lives
boot_ci Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/merge_results.py
code served (permissive licence) · get_code("fadac26e748d1560")
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 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 numpy as np

# y: array of true labels/values
# p: array of predictions/probabilities
# fn: function that takes (y_resampled, p_resampled) and returns a scalar metric
# B: number of bootstrap iterations (default 2000)
# seed: random seed (default 42)

# Define a simple metric function that takes two arrays and returns a scalar
def metric_fn(y_true, y_pred):
    """Simple accuracy-like metric: mean squared error."""
    return float(np.mean((y_true - y_pred) ** 2))

# Create small sample data
np.random.seed(0)
y_data = np.array([0, 1, 1, 0, 1, 0, 1, 1])
p_data = np.array([0.1, 0.9, 0.8, 0.2, 0.85, 0.15, 0.95, 0.88])

ARGS = {
    'y': y_data,
    'p': p_data,
    'fn': metric_fn,
    'B': 100,
    'seed': 42
}
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 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
content_hash Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_eval_9lang.py
code served (permissive licence) · get_code("815c86272550ffe1")
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 str. 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 hashlib

def content_hash(question: str, art_trunc: str) -> str:
    h = hashlib.sha1()
    h.update(str(question).encode('utf-8'))
    h.update(b'\x1f')
    h.update(str(art_trunc).encode('utf-8'))
    return h.hexdigest()

ARGS = {
    "question": "What is the capital of France?",
    "art_trunc": "Paris is the capital and largest city of France."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
content_hash Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/prepare_from_hf.py
code served (permissive licence) · get_code("4988bcffc3b2d2a9")
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 str. 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 hashlib

ARGS = {
    "question": "What is the capital of France?",
    "text": "Paris is the capital and most populous city of France."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
domains_from_csv Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_domain_blocklist.py
code served (permissive licence) · get_code("4f1be0f3f0d860a9")
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 set. 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 tempfile
from pathlib import Path
import pandas as pd

# Create a temporary CSV file with domain data
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test_domains.csv"

# Create a sample CSV with a 'clean_domain' column
df = pd.DataFrame({
    'clean_domain': [
        'https://www.google.com',
        'example.co.uk',
        'https://m.github.org.uk/path',
        'amazon.com',
        'invalid',
        None,
        'bbc.co.uk',
        'amp.twitter.com'
    ]
})
df.to_csv(temp_path, index=False)

ARGS = {
    'path': temp_path
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
domains_from_txt Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_domain_blocklist.py
code served (permissive licence) · get_code("d9c39d69f267f6fc")
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 set. 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.

from pathlib import Path
import tempfile
import os

# Create a temporary directory and file with sample domain data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "domains.txt")

# Write sample domain data to the temporary file
sample_domains = """https://www.google.com
github.com
m.wikipedia.org
https://example.co.uk
test.org.au
amp.techsite.com
invalid
http://user:pass@example.com:8080/path
example.co.nz
www.github.org.uk
"""

with open(temp_file, 'w') as f:
    f.write(sample_domains)

# Create the Path object
path_arg = Path(temp_file)

ARGS = {
    'path': path_arg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
f2 Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_result_tables.py
code served (permissive licence) · get_code("3231aa148daa512a")
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 str. 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

def f2(x):
    return f'{x:.2f}'

ARGS = {
    'x': 3.14159
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
flagged_domains Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/blocklist_metrics.py
code served (permissive licence) · get_code("a150c294f307b2a3")
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 set. 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.

from pathlib import Path
import pandas as pd
import tempfile
import os

# Create a temporary directory structure to simulate the expected layout
temp_dir = tempfile.mkdtemp()
root = Path(temp_dir)
aux_dir = root / 'data_aux'
aux_dir.mkdir(exist_ok=True)

# Create the Russian propaganda Wikipedia CSV file
prop_wiki_path = aux_dir / 'russian_prop_wiki.csv'
prop_wiki_df = pd.DataFrame({
    'Domain': ['example.ru', 'propaganda.ru', 'test.com'],
    'clean_domain': ['example.ru', 'propaganda.ru', 'test.com']
})
prop_wiki_df.to_csv(prop_wiki_path, index=False)

# Create a test bundle path (can exist or not, we'll test both scenarios)
bundle_path = root / 'test_bundle.csv'

# For this test, we'll create the bundle so the function uses it
bundle_df = pd.DataFrame({
    'domain': ['blocked1.ru', 'blocked2.ru', 'blocked3.com']
})
bundle_df.to_csv(bundle_path, index=False)

# Mock the reg_domain function if needed (the function calls it)
def reg_domain(v):
    """Simple mock that just returns the string as-is"""
    return str(v)

# Inject it into the module namespace where flagged_domains expects it
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'reg_domain', reg_domain)

# Prepare arguments
ARGS = {
    'bundle': bundle_path
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
krippendorff_alpha_nominal Ran
ran, honoured the contract we drafted
manueltonneau/swarm/swarm/final_stats.py
code served (permissive licence) · get_code("96ebf04bef09761f")
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 numpy as np

ARGS = {
    "units": [
        ["A", "B", "A"],
        ["B", "C", "B"],
        ["A", "A", "C"],
        ["C", "B"],
    ]
}
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 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
load Ran
ran, honoured the contract we drafted
manueltonneau/swarm/swarm/prepare_from_hf.py
code served (permissive licence) · get_code("a53472422cd68156")
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 tempfile
from pathlib import Path
import pandas as pd
import os

# Create a temporary directory with parquet files for testing
tmpdir = tempfile.mkdtemp()
tmppath = Path(tmpdir)

# Create some sample DataFrames and save as parquet files
df1 = pd.DataFrame({'a': [1, 2], 'b': [3, 4]})
df2 = pd.DataFrame({'a': [5, 6], 'b': [7, 8]})

parquet_file_1 = tmppath / "file1.parquet"
parquet_file_2 = tmppath / "file2.parquet"

df1.to_parquet(parquet_file_1)
df2.to_parquet(parquet_file_2)

ARGS = {
    'src': tmppath
}
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 int 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
load_export Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_eval_9lang.py
code served (permissive licence) · get_code("a7ccef223981ccf7")
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 tempfile
from pathlib import Path
import pandas as pd

# Create a temporary CSV file with the required columns
with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) as f:
    temp_path = f.name
    # Write CSV with some of the EXPORT_COLS
    f.write('original_id,label,annotator,source_language,text\n')
    f.write('1,positive,alice,en,hello world\n')
    f.write('2,negative,bob,fr,bonjour\n')

temp_file_path = Path(temp_path)

ARGS = {
    'path': temp_file_path,
    'source': 'additional'
}
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
load_reuse Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/run_closed_llm.py
code served (permissive licence) · get_code("b0300204a213b08f")
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 dict. 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
import tempfile
import os

# Create temporary parquet files with the required columns
temp_dir = tempfile.mkdtemp()

# Create first parquet file with content_hash
df1 = pd.DataFrame({
    'content_hash': ['abc123def456', 'xyz789uvw012'],
    'question': ['What is AI?', 'How does ML work?'],
    'art_trunc': ['Article 1 text', 'Article 2 text'],
    'raw_pred': ['pred_value_1', 'pred_value_2']
})
parquet_path_1 = os.path.join(temp_dir, 'predictions_1.parquet')
df1.to_parquet(parquet_path_1)

# Create second parquet file without content_hash (will be computed)
df2 = pd.DataFrame({
    'question': ['What is DL?', 'What is NLP?'],
    'art_trunc': ['Article 3 text', 'Article 4 text'],
    'raw_pred': ['pred_value_3', 'pred_value_4']
})
parquet_path_2 = os.path.join(temp_dir, 'predictions_2.parquet')
df2.to_parquet(parquet_path_2)

# Create third parquet file without raw_pred column (should be skipped)
df3 = pd.DataFrame({
    'question': ['Question 5', 'Question 6'],
    'art_trunc': ['Article 5', 'Article 6'],
    'other_col': ['val1', 'val2']
})
parquet_path_3 = os.path.join(temp_dir, 'predictions_3.parquet')
df3.to_parquet(parquet_path_3)

ARGS = {
    'paths': [parquet_path_1, parquet_path_2, parquet_path_3]
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
majority Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
manueltonneau/swarm/swarm/build_eval_9lang.py
code served (permissive licence) · get_code("40c7f3ce3df6af70")
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 torch

torch.manual_seed(0)

# The function takes a single parameter 'labels' which should be a list
# It iterates through labels, filters for values that are 0 or 1,
# counts them, and returns the majority or None
# So we need to provide a list containing 0s, 1s, and possibly other values

labels = [0, 1, 1, 2, 3, 1, 0]

ARGS = {
    "labels": labels
}
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 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
make_prompt Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/common.py
code served (permissive licence) · get_code("0e6a0cd98d63ca44")
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 str. 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

torch.manual_seed(0)

ARGS = {
    'question': 'Russia is a defender of traditional values',
    'art_trunc': 'Russia has high abortion rates and high divorce rates. The anti-gay campaign is politically motivated rather than based on genuine traditional values.'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
markers Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/retrieval_bias.py
code served (permissive licence) · get_code("dd8a9d230b8f0856")
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 dict. 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

# Create a small pandas Series with some test data
rd = pd.Series(['example.com', 'test.ru', 'site.org', 'domain.ru', 'page.com'])

# Create a set of domains to check against blocklist
block = {'test.ru', 'domain.ru'}

ARGS = {
    'rd': rd,
    'block': block
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
metrics_row Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
manueltonneau/swarm/swarm/merge_results.py
code served (permissive licence) · get_code("fb1c5b9403b40d0c")
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 dict. 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

# Construct valid arguments for metrics_row function
# The function takes y (ground truth labels) and p (predictions)
# Both should be array-like with binary/multiclass labels

y = np.array([0, 1, 1, 0, 1, 0, 1, 1])
p = np.array([0, 1, 1, 0, 0, 0, 1, 1])

ARGS = {
    'y': y,
    'p': p
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
metrics_table Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/common.py
code served (permissive licence) · get_code("d5ec9671fc9ce337")
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 numpy as np
import pandas as pd

# Create sample data for metrics_table
np.random.seed(42)

# Generate a small dataframe with predictions, gold labels, and languages
n_samples = 20
df = pd.DataFrame({
    'pred': np.random.randint(0, 2, n_samples),
    'final': np.random.randint(0, 2, n_samples),
    'lang': np.random.choice(['en', 'fr', 'de'], n_samples)
})

ARGS = {
    'df': df,
    'pred_col': 'pred',
    'gold_col': 'final',
    'lang_col': 'lang'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
poll_batch Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/batch_utils.py
code served (permissive licence) · get_code("b3f18e7884accb9c")
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 Mock. 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 sys
import time
from unittest.mock import Mock, MagicMock

# Create a mock client with batches.retrieve method
client = Mock()

# Create a mock batch object that will be returned
mock_batch = Mock()
mock_batch.status = 'completed'
mock_batch.request_counts = Mock()
mock_batch.request_counts.completed = 10
mock_batch.request_counts.failed = 0
mock_batch.request_counts.total = 10

# Set up the client to return our mock batch
client.batches.retrieve = Mock(return_value=mock_batch)

# Create batch_id
batch_id = "batch_12345"

ARGS = {
    'client': client,
    'batch_id': batch_id,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mock — a Mock 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
posf1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
manueltonneau/swarm/swarm/merge_results.py
code served (permissive licence) · get_code("60155778c76b4447")
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 numpy as np
from sklearn.metrics import accuracy_score, balanced_accuracy_score, cohen_kappa_score, f1_score, matthews_corrcoef, precision_score, recall_score

def posf1(y, p):
    return f1_score(y, p, pos_label=1, zero_division=0)

# Create valid arguments for posf1
# y: true labels (array-like of binary labels)
# p: predicted labels (array-like of binary labels)

y_true = np.array([0, 1, 1, 0, 1, 0])
y_pred = np.array([0, 1, 0, 0, 1, 1])

ARGS = {
    'y': y_true,
    'p': y_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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
recall_by_language Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/blocklist_metrics.py
code served (permissive licence) · get_code("c5d5be70668b8eef")
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 numpy as np

# Create a minimal DataFrame that satisfies the function's requirements
df = pd.DataFrame({
    'lang': ['en', 'en', 'fr', 'fr', 'de', 'de'],
    'final': [1, 0, 1, 1, 0, 1],
    'distant_domain': [1, 0, 1, 0, 1, 1],
    'category': [
        'news outlet',
        'official government/state',
        'wikipedia',
        'fact-checker',
        'blog',
        'news outlet'
    ]
})

ARGS = {
    'df': df,
    'cat_path': None  # Will use default DOMAIN_CATS, but we pass None to avoid file I/O
}
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 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
reg_domain Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/build_domain_blocklist.py
code served (permissive licence) · get_code("bbc94639a23fe1b2")
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 str. 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 numpy as np
from urllib.parse import urlparse

torch.manual_seed(0)

ARGS = {
    'value': 'https://www.example.co.uk/path'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
to_eval_frame Ran
ran; our contract draft was wrong, not the code
manueltonneau/swarm/swarm/prepare_from_hf.py
code served (permissive licence) · get_code("0a0c1cb1a66fd5f6")
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 numpy as np

# Create a small valid DataFrame with all required columns
data = {
    'id': [1, 2],
    'lang': ['en', 'fr'],
    'narrative_question': ['What is this?', 'Qu\'est-ce que c\'est?'],
    'text_content': ['This is a document about something.', 'Ceci est un document sur quelque chose.'],
    'label': [1.0, 0.0]
}

df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'text_col': 'text_content'
}
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 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
to_label Ran
ran, honoured the contract we drafted
manueltonneau/swarm/swarm/common.py
code served (permissive licence) · get_code("c6683bd1c93b7851")
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 torch

torch.manual_seed(0)

ARGS = {
    "text": "0hello"
}
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 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
api_call_with_retry Not yet run
unverified (harvested, no recorded run)
manueltonneau/swarm/swarm/batch_utils.py
code served (permissive licence) · get_code("e2e65789eaa180d8")
How it ran

no invocation recorded.

per_lang Not yet run
unverified (harvested, no recorded run)
manueltonneau/swarm/swarm/build_result_tables.py
code served (permissive licence) · get_code("409d425b97e5430c")
How it ran

no invocation recorded.

report Not yet run
unverified (harvested, no recorded run)
manueltonneau/swarm/swarm/blocklist_metrics.py
code served (permissive licence) · get_code("f29cc9f24a9eb995")
How it ran

no invocation recorded.

submit_batch Not yet run
unverified (harvested, no recorded run)
manueltonneau/swarm/swarm/batch_utils.py
code served (permissive licence) · get_code("a75f0c9e553a5087")
How it ran

no invocation recorded.

Also present in other papers' code

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

Russian state propaganda spreads across many languages and online spaces. Yet, most computational work examines only one such space, usually social media, in one or two languages, and analyses sources rather than content. We introduce SWARM (Search-Web documents Annotated for Russian propaganda, Multilingual), a dataset of 2,183 search engine results across nine languages and diverse web domains (e.g., news, blogs, government sites), each annotated by trained coders for whether it supports a recurring Russian propaganda narrative. We benchmark a source-based blocklist, supervised classifiers, and zero-shot LLMs against these labels. The blocklist misses most propaganda-supporting documents, because such content is not confined to flagged "propaganda" outlets but also appears on mainstream ones. Content-level analysis helps, though how much depends on the model: the strongest LLM reaches a positive-class F1 of 0.73, whereas the supervised classifiers reach only about 0.5, with the smaller LLMs over-predicting support, mistaking topical relevance for endorsement. Detecting search-borne propaganda thus requires per-language, content-level evaluation, which we hope SWARM and our evaluation code enable.

For agents

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

get_harvested_code_for_paper("2609.12653")
get_code_for_paper("2609.12653")
have("2609.12653")

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

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

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

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

Connect an agent — have() is free.