SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.14198 · EMNLP · 2023

QA-NatVer: Question Answering for Natural Logic-based Fact Verification

Rami Aly, Andreas Vlachos, Janet Leigh, Marek Strong

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.14198.json · badge: /api/ran/2310.14198.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
r-three/t-few canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
FunctionStatusWhere it lives
fast_walsh_hadamard_torched Ran
ran; our contract draft was wrong, not the code
r-three/t-few/src/models/intrinsic.py
code served (permissive licence) · get_code("86cd0bb77fbf123f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (3, 4, 5) 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)

# Create a tensor with shape that works for the function
# The function requires the axis dimension to be a power of 2
# Let's create a tensor of shape (3, 4, 5) where axis=1 has size 4 (which is 2^2)
x = torch.randn(3, 4, 5)

ARGS = {
    "x": x,
    "axis": 1,
    "normalize": True,
}
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 Tensor, ndim 3, dtype family float, shape (3, 4, 5) — shape (3, 4, 5) 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
modify_with_bitfit Ran
ran; our contract draft was wrong, not the code
r-three/t-few/src/models/bitfit.py
code served (permissive licence) · get_code("93fee8766c612b43")
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 SimpleTransformer. 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 torch.nn as nn
import re

torch.manual_seed(0)

# Create a simple transformer-like model with named modules and layers
class SimpleTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Module()
        self.encoder.layer1 = nn.Linear(4, 3)
        self.encoder.layer2 = nn.Linear(3, 2)
        self.decoder = nn.Module()
        self.decoder.layer1 = nn.Linear(2, 4)
        
        # Manually register submodules to create the hierarchy
        self.add_module('encoder', self.encoder)
        self.add_module('decoder', self.decoder)
        self.encoder.add_module('layer1', self.encoder.layer1)
        self.encoder.add_module('layer2', self.encoder.layer2)
        self.decoder.add_module('layer1', self.decoder.layer1)

transformer = SimpleTransformer()

# Create a config object with regex patterns
class Config:
    def __init__(self):
        # Pattern to match encoder and decoder modules
        self.bitfit_modules = r"(encoder|decoder)"
        # Pattern to match layer1 and layer2
        self.bitfit_layers = r"layer[12]"

config = Config()

ARGS = {
    "transformer": transformer,
    "config": config
}
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 SimpleTransformer — a SimpleTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleTransformer 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
modify_with_lora Ran
ran; our contract draft was wrong, not the code
r-three/t-few/src/models/lora.py
code served (permissive licence) · get_code("ceef2f830a0ed0cd")
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 SimpleTransformer. 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 torch.nn as nn
import re

torch.manual_seed(0)

# Create a simple config class with the required attributes
class Config:
    def __init__(self):
        self.lora_modules = "transformer.layer.*"
        self.lora_layers = "linear"
        self.lora_rank = 2
        self.lora_scaling_rank = 1
        self.lora_init_scale = 0.01

# Create a simple transformer-like model with Linear layers
class SimpleTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.transformer = nn.Module()
        
        # Create layer submodules
        layer0 = nn.Module()
        layer0.linear = nn.Linear(4, 3)
        self.transformer.layer0 = layer0
        
        layer1 = nn.Module()
        layer1.linear = nn.Linear(4, 3)
        self.transformer.layer1 = layer1

# Instantiate the transformer and config
transformer = SimpleTransformer()
config = Config()

ARGS = {
    'transformer': transformer,
    'config': config
}
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 SimpleTransformer — a SimpleTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleTransformer 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
modify_with_prompt_tuning Ran
ran; our contract draft was wrong, not the code
r-three/t-few/src/models/prompt_tuning.py
code served (permissive licence) · get_code("ce3857868c725476")
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 MinimalTransformer. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal embedding layer
class MinimalEmbedding(nn.Module):
    def __init__(self, num_embeddings, embedding_dim):
        super().__init__()
        self.embedding = nn.Embedding(num_embeddings, embedding_dim)
    
    def get_input_embeddings(self):
        return self.embedding
    
    def embed_tokens(self, input_ids):
        return self.embedding(input_ids)
    
    def forward(self, input_ids=None, inputs_embeds=None, attention_mask=None, encoder_attention_mask=None, **kwargs):
        # Mock encoder/decoder forward
        if inputs_embeds is None:
            inputs_embeds = self.embedding(input_ids)
        # Return object with last_hidden_state attribute
        class Output:
            def __init__(self, lhs):
                self.last_hidden_state = lhs
        return Output(inputs_embeds)

# Create a minimal transformer with encoder and decoder
class MinimalTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        # Use distinct dimensions: 7 for vocab, 5 for embedding dim
        self.encoder = MinimalEmbedding(num_embeddings=5003, embedding_dim=5)
        self.decoder = MinimalEmbedding(num_embeddings=5003, embedding_dim=5)

# Create a minimal config
class Config:
    def __init__(self):
        self.prompt_tuning_num_prefix_emb = 3
        self.prompt_tuning_encoder = True
        self.prompt_tuning_decoder = True

# Construct the arguments
transformer = MinimalTransformer()
config = Config()

ARGS = {
    "transformer": transformer,
    "config": config,
}
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 MinimalTransformer — a MinimalTransformer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalTransformer 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
sample_embed Ran
ran, honoured the contract we drafted
r-three/t-few/src/models/prompt_tuning.py
code served (permissive licence) · get_code("2991a4d534850cff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a small embedding module
# The function accesses embed.weight, so we need an nn.Embedding
embed = nn.Embedding(num_embeddings=10, embedding_dim=4)

# Parameters for sampling
sample_size = 2
start_idx = 1
end_idx = 8

ARGS = {
    "embed": embed,
    "sample_size": sample_size,
    "start_idx": start_idx,
    "end_idx": end_idx,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, 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
fastfood_vars Not yet run
unverified (harvested, no recorded run)
r-three/t-few/src/models/intrinsic.py
code served (permissive licence) · get_code("1e24166d952ce221")
How it ran

no invocation recorded.

get_adapter Not yet run
unverified (harvested, no recorded run)
r-three/t-few/src/models/adapters.py
code served (permissive licence) · get_code("8437c16cba343b4d")
How it ran

no invocation recorded.

modify_with_adapters Not yet run
unverified (harvested, no recorded run)
r-three/t-few/src/models/adapters.py
code served (permissive licence) · get_code("e76a3ca72fd3d2d5")
How it ran

no invocation recorded.

random_vars Not yet run
unverified (harvested, no recorded run)
r-three/t-few/src/models/intrinsic.py
code served (permissive licence) · get_code("ff477f580a9ac93f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 0 later) and 2 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
fast_walsh_hadamard_torched 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
fastfood_vars 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
get_adapter 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
modify_with_adapters 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
modify_with_bitfit 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
modify_with_lora 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models
random_vars 1 other paper
1 dated earlier
2202.00828 (2022-02)
Co-training Improves Prompt-based Learning for Large Language Models

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

Fact verification systems assess a claim's veracity based on evidence. An important consideration in designing them is faithfulness, i.e. generating explanations that accurately reflect the reasoning of the model. Recent works have focused on natural logic, which operates directly on natural language by capturing the semantic relation of spans between an aligned claim with its evidence via set-theoretic operators. However, these approaches rely on substantial resources for training, which are only available for high-resource languages. To this end, we propose to use question answering to predict natural logic operators, taking advantage of the generalization capabilities of instruction-tuned language models. Thus, we obviate the need for annotated training data while still relying on a deterministic inference system. In a few-shot setting on FEVER, our approach outperforms the best baseline by 4.3 accuracy points, including a state-of-the-art pre-trained seq2seq natural logic system, as well as a state-of-the-art prompt-based classifier. Our system demonstrates its robustness and portability, achieving competitive performance on a counterfactual dataset and surpassing all approaches without further annotation on a Danish verification dataset. A human evaluation indicates that our approach produces more plausible proofs with fewer erroneous natural logic operators than previous natural logic-based systems. Janet Leigh was incapable of writing Janet Leigh was incapable was incapable of writing Janet Leigh was incapable of writing Janet Leigh She also wrote four books Janet Leigh She also wrote four She also wrote four books Janet Leigh She also wrote four books NatOp Assignment via QA (Sec. 3.2) Is was incapable of writing a negation of She also wrote four books? Proof Selection (Sec. 3.3) Janet Leigh was incapable of writing was incapable of writing

For agents

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

get_harvested_code_for_paper("2310.14198")
get_code_for_paper("2310.14198")
have("2310.14198")

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

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

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

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

Connect an agent — have() is free.