SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.19335 · 2026

When Active Learning Falls Short: An Empirical Study on Chemical Reaction Extraction

Simin Yu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2604.19335.json · badge: /api/ran/2604.19335.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
jiangfeng1124/ChemRxnExtractor canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
allowed_transitions Ran
ran, honoured the contract we drafted
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/models/crf.py
code served (permissive licence) · get_code("64937a971ae2e55a")
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 list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Set random seed for reproducibility
torch.manual_seed(0)

# Build a small labels dictionary for testing
# The labels dictionary maps label_id -> label string
# Labels follow BIO/IOB1/BIOUL/BMES format with entity tags
labels = {
    0: "O",           # Outside
    1: "B-PER",       # Begin Person
    2: "I-PER",       # Inside Person
    3: "B-LOC",       # Begin Location
    4: "I-LOC",       # Inside Location
    5: "B-ORG",       # Begin Organization
    6: "I-ORG",       # Inside Organization
}

# Define ARGS with all required parameters for allowed_transitions
ARGS = {
    "constraint_type": "BIO",
    "labels": labels,
}
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 list, ndim 2, dtype family int — a list 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
create_logger Ran
ran; our contract draft was wrong, not the code
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/utils.py
code served (permissive licence) · get_code("643821dbec6ebc91")
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 Logger. 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 logging
import os
import tempfile

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

