SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_29850 · AAAI · 2024

Fact-Driven Logical Reasoning for Machine Reading Comprehension

Hai Zhao, Zhuosheng Zhang, Siru Ouyang

Open in the Atlas

Code that ran

3 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 5 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/aaai_29850.json · badge: /api/ran/aaai_29850.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
ozyyshr/FocalReasoner canonical (classifier label)
classifier basis: census
3 ran · 5 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran on a synthesized input
ozyyshr/FocalReasoner/run_multiple_choice_debug.py
code served (permissive licence) · get_code("0b1a6983216a5000")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a batch of tuples matching the function's expectations
# Each tuple should have: (input_ids, input_mask, segment_ids, label_ids, query_len, opt_len, svo_ids, lens, doc_len)

batch_size = 2
seq_len = 5
num_labels = 3

# Create individual samples
sample1 = (
    torch.randint(0, 100, (seq_len,)),  # input_ids
    torch.ones(seq_len),                 # input_mask
    torch.zeros(seq_len),                # segment_ids
    torch.tensor([1]),                   # label_ids
    torch.tensor([2]),                   # query_len
    torch.tensor([3]),                   # opt_len
    torch.randint(0, 10, (4,)),         # svo_ids
    torch.tensor([seq_len]),             # lens
    torch.tensor([4])                    # doc_len
)

sample2 = (
    torch.randint(0, 100, (seq_len,)),  # input_ids
    torch.ones(seq_len),                 # input_mask
    torch.zeros(seq_len),                # segment_ids
    torch.tensor([2]),                   # label_ids
    torch.tensor([1]),                   # query_len
    torch.tensor([2]),                   # opt_len
    torch.randint(0, 10, (4,)),         # svo_ids
    torch.tensor([seq_len]),             # lens
    torch.tensor([5])                    # doc_len
)

batch = [sample1, sample2]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_position_ids_from_input_ids Ran
ran; our contract draft was wrong, not the code
ozyyshr/FocalReasoner/modeling_roberta_svo_graph.py
code served (permissive licence) · get_code("da1c54dffed5d60c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create input_ids tensor with shape (batch_size=2, seq_length=4)
# Values should include some padding tokens and some non-padding tokens
input_ids = torch.tensor([
    [0, 1, 2, 0],      # batch 1: has padding_idx (0) at positions 0 and 3
    [1, 2, 0, 1]       # batch 2: has padding_idx (0) at position 2
])

# padding_idx is the token ID that represents padding
padding_idx = 0

# past_key_values_length represents how many tokens were processed before
past_key_values_length = 0

ARGS = {
    "input_ids": input_ids,
    "padding_idx": padding_idx,
    "past_key_values_length": past_key_values_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getVerbsFromConjunctions Ran
ran on a synthesized input
ozyyshr/FocalReasoner/svo_extraction.py
code served (permissive licence) · get_code("8fc77d1505e815f8")
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

class MockToken:
    def __init__(self, text, pos):
        self.text = text
        self.lower_ = text.lower()
        self.pos_ = pos
        self.rights = []

class MockVerb:
    def __init__(self, text, pos='VERB', rights=None):
        self.text = text
        self.lower_ = text.lower()
        self.pos_ = pos
        self.rights = rights if rights is not None else []

# Create mock token objects with dependency relationships
and_token = MockToken('and', 'CCONJ')
verb1 = MockVerb('run', 'VERB', rights=[and_token, MockVerb('jump', 'VERB', rights=[])])
verb2 = MockVerb('walk', 'VERB', rights=[])

verbs = [verb1, verb2]

ARGS = {
    'verbs': verbs
}
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
getObjsFromConjunctions Not yet run
unverified (harvested, no recorded run)
ozyyshr/FocalReasoner/svo_extraction.py
code served (permissive licence) · get_code("f7f37d3b47c13891")
How it ran

no invocation recorded.

getSubsFromConjunctions Not yet run
unverified (harvested, no recorded run)
ozyyshr/FocalReasoner/svo_extraction.py
pointer only (licence: MIT); the stored copy get_code serves, from Exploration-Lab/IL-PCR, is pointer only (licence: NONE) · get_code("8694d48ea5b10ca2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Exploration-Lab/IL-PCR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

masked_softmax Not yet run
unverified (harvested, no recorded run)
ozyyshr/FocalReasoner/modeling_roberta_debug.py
code served (permissive licence) · get_code("6c63f3823923838f")
How it ran

no invocation recorded.

select_field Not yet run
unverified (harvested, no recorded run)
ozyyshr/FocalReasoner/run_multiple_choice.py
pointer only (licence: MIT); the stored copy get_code serves, from yuweihao/reclor, is pointer only (licence: NONE) · get_code("0a546b305d274996")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yuweihao/reclor, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

simple_accuracy Not yet run
unverified (harvested, no recorded run)
ozyyshr/FocalReasoner/run_multiple_choice.py
code served (permissive licence) · get_code("3c241ecfe3749a6d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 1 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
simple_accuracy 59 other papers
56 dated earlier, 2 later, 1 same year, order not determinable
1506.05865 (2015-06)
LCSTS: A Large Scale Chinese Short Text Summarization Dataset
1509.01626 (2015-09)
Character-level Convolutional Networks for Text Classification *
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 56 more not named here
create_position_ids_from_input_ids 28 other papers
19 dated earlier, 9 same year, order not determinable
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2107.14035 (2021-07)
ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
2201.11732 (2022-01)
IGLUE: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages
and 25 more not named here
select_field 9 other papers
8 dated earlier, 1 same year, order not determinable
1908.05739 (2019-08)
Abductive Commonsense Reasoning
2002.04326 (2020-02)
ReClor: A Reading Comprehension Dataset Requiring Logical Reasoning
2004.04494 (2020-04)
MuTual: A Dataset for Multi-Turn Dialogue Reasoning
and 6 more not named here
getObjsFromConjunctions 1 other paper
1 dated earlier
2307.05260 (2023-07)
U-CREAT: Unsupervised Case Retrieval using Events extrAcTion
getSubsFromConjunctions 1 other paper
1 dated earlier
2307.05260 (2023-07)
U-CREAT: Unsupervised Case Retrieval using Events extrAcTion

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 years have witnessed an increasing interest in training machines with reasoning ability, which deeply relies on accurately and clearly presented clue forms. The clues are usually modeled as entity-aware knowledge in existing studies. However, those entity-aware clues are primarily focused on commonsense, making them insufficient for tasks that require knowledge of temporary facts or events, particularly in logical reasoning for reading comprehension. To address this challenge, we are motivated to cover both commonsense and temporary knowledge clues hierarchically. Specifically, we propose a general formalism of knowledge units by extracting backbone constituents of the sentence, such as the subject-verb-object formed "facts". We then construct a supergraph on top of the fact units, allowing for the benefit of sentence-level (relations among fact groups) and entity-level interactions (concepts or actions inside a fact). Experimental results on logical reasoning benchmarks and dialogue modeling datasets show that our approach improves the baselines substantially, and it is general across backbone models. Code is available at https://github.com/ozyyshr/FocalReasoner.

For agents

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

get_harvested_code_for_paper("aaai_29850")
get_code_for_paper("aaai_29850")
have("aaai_29850")

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

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

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

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

Connect an agent — have() is free.