SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.17501 · 2026

SGHA: Evidence-Grounded Research Problem Discovery with Local Language Models

Junpei Komiyama, Sarvesh Gharat

arXiv · PDF · Open in the Atlas

Code that ran

35 of 46 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 29 failures of our instrument; 11 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/2608.17501.json · badge: /api/ran/2608.17501.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
SarveshVGharat/structural-gap-hypothesis-agent community
Papers with Code archive
35 ran · 11 no recorded run
FunctionStatusWhere it lives
CandidateGap Ran
ran on a synthesized input · constructed an object; no result was computed
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("4fd12cb55d0c3e39")
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 an instance of its own class, CandidateGap: the run constructed the object and did not call it, so no result was computed. 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 typing import Any

torch.manual_seed(0)

ARGS = {
    'gap_id': 'gap_001',
    'gap': 'Limited understanding of protein folding mechanisms in extreme pH conditions',
    'target': 'Protein structure prediction',
    'scope': 'Biochemistry, structural biology',
    'mechanism': 'pH-dependent conformational changes',
    'supporting_evidence': [
        {
            'paper_id': 'paper_001',
            'statement': 'pH affects protein stability',
            'confidence': 0.85
        },
        {
            'paper_id': 'paper_002',
            'statement': 'Extreme pH conditions denature proteins',
            'confidence': 0.92
        }
    ],
    'counterevidence': [
        {
            'paper_id': 'paper_003',
            'statement': 'Some proteins are pH stable',
            'confidence': 0.65
        }
    ],
    'traceability_path': [
        'literature_search',
        'expert_review',
        'experimental_validation'
    ],
    'novelty_score': 0.78,
    'feasibility_score': 0.65,
    'impact_score': 0.82,
    'overall_score': 0.75,
    'motif_type': 'structural_gap',
    'motif_id': 'motif_ph_protein',
    'paper_ids': [
        'paper_001',
        'paper_002',
        'paper_003',
        'paper_004'
    ],
    'extraction_uncertainty': 0.15,
    'counterevidence_edges': [
        {
            'source': 'gap_001',
            'target': 'gap_002',
            'relationship': 'contradicts'
        }
    ],
    'counterevidence_papers': [
        'paper_003',
        'paper_005'
    ],
    'counterevidence_status': 'reviewed',
    'counterevidence_summary': 'Some counterevidence found but limited scope',
    'remaining_gap_scope': 'Effects at pH > 12 remain unexplored',
    'novelty_status': 'novel',
    'novelty_rationale': 'No prior comprehensive study on extreme pH folding',
    'author_alignment_score': 0.88,
    'author_alignment_reason': 'Aligns with research group focus on pH biochemistry',
    'related_author_papers': [
        'paper_006',
        'paper_007'
    ],
    'related_cited_papers': [
        'paper_008',
        'paper_009'
    ],
    'related_citing_papers': [
        'paper_010',
        'paper_011'
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CandidateGap — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CandidateGap 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
MotifHit Ran
ran on a synthesized input · constructed an object; no result was computed
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("1990a33e2eb27c2a")
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 an instance of its own class, MotifHit: the run constructed the object and did not call it, so no result was computed. 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 typing import Any

# Set seed for reproducibility
torch.manual_seed(0)

# Construct arguments for MotifHit
ARGS = {
    "motif_type": "regulatory_element",
    "motif_id": "motif_001",
    "description": "A test regulatory motif for validation",
    "supporting_node_ids": ["node_1", "node_2", "node_3"],
    "supporting_edge_ids": ["edge_1", "edge_2"],
    "paper_ids": ["paper_123", "paper_456"],
    "source_text_spans": [
        {"start": 0, "end": 10, "text": "sample text"},
        {"start": 15, "end": 25, "text": "another span"}
    ],
    "score": 0.85,
    "metadata": {
        "confidence": 0.9,
        "method": "sequence_matching",
        "organism": "human",
        "extra_field": "extra_value"
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MotifHit — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MotifHit 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
_bounded_graph Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("37610c9e350c0fb4")
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 MultiDiGraph. 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 networkx as nx

# Create a small MultiDiGraph for testing
graph = nx.MultiDiGraph()

# Add some nodes with varying degrees
graph.add_edges_from([
    (0, 1),
    (0, 2),
    (0, 3),
    (1, 2),
    (1, 4),
    (2, 3),
    (3, 4),
    (4, 0),
    (4, 1),
    (4, 2),
])

# Set max_nodes to a value less than total nodes to test the bounding logic
max_nodes = 3

ARGS = {
    "graph": graph,
    "max_nodes": max_nodes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiDiGraph — a MultiDiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiDiGraph output the recorded ndim 1 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
_csv_value Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("c87bdcd9651987a8")
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 json
from pathlib import Path
from typing import Any

torch.manual_seed(0)

# Test case 1: None value
test_none = None

# Test case 2: Simple primitive values
test_str = "hello"
test_int = 42
test_float = 3.14
test_bool = True

# Test case 3: Path object
test_path = Path("/tmp/test_file.txt")

# Test case 4: Dict with various value types
test_dict = {
    "name": "test",
    "count": 10,
    "value": 2.5,
    "active": False,
    "path": Path("/home/user/data"),
    "nested": {
        "inner": "value",
        "number": 99
    }
}

# Test case 5: List with mixed types
test_list = [1, "two", 3.0, True, None]

# Test case 6: Tuple
test_tuple = (1, 2, 3)

# Test case 7: Set
test_set = {1, 2, 3}

# Test case 8: Complex nested structure
test_complex = {
    "tensors": [1, 2, 3],
    "paths": [Path("/a"), Path("/b")],
    "mixed": (1, "test", None),
    "deep": {
        "level2": {
            "level3": [Path("/deep/path"), 42]
        }
    }
}

# Test case 9: Pydantic-like object with model_dump
class MockPydanticModel:
    def model_dump(self, mode='json'):
        return {"data": "from_model_dump", "nested": {"key": "value"}}

test_pydantic = MockPydanticModel()

# Test case 10: Object with dict method
class MockDictModel:
    def dict(self):
        return {"field": "value", "number": 123}

test_dict_model = MockDictModel()

ARGS = {
    "value": test_complex
}
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
_derive_mechanism Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("a1b44bc5609a2a3a")
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
from pydantic import BaseModel, ConfigDict, Field

class MotifHit(BaseModel):
    model_config = ConfigDict(extra='allow')
    motif_type: str
    motif_id: str
    description: str
    supporting_node_ids: list[str] = Field(default_factory=list)
    supporting_edge_ids: list[str] = Field(default_factory=list)
    paper_ids: list[str] = Field(default_factory=list)
    source_text_spans: list[dict] = Field(default_factory=list)
    score: float = Field(default=0.0, ge=0.0, le=1.0)
    metadata: dict = Field(default_factory=dict)

def _derive_mechanism(hit: MotifHit) -> str:
    if hit.motif_type == 'shared_failure_condition':
        fc = hit.metadata.get('failure_condition', '')[:80]
        return f'Shared failure condition across methods: {fc}'
    if hit.motif_type == 'conflicting_claims':
        src = (hit.metadata.get('source_claim') or '')[:60]
        tgt = (hit.metadata.get('target_claim') or '')[:60]
        return f"Cross-paper conflict: '{src}' vs '{tgt}'"
    if hit.motif_type == 'assumption_mismatch':
        method = (hit.metadata.get('method') or '')[:60]
        return f'Implicit assumption in {method} violated by observed failure conditions'
    if hit.motif_type == 'sparse_evaluation':
        method = (hit.metadata.get('method') or '')[:60]
        return f'Repeated use of {method} without evaluation across diverse datasets/metrics'
    if hit.motif_type == 'repeated_unaddressed_limitation':
        lim = (hit.metadata.get('limitation') or '')[:60]
        return f'Unaddressed cross-paper limitation: {lim}'
    if hit.motif_type == 'unrealistic_assumption':
        method = (hit.metadata.get('method') or '')[:60]
        assumptions = hit.metadata.get('idealized_assumptions', [])
        failures = hit.metadata.get('failure_conditions', [])
        assumption_str = ', '.join((str(a) for a in assumptions[:2]))
        failure_str = ', '.join((str(f) for f in failures[:2]))
        if assumption_str and failure_str:
            return f'{method} assumes {assumption_str}, which breaks under {failure_str}'
        return f'Idealized assumption in {method} violated under realistic conditions'
    if hit.motif_type == 'theory_practice_gap':
        method = (hit.metadata.get('method') or '')[:60]
        failures = hit.metadata.get('failure_conditions', [])
        failure_str = ', '.join((str(f) for f in failures[:2])) if failures else 'real-world conditions'
        return f'{method} has theoretical guarantees not validated empirically; fails under {failure_str}'
    if hit.motif_type == 'shared_unrealistic_assumption':
        assumption = (hit.metadata.get('assumption') or '')[:80]
        n = hit.metadata.get('method_count', 0)
        return f"Assumption '{assumption}' shared across {n} methods is unrealistic in practice"
    if hit.motif_type == 'missing_stress_test':
        method = (hit.metadata.get('method') or '')[:60]
        return f'{method} lacks evaluation under distribution shift or adversarial conditions'
    return 'insufficient evidence'

torch.manual_seed(0)

hit_example = MotifHit(
    motif_type='shared_failure_condition',
    motif_id='mh_001',
    description='A test motif hit',
    supporting_node_ids=['node1', 'node2'],
    supporting_edge_ids=['edge1'],
    paper_ids=['paper1', 'paper2'],
    source_text_spans=[{'start': 0, 'end': 10, 'text': 'sample'}],
    score=0.85,
    metadata={
        'failure_condition': 'Method fails under high dimensional noise',
        'source_claim': 'This method is robust',
        'target_claim': 'This method has limitations',
        'method': 'gradient descent optimization',
        'limitation': 'Limited to convex problems',
        'idealized_assumptions': ['smooth loss landscape', 'bounded gradients'],
        'failure_conditions': ['non-smooth objectives', 'unbounded noise'],
        'assumption': 'Data is normally distributed',
        'method_count': 3
    }
)

ARGS = {
    'hit': hit_example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, 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
_graphml_safe_copy Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("c72d2717c3edd7ca")
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 MultiDiGraph. 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 networkx as nx
from typing import Any

# Construct a MultiDiGraph with various node and edge attributes
# including different types that need to be safely converted
graph = nx.MultiDiGraph()

# Add nodes with different attribute types
graph.add_node(1, name="node1", value=42, score=3.14, active=True, data=None, complex_obj=[1, 2, 3])
graph.add_node(2, name="node2", value=100, score=2.71, active=False, metadata={"key": "value"})
graph.add_node("node3", label="third", count=0, nested={"a": [1, 2], "b": {"c": 3}})

# Add edges with different attribute types
graph.add_edge(1, 2, key="edge1", weight=0.5, relation="parent", count=1)
graph.add_edge(1, 2, key="edge2", weight=0.7, relation="sibling", extra=[1, 2, 3])
graph.add_edge(2, "node3", key="edge3", weight=1.0, data={"nested": True})
graph.add_edge("node3", 1, key="edge4", score=99.99, active=True, none_val=None)

ARGS = {
    "graph": graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiDiGraph — a MultiDiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiDiGraph 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
_safe_attr Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("4f4348f48f92d5ad")
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 json

torch.manual_seed(0)

ARGS = {
    "value": "test_string"
}
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
_summary_rows Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("044559028ec38a98")
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 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 torch
import numpy as np

# Construct arguments for _summary_rows
values = ["apple", "banana", "apple", "cherry", "banana", "apple", "date"]
field = "fruit_type"

ARGS = {
    "values": values,
    "field": field,
}
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 1, dtype family float — 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
add_edge Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("1d98057df833e09b")
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 networkx as nx

# Create a MultiDiGraph for the graph parameter
graph = nx.MultiDiGraph()

# Define arguments for add_edge function
ARGS = {
    'graph': graph,
    'source': 'entity_A',
    'target': 'entity_B',
    'relation': 'causes',
    'paper_id': 'paper_2024_001',
    'evidence_text': 'The experiment shows that compound X causes reaction Y.',
    'section': 'Results',
    'confidence': 0.95
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
assumption_mismatch Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("decad84f653c39db")
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 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 networkx as nx
from typing import Any

# Create a small test graph
graph = nx.MultiDiGraph()

# Add a method node
graph.add_node('method_1', type='Method', label='Neural Network Training', paper_ids=['paper1', 'paper2'])

# Add assumption nodes
graph.add_node('assumption_1', type='Assumption', label='Data is normally distributed')
graph.add_node('assumption_2', type='Assumption', label='Learning rate is constant')

# Add failure condition nodes
graph.add_node('failure_1', type='Condition', label='High skewness in data')
graph.add_node('failure_2', type='Condition', label='Adaptive learning rate')

# Add edges from method to assumptions
graph.add_edge('method_1', 'assumption_1', key='edge_assume_1', relation='assumes', paper_ids=['paper1'], evidence=[{'text': 'Assumes normal distribution', 'span': (0, 25)}])
graph.add_edge('method_1', 'assumption_2', key='edge_assume_2', relation='assumes', paper_ids=['paper2'], evidence=[{'text': 'Constant LR assumed', 'span': (30, 49)}])

# Add edges from method to failure conditions
graph.add_edge('method_1', 'failure_1', key='edge_fail_1', relation='fails_under', paper_ids=['paper1'], evidence=[{'text': 'Fails with skewed data', 'span': (50, 72)}])
graph.add_edge('method_1', 'failure_2', key='edge_fail_2', relation='fails_under', paper_ids=['paper3'], evidence=[{'text': 'Fails with adaptive LR', 'span': (75, 98)}])

# Also add a node that should be skipped (not a Method)
graph.add_node('other_1', type='Other', label='Something else')

ARGS = {
    'graph': graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
bounded Ran
ran, honoured the contract we drafted
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("2cec75e36c6b83fc")
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

torch.manual_seed(0)

# The function bounded takes three float parameters:
# - value: the value to be bounded
# - low: the lower bound (default 0.0)
# - high: the upper bound (default 1.0)
# The function returns a float

ARGS = {
    "value": 0.5,
    "low": 0.0,
    "high": 1.0,
}
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 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
candidate_gap_from_hit Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("80ed8cfaa7625567")
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 CandidateGap. 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 typing import Any

# First, let's define the MotifHit and CandidateGap classes as provided
from pydantic import BaseModel, ConfigDict, Field

class CandidateGap(BaseModel):
    model_config = ConfigDict(extra='allow')
    gap_id: str
    gap: str
    target: str = ''
    scope: str = ''
    mechanism: str = ''
    supporting_evidence: list[dict[str, Any]] = Field(default_factory=list)
    counterevidence: list[dict[str, Any]] = Field(default_factory=list)
    traceability_path: list[str] = Field(default_factory=list)
    novelty_score: float = Field(default=0.5, ge=0.0, le=1.0)
    feasibility_score: float = Field(default=0.5, ge=0.0, le=1.0)
    impact_score: float = Field(default=0.5, ge=0.0, le=1.0)
    overall_score: float = Field(default=0.0, ge=0.0, le=1.0)
    motif_type: str = ''
    motif_id: str = ''
    paper_ids: list[str] = Field(default_factory=list)
    extraction_uncertainty: float = Field(default=0.0, ge=0.0, le=1.0)
    counterevidence_edges: list[dict[str, Any]] = Field(default_factory=list)
    counterevidence_papers: list[str] = Field(default_factory=list)
    counterevidence_status: str = ''
    counterevidence_summary: str = ''
    remaining_gap_scope: str = ''
    novelty_status: str = ''
    novelty_rationale: str = ''
    author_alignment_score: float = Field(default=0.0, ge=0.0, le=1.0)
    author_alignment_reason: str = ''
    related_author_papers: list[str] = Field(default_factory=list)
    related_cited_papers: list[str] = Field(default_factory=list)
    related_citing_papers: list[str] = Field(default_factory=list)

class MotifHit(BaseModel):
    model_config = ConfigDict(extra='allow')
    motif_type: str
    motif_id: str
    description: str
    supporting_node_ids: list[str] = Field(default_factory=list)
    supporting_edge_ids: list[str] = Field(default_factory=list)
    paper_ids: list[str] = Field(default_factory=list)
    source_text_spans: list[dict[str, Any]] = Field(default_factory=list)
    score: float = Field(default=0.0, ge=0.0, le=1.0)
    metadata: dict[str, Any] = Field(default_factory=dict)

# Create a sample MotifHit instance
sample_motif_hit = MotifHit(
    motif_type='shared_failure_condition',
    motif_id='motif_001',
    description='A shared failure condition across methods',
    supporting_node_ids=['node_1', 'node_2'],
    supporting_edge_ids=['edge_1', 'edge_2'],
    paper_ids=['paper_1', 'paper_2', 'paper_3'],
    source_text_spans=[
        {'start': 0, 'end': 50, 'text': 'sample text span 1'},
        {'start': 100, 'end': 150, 'text': 'sample text span 2'}
    ],
    score=0.75,
    metadata={
        'failure_condition': 'Method fails under high-dimensional noise',
        'source_claim': 'Our method achieves 95% accuracy',
        'target_claim': 'Their method achieves 87% accuracy',
        'method': 'Neural Network Classifier',
        'limitation': 'Limited to small dataset sizes',
        'idealized_assumptions': ['bounded noise', 'linear separability'],
        'failure_conditions': ['high-dimensional data', 'adversarial noise'],
        'assumption': 'Gaussian noise assumption',
        'method_count': 3
    }
)

# Build ARGS dictionary
ARGS = {
    'hit': sample_motif_hit,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CandidateGap — a CandidateGap output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CandidateGap 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
candidate_overall Ran
ran, honoured the contract we drafted
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("b35ecfd464d446d4")
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

torch.manual_seed(0)

# The function candidate_overall takes four float parameters and performs arithmetic operations on them
# It calls bounded() which clamps the result between 0.0 and 1.0
# All parameters are simple floats used in a weighted sum

ARGS = {
    "novelty": 0.7,
    "feasibility": 0.6,
    "impact": 0.8,
    "motif_score": 0.5
}
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 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
claim_without_measurement Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("109d08404cadc616")
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 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 networkx as nx
from typing import Any

# Create a sample MultiDiGraph with the structure expected by the function
graph = nx.MultiDiGraph()

# Add a Method node with required attributes
graph.add_node('method_1', type='Method', label='TestMethod', paper_ids=['paper_1', 'paper_2'])

# Add target nodes for claim edges
graph.add_node('target_1', type='Metric', label='TargetMetric1')
graph.add_node('target_2', type='Metric', label='TargetMetric2')

# Add claim edges (addresses/improves_over relations)
graph.add_edge('method_1', 'target_1', key='edge_1', 
               relation='addresses', 
               evidence=[{'evidence_text': 'This method is robust and scalable'}],
               paper_ids=['paper_1'])

graph.add_edge('method_1', 'target_2', key='edge_2',
               relation='improves_over',
               evidence=[{'evidence_text': 'Improves efficiency and accuracy'}],
               paper_ids=['paper_2'])

# Add a measurement edge
graph.add_edge('method_1', 'target_1', key='edge_3',
               relation='measured_by',
               evidence=[{'evidence_text': 'Measured on benchmark'}],
               paper_ids=['paper_1'])

# Add some additional nodes and edges to make the graph more realistic
graph.add_node('method_2', type='Method', label='OtherMethod', paper_ids=['paper_3'])
graph.add_node('target_3', type='Metric', label='TargetMetric3')
graph.add_edge('method_2', 'target_3', key='edge_4',
               relation='addresses',
               evidence=[{'evidence_text': 'A simple claim without keywords'}],
               paper_ids=['paper_3'])

ARGS = {
    'graph': graph,
    'max_measurement_edges': 1,
    'require_claim_keyword': True,
    'min_papers': 1,
    'min_claim_edges': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
conflicting_claims Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("926f6d191c21910c")
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 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 networkx as nx
from collections import defaultdict

# Construct a MultiDiGraph with the necessary structure for conflicting_claims
graph = nx.MultiDiGraph()

# Add nodes with labels and paper_ids
graph.add_node("claim_1", label="Method A is better", paper_ids=["paper1", "paper2"])
graph.add_node("claim_2", label="Method B is better", paper_ids=["paper2", "paper3"])
graph.add_node("method_x", label="Approach X", paper_ids=["paper1"])
graph.add_node("method_y", label="Approach Y", paper_ids=["paper3"])

# Add contradicts edge
graph.add_edge("claim_1", "claim_2", key="edge_1", relation="contradicts", 
               paper_ids=["paper2"], evidence=[{"text": "contradiction evidence", "span": (0, 10)}])

# Add positive relation edges
graph.add_edge("method_x", "method_y", key="edge_2", relation="improves_over",
               paper_ids=["paper1"], evidence=[{"text": "positive evidence", "span": (0, 5)}])

# Add negative relation edges targeting method_y to create implicit conflict
graph.add_edge("method_x", "method_y", key="edge_3", relation="limited_by",
               paper_ids=["paper3"], evidence=[{"text": "negative evidence", "span": (10, 20)}])

# Add more edges to build the target_rel_index
graph.add_edge("claim_1", "method_y", key="edge_4", relation="addresses",
               paper_ids=["paper1", "paper2"], evidence=[{"text": "addresses evidence", "span": (5, 15)}])

graph.add_edge("claim_1", "method_y", key="edge_5", relation="fails_under",
               paper_ids=["paper3"], evidence=[{"text": "fails evidence", "span": (15, 25)}])

ARGS = {
    "graph": graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
edge_rows Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("2cbba16af2e9a62a")
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 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 networkx as nx

# Create a small MultiDiGraph with some edges and data
graph = nx.MultiDiGraph()

# Add nodes
graph.add_node('A')
graph.add_node('B')
graph.add_node('C')

# Add edges with data attributes
graph.add_edge('A', 'B', key='edge_1', weight=0.5, label='connection1')
graph.add_edge('A', 'B', key='edge_2', weight=0.8, label='connection2')
graph.add_edge('B', 'C', key='edge_3', weight=1.2, label='connection3')

ARGS = {
    'graph': graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
ensure_dir Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("618c853a29411feb")
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 PosixPath. 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

# The function takes a path (str or Path) and creates directories if needed
# We'll use a temporary directory path as a string
ARGS = {
    "path": Path(tempfile.gettempdir()) / "test_ensure_dir" / "nested" / "path"
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
load_graph Ran
ran, honoured the contract we drafted
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("02ec7d29f5aba8e5")
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 MultiDiGraph. 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 networkx as nx
import json
import tempfile
from pathlib import Path
from networkx.readwrite import json_graph

# Create a temporary JSON file with valid graph data
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test_graph.json"

# Create a valid node-link format graph data
graph_data = {
    "directed": True,
    "multigraph": True,
    "graph": {},
    "nodes": [
        {"id": 0},
        {"id": 1},
        {"id": 2}
    ],
    "edges": [
        {"source": 0, "target": 1},
        {"source": 1, "target": 2},
        {"source": 0, "target": 2}
    ]
}

# Write the graph data to the temporary file
with temp_path.open('w', encoding='utf-8') as f:
    json.dump(graph_data, f)

# Define ARGS with the path to the temporary graph file
ARGS = {
    "path": str(temp_path)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiDiGraph — a MultiDiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiDiGraph output the recorded ndim 1 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
missing_baseline_comparison Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("157e56b5e9c0d18b")
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 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 networkx as nx
from typing import Any

# Create a small MultiDiGraph with the structure expected by the function
graph = nx.MultiDiGraph()

# Add a Method node
graph.add_node(
    'method_1',
    type='Method',
    label='TestMethod',
    paper_ids=['paper_1']
)

# Add dataset/benchmark nodes
graph.add_node('dataset_1', type='Dataset', label='Dataset1')
graph.add_node('dataset_2', type='Dataset', label='Dataset2')
graph.add_node('metric_1', type='Metric', label='Metric1')

# Add evaluation edges (uses_dataset, measured_by relations)
# These satisfy the min_eval_edges requirement
graph.add_edge(
    'method_1',
    'dataset_1',
    key='edge_1',
    relation='uses_dataset',
    paper_ids=['paper_1', 'paper_2']
)

graph.add_edge(
    'method_1',
    'dataset_2',
    key='edge_2',
    relation='uses_dataset',
    paper_ids=['paper_2', 'paper_3']
)

graph.add_edge(
    'method_1',
    'metric_1',
    key='edge_3',
    relation='measured_by',
    paper_ids=['paper_3']
)

# Deliberately NOT add any improves_over edges so the motif is detected

ARGS = {
    'graph': graph,
    'min_eval_edges': 1,
    'min_method_papers': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
missing_stress_test Ran
ran, honoured the contract we drafted
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("ab80218346933a00")
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 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 networkx as nx
from typing import Any

# Create a MultiDiGraph with test data
graph = nx.MultiDiGraph()

# Add FailureCondition nodes
graph.add_node('fc1', type='FailureCondition', label='Memory Overflow')
graph.add_node('fc2', type='FailureCondition', label='Timeout Error')

# Add Method nodes
graph.add_node('method1', type='Method', label='Method A')
graph.add_node('method2', type='Method', label='Method B')
graph.add_node('method3', type='Method', label='Method C')

# Add Dataset/Measurement nodes
graph.add_node('dataset1', type='Dataset', label='Dataset 1')
graph.add_node('measurement1', type='Measurement', label='Measurement 1')

# Add edges: methods that fail under failure conditions
graph.add_edge('method1', 'fc1', key=0, relation='fails_under', paper_ids=['paper1', 'paper2'])
graph.add_edge('method2', 'fc1', key=0, relation='fails_under', paper_ids=['paper2', 'paper3'])
graph.add_edge('method3', 'fc2', key=0, relation='fails_under', paper_ids=['paper1'])

# Add edges: methods using datasets/measurements (evaluation edges)
graph.add_edge('method1', 'dataset1', key=0, relation='uses_dataset', paper_ids=['paper1'])
graph.add_edge('method2', 'measurement1', key=0, relation='measured_by', paper_ids=['paper2'])

# Define arguments for the function
ARGS = {
    'graph': graph,
    'min_methods': 2,
    'min_papers': 2,
    'max_eval_edges': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
model_dump Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("0bfcf7878847fb49")
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 torch
from pydantic import BaseModel


class MockModelWithModelDump(BaseModel):
    """A Pydantic v2 model that has model_dump method"""
    value: int = 42
    name: str = "test"


class MockModelWithDict:
    """A mock object with dict() method"""
    def dict(self):
        return {"key": "value", "number": 123}


# Create test objects
torch.manual_seed(0)

obj_with_model_dump = MockModelWithModelDump(value=100, name="pydantic_model")
obj_with_dict = MockModelWithDict()
obj_plain = {"plain": "dict", "data": [1, 2, 3]}

# Test with different types of objects
ARGS = {
    "obj": obj_with_model_dump
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — 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
motif_rows Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("babfc1664ca4860d")
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 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 torch
from typing import Any
from pydantic import BaseModel, ConfigDict, Field, field_validator

class MotifHit(BaseModel):
    model_config = ConfigDict(extra='allow')
    motif_type: str
    motif_id: str
    description: str
    supporting_node_ids: list[str] = Field(default_factory=list)
    supporting_edge_ids: list[str] = Field(default_factory=list)
    paper_ids: list[str] = Field(default_factory=list)
    source_text_spans: list[dict[str, Any]] = Field(default_factory=list)
    score: float = Field(default=0.0, ge=0.0, le=1.0)
    metadata: dict[str, Any] = Field(default_factory=dict)

def model_dump(obj: Any) -> Any:
    if hasattr(obj, 'model_dump'):
        return obj.model_dump(mode='json')
    if hasattr(obj, 'dict'):
        return obj.dict()
    return obj

def motif_rows(hits: list[MotifHit]) -> list[dict[str, Any]]:
    return [model_dump(hit) for hit in hits]

# Construct valid arguments
hit1 = MotifHit(
    motif_type="protein_complex",
    motif_id="MOTIF_001",
    description="Test motif 1",
    supporting_node_ids=["node_1", "node_2"],
    supporting_edge_ids=["edge_1"],
    paper_ids=["paper_123"],
    source_text_spans=[{"start": 0, "end": 10}],
    score=0.85,
    metadata={"extra_field": "extra_value"}
)

hit2 = MotifHit(
    motif_type="regulatory_module",
    motif_id="MOTIF_002",
    description="Test motif 2",
    supporting_node_ids=["node_3"],
    supporting_edge_ids=["edge_2", "edge_3"],
    paper_ids=["paper_456", "paper_789"],
    source_text_spans=[{"start": 5, "end": 15}, {"start": 20, "end": 30}],
    score=0.72,
    metadata={"category": "test"}
)

ARGS = {
    "hits": [hit1, hit2]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
node_rows Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("79979887a7848830")
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 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 networkx as nx

# Create a simple MultiDiGraph with some nodes and data
graph = nx.MultiDiGraph()

# Add nodes with various data attributes
graph.add_node(1, name="Node 1", value=10, color="red")
graph.add_node(2, name="Node 2", value=20, color="blue")
graph.add_node(3, name="Node 3", value=30, color="green")

# Add edges (not required by the function, but makes it a more realistic graph)
graph.add_edge(1, 2)
graph.add_edge(2, 3)

ARGS = {
    "graph": graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
repeated_unaddressed_limitation Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("adfe356506baf3de")
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 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 networkx as nx
from typing import Any

# Create a small MultiDiGraph with the structure expected by the function
graph = nx.MultiDiGraph()

# Add a Limitation node with necessary attributes
limitation_node_id = "node_1"
graph.add_node(
    limitation_node_id,
    type="Limitation",
    label="Model does not handle edge cases",
    paper_ids=["paper_1"],
    evidence=[
        {
            "text": "The model fails on edge cases",
            "span_start": 0,
            "span_end": 40
        }
    ]
)

# Add source nodes that mention this limitation
source_node_1 = "node_2"
source_node_2 = "node_3"
graph.add_node(source_node_1, type="Finding")
graph.add_node(source_node_2, type="Finding")

# Add edges with "mentions" relation from multiple papers
graph.add_edge(
    source_node_1,
    limitation_node_id,
    key=0,
    relation="mentions",
    paper_ids=["paper_1", "paper_2"]
)

graph.add_edge(
    source_node_2,
    limitation_node_id,
    key=1,
    relation="mentions",
    paper_ids=["paper_2", "paper_3"]
)

# Important: Do NOT add an "addresses" edge, so has_address remains False
# This ensures the limitation is considered "unaddressed"

ARGS = {
    "graph": graph,
    "min_papers": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
shared_failure_condition Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("eadeb9da55964aae")
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 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 networkx as nx
from typing import Any

# Create a MultiDiGraph with nodes and edges matching what the function expects
graph = nx.MultiDiGraph()

# Add a FailureCondition node
failure_node_id = "fc:001"
graph.add_node(failure_node_id, type='FailureCondition', label='Memory leak in cache')

# Add Method nodes that fail under this condition
method1_id = "method:001"
method2_id = "method:002"
method3_id = "method:003"
graph.add_node(method1_id, type='Method', label='Method A')
graph.add_node(method2_id, type='Method', label='Method B')
graph.add_node(method3_id, type='Method', label='Method C')

# Add edges from methods to failure condition with 'fails_under' relation
graph.add_edge(
    method1_id, failure_node_id, 
    key='edge1',
    relation='fails_under',
    paper_ids=['paper:001', 'paper:002'],
    evidence=[{'text': 'Method A fails', 'span': (0, 10)}]
)
graph.add_edge(
    method2_id, failure_node_id,
    key='edge2',
    relation='fails_under',
    paper_ids=['paper:002', 'paper:003'],
    evidence=[{'text': 'Method B fails', 'span': (0, 10)}]
)
graph.add_edge(
    method3_id, failure_node_id,
    key='edge3',
    relation='fails_under',
    paper_ids=['paper:001'],
    evidence=[{'text': 'Method C fails', 'span': (0, 10)}]
)

# Add Paper nodes that mention the failure condition
paper1_id = "paper:001"
paper2_id = "paper:002"
paper3_id = "paper:003"
graph.add_node(paper1_id, type='Paper', label='Paper 1')
graph.add_node(paper2_id, type='Paper', label='Paper 2')
graph.add_node(paper3_id, type='Paper', label='Paper 3')

# Add mention edges from papers to failure condition
graph.add_edge(
    paper1_id, failure_node_id,
    key='mention1',
    relation='mentions',
    paper_ids=['paper:001']
)
graph.add_edge(
    paper2_id, failure_node_id,
    key='mention2',
    relation='mentions',
    paper_ids=['paper:002']
)
graph.add_edge(
    paper3_id, failure_node_id,
    key='mention3',
    relation='mentions',
    paper_ids=['paper:003']
)

ARGS = {
    'graph': graph,
    'min_methods': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
shared_unrealistic_assumption Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("8dbe60e4272ff86d")
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 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 networkx as nx
from typing import Any

# Create a small MultiDiGraph for testing
graph = nx.MultiDiGraph()

# Add an Assumption node with idealized keywords
assumption_node_id = "assumption_1"
graph.add_node(
    assumption_node_id,
    type="Assumption",
    label="known reward model",
    evidence=[
        {"evidence_text": "The method assumes access to the true reward function"},
        {"evidence_text": "This is a perfect oracle assumption"}
    ]
)

# Add Method nodes that assume this
method_1_id = "method_1"
method_2_id = "method_2"
method_3_id = "method_3"

graph.add_node(method_1_id, type="Method", label="Method A")
graph.add_node(method_2_id, type="Method", label="Method B")
graph.add_node(method_3_id, type="Method", label="Method C")

# Add edges from methods to assumption with "assumes" relation
graph.add_edge(
    method_1_id,
    assumption_node_id,
    key=0,
    relation="assumes",
    paper_ids=["paper_1", "paper_2"]
)
graph.add_edge(
    method_2_id,
    assumption_node_id,
    key=0,
    relation="assumes",
    paper_ids=["paper_2", "paper_3"]
)
graph.add_edge(
    method_3_id,
    assumption_node_id,
    key=0,
    relation="assumes",
    paper_ids=["paper_4"]
)

# Add failure/limitation edges from methods to simulate failures
graph.add_edge(
    method_1_id,
    "failure_node_1",
    key=0,
    relation="fails_under",
    paper_ids=["paper_1"]
)
graph.add_edge(
    method_2_id,
    "failure_node_2",
    key=0,
    relation="limited_by",
    paper_ids=["paper_3"]
)

# Add some non-matching nodes to test filtering
graph.add_node("assumption_2", type="Assumption", label="some other assumption", evidence=[])
graph.add_node("not_assumption", type="Method", label="Method D")

ARGS = {
    "graph": graph,
    "min_methods": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
sparse_evaluation Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("f50e6ed55ee46158")
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 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 networkx as nx
from typing import Any

# Create a MultiDiGraph with the structure expected by sparse_evaluation
graph = nx.MultiDiGraph()

# Add a Method node with required attributes
method_id = "method_1"
graph.add_node(
    method_id,
    type='Method',
    label='TestMethod',
    paper_ids=['paper_1', 'paper_2', 'paper_3'],
    evidence=[
        {'text': 'method evidence 1', 'source': 'paper_1'},
        {'text': 'method evidence 2', 'source': 'paper_2'}
    ]
)

# Add task nodes
task_id_1 = "task_1"
task_id_2 = "task_2"
graph.add_node(task_id_1, type='Task', label='Task1')
graph.add_node(task_id_2, type='Task', label='Task2')

# Add edges with evaluated_on relation
graph.add_edge(
    method_id,
    task_id_1,
    key='edge_eval_1',
    relation='evaluated_on',
    evidence=[{'text': 'evaluated on task 1', 'source': 'paper_1'}]
)
graph.add_edge(
    method_id,
    task_id_2,
    key='edge_eval_2',
    relation='evaluated_on',
    evidence=[{'text': 'evaluated on task 2', 'source': 'paper_2'}]
)

# Add dataset node
dataset_id = "dataset_1"
graph.add_node(dataset_id, type='Dataset', label='Dataset1')

# Add edges with uses_dataset relation (sparse evaluation)
graph.add_edge(
    method_id,
    dataset_id,
    key='edge_dataset_1',
    relation='uses_dataset',
    evidence=[{'text': 'uses dataset evidence', 'source': 'paper_1'}]
)

# Add some other nodes to ensure we filter correctly
other_id = "other_1"
graph.add_node(
    other_id,
    type='Other',
    label='OtherNode',
    paper_ids=['paper_4']
)

ARGS = {
    'graph': graph,
    'min_mentions': 2,
    'max_evaluations': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
theory_practice_gap Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("fcdda5866a0f4078")
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 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 networkx as nx
from typing import Any

# Create a small MultiDiGraph with the structure expected by theory_practice_gap
graph = nx.MultiDiGraph()

# Add a Method node with required attributes
method_id = "method_001"
graph.add_node(
    method_id,
    type="Method",
    label="Theoretical Method A",
    paper_ids=["paper_1", "paper_2", "paper_3"]
)

# Add target nodes for failure edges
failure_target_1 = "failure_cond_001"
failure_target_2 = "failure_cond_002"
graph.add_node(failure_target_1, label="Fails on sparse data")
graph.add_node(failure_target_2, label="Limited by computational complexity")

# Add edges with failure relations (but no uses_dataset or measured_by edges)
graph.add_edge(
    method_id,
    failure_target_1,
    key="edge_001",
    relation="fails_under",
    paper_ids=["paper_1", "paper_4"],
    evidence=[{"text": "Method fails under sparse conditions", "location": "section 3.2"}]
)

graph.add_edge(
    method_id,
    failure_target_2,
    key="edge_002",
    relation="limited_by",
    paper_ids=["paper_2", "paper_5"],
    evidence=[{"text": "Computational complexity limits scalability", "location": "section 4.1"}]
)

# Add a non-Method node to test filtering
graph.add_node("dataset_001", type="Dataset", label="Some Dataset")

# Create the ARGS dictionary with the required parameter
ARGS = {
    "graph": graph,
    "min_papers": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
to_jsonable Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("410b43e930daf358")
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.

from pathlib import Path
from pydantic import BaseModel
import torch

torch.manual_seed(0)

# Test with various types that to_jsonable should handle

class SimpleModel(BaseModel):
    name: str
    value: int

class ModelWithDict:
    def dict(self):
        return {"key": "value", "number": 42}

class ModelWithModelDump(BaseModel):
    text: str
    data: dict

# Create test values covering all branches
test_path = Path("/tmp/test_file.txt")
test_dict = {"nested": {"deep": "value"}, "count": 5}
test_list = [1, 2, "three", {"four": 4}]
test_tuple = (1, "two", 3.0)
test_set = {1, 2, 3}
test_pydantic = SimpleModel(name="test", value=123)
test_dict_model = ModelWithDict()
test_model_dump = ModelWithModelDump(text="hello", data={"key": "val"})

# Create a mixed nested structure to test recursive handling
complex_value = {
    "path": test_path,
    "model": test_pydantic,
    "list_data": [test_dict, test_tuple, test_set],
    "nested_dict": {
        "inner_path": Path("/another/path"),
        "inner_list": [1, 2, {"deep": test_model_dump}]
    }
}

ARGS = {
    "value": complex_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — 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
transfer_solution_gap Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("b41a60f12b76e264")
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 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 networkx as nx
from typing import Any

# Create a MultiDiGraph with nodes and edges that satisfy the function logic
graph = nx.MultiDiGraph()

# Add limitation node
limitation_node_id = "limitation_1"
graph.add_node(limitation_node_id, type='Limitation', label='High computational cost')

# Add method nodes that address the limitation
method_a_id = "method_a"
method_b_id = "method_b"
method_c_id = "method_c"
graph.add_node(method_a_id, type='Method', label='Method A')
graph.add_node(method_b_id, type='Method', label='Method B')
graph.add_node(method_c_id, type='Method', label='Method C')

# Method A addresses the limitation
graph.add_edge(method_a_id, limitation_node_id, key=0, relation='addresses', paper_ids=['paper_1', 'paper_2'])

# Method B and C are affected by (limited_by) the limitation
graph.add_edge(method_b_id, limitation_node_id, key=0, relation='limited_by', paper_ids=['paper_3', 'paper_4'])
graph.add_edge(method_c_id, limitation_node_id, key=0, relation='fails_under', paper_ids=['paper_5'])

# Add another failure condition node
failure_node_id = "failure_1"
graph.add_node(failure_node_id, type='FailureCondition', label='Memory exhaustion')

# Add methods for the failure condition
method_d_id = "method_d"
method_e_id = "method_e"
graph.add_node(method_d_id, type='Method', label='Method D')
graph.add_node(method_e_id, type='Method', label='Method E')

# Method D addresses the failure
graph.add_edge(method_d_id, failure_node_id, key=0, relation='addresses', paper_ids=['paper_6', 'paper_7'])

# Method E is affected by the failure
graph.add_edge(method_e_id, failure_node_id, key=0, relation='limited_by', paper_ids=['paper_8', 'paper_9'])

ARGS = {
    'graph': graph,
    'min_papers': 2,
    'min_methods': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
unrealistic_assumption Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("95d0d271de00ecaf")
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 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 networkx as nx
from typing import Any

# Create a MultiDiGraph with realistic structure for the function
graph = nx.MultiDiGraph()

# Add a method node
method_id = "method_1"
graph.add_node(method_id, type='Method', label='Gradient Descent Algorithm', paper_ids=['paper_1', 'paper_2'])

# Add assumption nodes (idealized)
assumption_node_1 = "assumption_1"
assumption_node_2 = "assumption_2"
graph.add_node(assumption_node_1, type='Assumption', label='Known learning rate')
graph.add_node(assumption_node_2, type='Assumption', label='Convex optimization problem')

# Add failure condition nodes
failure_node_1 = "failure_1"
failure_node_2 = "failure_2"
graph.add_node(failure_node_1, type='Condition', label='Non-convex landscape')
graph.add_node(failure_node_2, type='Condition', label='Unknown noise variance')

# Add edges from method to assumptions with 'assumes' relation
graph.add_edge(method_id, assumption_node_1, key='edge_1', 
               relation='assumes', 
               paper_ids=['paper_1'],
               evidence=[
                   {'evidence_text': 'requires knowledge of the learning rate'},
                   {'evidence_text': 'assumes access to perfect tuning'}
               ])

graph.add_edge(method_id, assumption_node_2, key='edge_2',
               relation='assumes',
               paper_ids=['paper_2'],
               evidence=[
                   {'evidence_text': 'assumes convex objective function'},
                   {'evidence_text': 'known to require convexity'}
               ])

# Add edges from method to failure conditions with 'fails_under' relation
graph.add_edge(method_id, failure_node_1, key='edge_3',
               relation='fails_under',
               paper_ids=['paper_1'],
               evidence=[
                   {'evidence_text': 'fails under non-convex landscape'},
                   {'evidence_text': 'diverges on neural networks'}
               ])

graph.add_edge(method_id, failure_node_2, key='edge_4',
               relation='limited_by',
               paper_ids=['paper_2'],
               evidence=[
                   {'evidence_text': 'limited by unknown noise'},
                   {'evidence_text': 'requires known variance'}
               ])

ARGS = {
    'graph': graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
write_csv Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("c1306d470d6124f0")
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 PosixPath. 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
from typing import Mapping, Sequence, Any

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

# Define test data - rows as sequence of mappings
rows = [
    {
        "id": 1,
        "name": "Alice",
        "score": 95.5,
        "active": True,
        "metadata": {"key": "value"}
    },
    {
        "id": 2,
        "name": "Bob",
        "score": 87.3,
        "active": False,
        "metadata": {"key": "other"}
    },
    {
        "id": 3,
        "name": "Charlie",
        "score": None,
        "active": True
    }
]

# Define fieldnames - optional parameter, can be None or explicit list
fieldnames = ["id", "name", "score", "active", "metadata"]

# Construct path for output CSV
csv_path = Path(temp_dir) / "output.csv"

ARGS = {
    "path": csv_path,
    "rows": rows,
    "fieldnames": fieldnames
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
write_json Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("7cb5283783868c23")
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 PosixPath. 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 json
from pathlib import Path
from pydantic import BaseModel

# Create a simple Pydantic model to test model_dump
class SimpleModel(BaseModel):
    name: str
    value: int
    path: Path

# Create test data
test_model = SimpleModel(name="test", value=42, path=Path("/tmp/test"))

test_data = {
    "string": "hello",
    "number": 123,
    "float": 45.67,
    "list": [1, 2, 3],
    "nested": {
        "key": "value",
        "model": test_model,
    },
    "path": Path("/some/path"),
    "tuple": (1, 2, 3),
    "set": {1, 2, 3},
}

ARGS = {
    "path": "/tmp/test_output/data.json",
    "data": test_data,
    "indent": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
write_pyvis_html Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("d52b043bbbd9a3c7")
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 PosixPath. 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 networkx as nx
from pathlib import Path
import tempfile

# Create a simple MultiDiGraph with various node types
graph = nx.MultiDiGraph()

# Add nodes with different types from COLOR_BY_TYPE
node_types = ['Paper', 'Method', 'Task', 'Dataset', 'Metric', 'Assumption', 
              'Result', 'Limitation', 'FailureCondition', 'Claim', 'Gap', 'Hypothesis']

for i, ntype in enumerate(node_types):
    graph.add_node(f"node_{i}", label=f"Label {i}", type=ntype)

# Add some edges with relations
graph.add_edge("node_0", "node_1", key=0, relation="uses")
graph.add_edge("node_1", "node_2", key=0, relation="evaluates")
graph.add_edge("node_2", "node_3", key=0, relation="on")
graph.add_edge("node_3", "node_4", key=0, relation="measures")
graph.add_edge("node_0", "node_5", key=0, relation="assumes")

# Create a temporary output path
temp_dir = tempfile.mkdtemp()
output_path = Path(temp_dir) / "graph_visualization.html"

ARGS = {
    "graph": graph,
    "output_path": output_path,
    "max_nodes": 500
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, pyvis — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
write_text Ran
ran; our contract draft was wrong, not the code
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("e68bafb350668e32")
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 PosixPath. 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

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

# Define arguments for write_text function
path = str(Path(temp_dir) / "test_file.txt")
text = "This is a test string content"

ARGS = {
    "path": path,
    "text": text,
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
_resolve_legacy_activation Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("a8365d7b5c2562c1")
How it ran

no invocation recorded.

_resolve_profile_activation Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("59b9ba25b78b03b7")
How it ran

no invocation recorded.

_run_detector Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("75de469192fc268d")
How it ran

no invocation recorded.

add_gap_nodes Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("bb134125988d9921")
How it ran

no invocation recorded.

detect_gaps Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("868fb311a4f7d5bb")
How it ran

no invocation recorded.

export_graph Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("32cc20b6d43cb0f5")
How it ran

no invocation recorded.

merge_strict_thresholds Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("bdd1d54718d5e6d7")
How it ran

no invocation recorded.

resolve_motif_activation Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("e152cef3ea78469f")
How it ran

no invocation recorded.

run_all_motif_queries Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("b2c432f5adfc00bd")
How it ran

no invocation recorded.

stable_id Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("37b58d435c0540df")
How it ran

no invocation recorded.

unresolved_tradeoff Not yet run
unverified (harvested, no recorded run)
SarveshVGharat/structural-gap-hypothesis-agent/src/sgha/gap_detection.py
code served (permissive licence) · get_code("2b667228e0f42ce7")
How it ran

no invocation recorded.

Also present in other papers' code

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

Recent efforts toward fully automated AI scientists have demonstrated that language-model agents can generate hypotheses, execute experiments, and draft scientific manuscripts. However, during the early stages of research, when research problems are formulated, these AI scientists often rely heavily on proprietary frontier models. Their proposals are shaped by opaque parametric knowledge and by literature searches conditioned on the proposals themselves. Such knowledge is effectively a black box, and this dependence makes the evidential basis and validity of generated research problems difficult to audit and leaves the process vulnerable to model-specific hallucinations and biases. Furthermore, if proprietary research materials are transmitted to external APIs, the use of these models creates confidentiality, privacy, and data-governance concerns. We introduce the Structural Gap Hypothesis Agent (SGHA), a fully automated, corpus-first research-problem discovery system that runs entirely on a local LLM. SGHA structures a scientific literature corpus into evidence-linked paper objects and a typed evidence graph, detects unresolved structural patterns across papers, screens candidate gaps before formulation, and produces traceable research-problem families. In particular, it is able to output assumptions, objectives, success criteria, and remaining ambiguities. All LLM-based components of SGHA are executed using a locally served open-weight 9B language model, without requiring proprietary frontier-model APIs. We compare SGHA with the AI Scientist-v2 idea formulation module in five machine-learning domains. Our results suggest that explicit corpus structure and evidence-constrained reasoning can support promising, inspectable research-problem formulation without relying on frontier models during generation or verification. github.com/SarveshVGharat/structural-gap-hypothesis-agent

For agents

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

get_harvested_code_for_paper("2608.17501")
get_code_for_paper("2608.17501")
have("2608.17501")

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

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

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

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

Connect an agent — have() is free.