ARGS = {
    'name': 'test_logger',
    'save_dir': temp_dir
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
is_transition_allowed Ran
ran, violated the contract we drafted
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/models/crf.py
code served (permissive licence) · get_code("64a5e518828d6d67")
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 bool, 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.

# Valid setup for is_transition_allowed function

ARGS = {
    "constraint_type": "BIO",
    "from_tag": "B",
    "from_entity": "PER",
    "to_tag": "I",
    "to_entity": "PER"
}
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 bool, 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
logsumexp Ran
ran; our contract draft was wrong, not the code
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/models/utils.py
code served (permissive licence) · get_code("35b6de3a6dc2aecf")
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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with shape (2, 4)
# This is a reasonable size for testing logsumexp
tensor = torch.randn(2, 4, dtype=torch.float32)

# dim parameter - reduce over the last dimension
dim = -1

# keepdim parameter - don't keep the reduced dimension
keepdim = False

ARGS = {
    "tensor": tensor,
    "dim": dim,
    "keepdim": keepdim,
}
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 (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_predict_args Ran
ran; our contract draft was wrong, not the code
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/prod_args.py
code served (permissive licence) · get_code("9f0765c6238841b0")
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 tempfile
import os
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple

# Create temporary files for the function to use
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "input.txt")
output_file = os.path.join(temp_dir, "output.txt")
labels_file = os.path.join(temp_dir, "labels.txt")

# Write minimal content to input file
with open(input_file, 'w') as f:
    f.write("This is a test sentence\n")
    f.write("Another test sentence\n")

# Write minimal labels file
with open(labels_file, 'w') as f:
    f.write("O\n")
    f.write("B-PER\n")
    f.write("I-PER\n")

# Create args as a list of command line arguments
args = [
    "--model_name_or_path", "bert-base-uncased",
    "--input_file", input_file,
    "--output_file", output_file,
    "--labels", labels_file,
    "--max_seq_length", "128",
    "--batch_size", "8",
]

ARGS = {
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — 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
parse_predict_args Ran
ran; our contract draft was wrong, not the code
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/role_args.py
code served (permissive licence) · get_code("3b97e03d4a69870c")
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 os
import tempfile
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple

# Create temporary files for testing
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "input.txt")
output_file = os.path.join(temp_dir, "output.txt")
labels_file = os.path.join(temp_dir, "labels.txt")

# Write minimal test data
with open(input_file, 'w') as f:
    f.write("This is a test sentence .\n")
    f.write("Another test sentence .\n")

with open(labels_file, 'w') as f:
    f.write("O\n")
    f.write("B-PER\n")
    f.write("I-PER\n")
    f.write("B-ORG\n")
    f.write("I-ORG\n")

# Test with command-line style arguments list
args_list = [
    "--model_name_or_path", "bert-base-uncased",
    "--use_fast", "False",
    "--cache_dir", temp_dir,
    "--use_crf", "False",
    "--use_cls", "False",
    "--prod_pooler", "head",
    "--input_file", input_file,
    "--output_file", output_file,
    "--labels", labels_file,
    "--max_seq_length", "128",
    "--batch_size", "8",
    "--overwrite_cache", "False",
    "--no_cuda", "True",
]

ARGS = {
    "args": args_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — 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
viterbi_decode Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/models/utils.py
code served (permissive licence) · get_code("24f968af5f1a9654")
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. 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 math

torch.manual_seed(0)

# Set up small tensors for viterbi_decode
sequence_length = 3
num_tags = 4

# tag_sequence: (sequence_length, num_tags) - unary potentials
tag_sequence = torch.randn(sequence_length, num_tags)

# transition_matrix: (num_tags, num_tags) - binary potentials
transition_matrix = torch.randn(num_tags, num_tags)

# tag_observations: optional list of observed tag indices (-1 for unobserved)
tag_observations = [-1, 1, -1]

# allowed_start_transitions: (num_tags,) - which tags can be start
allowed_start_transitions = torch.zeros(num_tags)
allowed_start_transitions[0] = 1.0
allowed_start_transitions[1] = 1.0

# allowed_end_transitions: (num_tags,) - which tags can transition to end
allowed_end_transitions = torch.zeros(num_tags)
allowed_end_transitions[2] = 1.0
allowed_end_transitions[3] = 1.0

# top_k: how many top paths to return
top_k = 1

ARGS = {
    "tag_sequence": tag_sequence,
    "transition_matrix": transition_matrix,
    "tag_observations": tag_observations,
    "allowed_start_transitions": allowed_start_transitions,
    "allowed_end_transitions": allowed_end_transitions,
    "top_k": top_k,
}
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 tuple — a tuple 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
parse_train_args Not yet run
unverified (harvested, no recorded run)
jiangfeng1124/ChemRxnExtractor/chemrxnextractor/prod_args.py
code served (permissive licence) · get_code("d5067a709aac1674")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
logsumexp 3 other papers
3 dated earlier
1603.01354 (2016-03)
End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF
2021.emnlp-main.291 (2021 (year only))
A Fine-Grained Domain Adaption Model for Joint Word Segmentation and POS Tagging
2206.14774 (2022-06)
TweetNLP: Cutting-Edge Natural Language Processing for Social Media
allowed_transitions 2 other papers
2 dated earlier
2021.emnlp-main.291 (2021 (year only))
A Fine-Grained Domain Adaption Model for Joint Word Segmentation and POS Tagging
2206.14774 (2022-06)
TweetNLP: Cutting-Edge Natural Language Processing for Social Media
viterbi_decode 1 other paper
1 dated earlier
2206.14774 (2022-06)
TweetNLP: Cutting-Edge Natural Language Processing for Social Media

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

The rapid growth of chemical literature has generated vast amounts of unstructured data, where reaction information is particularly valuable for applications such as reaction predictions and drug design. However, the prohibitive cost of expert annotation has led to a scarcity of training data, severely hindering the performance of automatic reaction extraction. In this work, we conduct a systematic study of active learning for chemical reaction extraction. We integrate six uncertaintyand diversity-based strategies with pretrained transformer-CRF architectures, and evaluate them on product extraction and role labeling task. While several methods approach full-data performance with fewer labeled instances, learning curves are often non-monotonic and task-dependent. Our analysis shows that strong pretraining, structured CRF decoding, and label sparsity limit the stability of conventional active learning strategies. These findings provide practical insights for the effective use of active learning in chemical information extraction.

For agents

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

get_harvested_code_for_paper("2604.19335")
get_code_for_paper("2604.19335")
have("2604.19335")

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

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

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

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

Connect an agent — have() is free.