SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06442 · 2022

Can Pretrained Language Models (Yet) Reason Deductively?

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 5 have no contract verdict; 0 failures of our instrument; 1 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/2210.06442.json · badge: /api/ran/2210.06442.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
cambridgeltl/deductive_reasoning_probing canonical (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
get_entity_mapping Ran
ran on a synthesized input
cambridgeltl/deductive_reasoning_probing/src/probe.py
code served (permissive licence) · get_code("3cd228d6f6380e1a")
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 pickle
import os
import tempfile

# Create temporary directory for pickle files
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, 'obj'), exist_ok=True)
os.chdir(temp_dir)

# Sample entities with tab-separated format: id\tterm1\tterm2\t...
entities = [
    "E001\tprotein\thuman protein",
    "E002\tgene\thuman gene\tDNA sequence",
    "E003\tdisease\tcancer\tmalignant"
]

ARGS = {
    'entities': entities,
    'save_dict': False,
    'name': None
}
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 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
get_relation_mapping Ran
ran on a synthesized input
cambridgeltl/deductive_reasoning_probing/src/probe.py
code served (permissive licence) · get_code("8ede69c94d5e4fca")
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 os
import tempfile
import shutil

# Create a temporary directory for 'obj' folder
temp_dir = tempfile.mkdtemp()
obj_dir = os.path.join(temp_dir, 'obj')
os.makedirs(obj_dir, exist_ok=True)

# Change to temp directory so pickle can write files
original_dir = os.getcwd()
os.chdir(temp_dir)

try:
    # Define test relations as strings with tab-separated format
    # Format: id\tterm1\tterm2\tterm3...
    relations = [
        "rel_001\tparent\tmother\tfather",
        "rel_002\tchild\tson\tdaughter",
        "rel_003\tsibling\tbrother\tsister"
    ]
    
    ARGS = {
        'relations': relations,
        'save_dict': False,
        'name': None
    }

finally:
    # Cleanup: restore original directory and remove temp files
    os.chdir(original_dir)
    shutil.rmtree(temp_dir, ignore_errors=True)
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 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
process_chunk_data Ran
ran on a synthesized input
cambridgeltl/deductive_reasoning_probing/src/download_wikipedia.py
code served (permissive licence) · get_code("97faab831f3d1065")
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 re

alphabets = '([A-Za-z])'
prefixes = '(Mr|St|Mrs|Ms|Dr)[.]'
suffixes = '(Inc|Ltd|Jr|Sr|Co)'
starters = '(Mr|Mrs|Ms|Dr|He\\s|She\\s|It\\s|They\\s|Their\\s|Our\\s|We\\s|But\\s|However\\s|That\\s|This\\s|Wherever)'
acronyms = '([A-Z][.][A-Z][.](?:[A-Z][.])?)'
websites = '[.](com|net|org|io|gov)'

def split_into_sentences(text):
    text = ' ' + text + '  '
    text = text.replace('\n', ' ')
    text = re.sub(prefixes, '\\1<prd>', text)
    text = re.sub(websites, '<prd>\\1', text)
    if 'Ph.D' in text:
        text = text.replace('Ph.D.', 'Ph<prd>D<prd>')
    text = re.sub('\\s' + alphabets + '[.] ', ' \\1<prd> ', text)
    text = re.sub(acronyms + ' ' + starters, '\\1<stop> \\2', text)
    text = re.sub(alphabets + '[.]' + alphabets + '[.]' + alphabets + '[.]', '\\1<prd>\\2<prd>\\3<prd>', text)
    text = re.sub(alphabets + '[.]' + alphabets + '[.]', '\\1<prd>\\2<prd>', text)
    text = re.sub(' ' + suffixes + '[.] ' + starters, ' \\1<stop> \\2', text)
    text = re.sub(' ' + suffixes + '[.]', ' \\1<prd>', text)
    text = re.sub(' ' + alphabets + '[.]', ' \\1<prd>', text)
    if '"' in text:
        text = text.replace('."', '".')
    if '"' in text:
        text = text.replace('."', '".')
    if '!' in text:
        text = text.replace('!"', '"!')
    if '?' in text:
        text = text.replace('?"', '"?')
    text = text.replace('.', '.<stop>')
    text = text.replace('?', '?<stop>')
    text = text.replace('!', '!<stop>')
    text = text.replace('<prd>', '.')
    sentences = text.split('<stop>')
    sentences = sentences[:-1]
    sentences = [s.strip() for s in sentences]
    return sentences

def process_chunk_data(item, stop_prefix_list):
    article = item['text']
    article_list = article.split('\n')
    res_list = []
    break_flag = False
    for text in article_list:
        for prefix in stop_prefix_list:
            if text.startswith(prefix):
                break_flag = True
        if len(text.split()) < 3:
            pass
        else:
            res_list.append(text)
        if break_flag:
            break
    sentence_list = []
    for text in res_list:
        one_sen_list = split_into_sentences(text)
        for sen in one_sen_list:
            if len(sen) < 3:
                pass
            else:
                sentence_list.append(sen)
    return sentence_list

ARGS = {
    'item': {
        'text': 'This is a test article.\nDr. Smith is a doctor. He studies medicine.\nREFERENCES:\nSome reference text here.'
    },
    'stop_prefix_list': ['REFERENCES:', 'BIBLIOGRAPHY:', 'NOTES:']
}
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 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
process_eval_data Ran
ran on a synthesized input
cambridgeltl/deductive_reasoning_probing/src/util.py
code served (permissive licence) · get_code("2300c86aa6df36b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, 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 json
import tempfile
import os

# Create a temporary file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False)

# Write test data
test_data = [
    {'text': 'This is a premise [SEP] This is a conclusion', 'label': 'True'},
    {'text': 'Another premise [SEP] Another conclusion', 'label': 'False'},
    {'text': 'Single text without separator', 'label': 'True'},
]

for entry in test_data:
    temp_file.write(json.dumps(entry) + '\n')

temp_file.close()

# Define ARGS
ARGS = {
    'path': temp_file.name
}
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 tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_into_sentences Ran
ran on a synthesized input
cambridgeltl/deductive_reasoning_probing/src/download_wikipedia.py
code served (permissive licence) · get_code("553e04d1ebfd0daa")
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 re

alphabets = '([A-Za-z])'

prefixes = '(Mr|St|Mrs|Ms|Dr)[.]'

suffixes = '(Inc|Ltd|Jr|Sr|Co)'

starters = '(Mr|Mrs|Ms|Dr|He\\s|She\\s|It\\s|They\\s|Their\\s|Our\\s|We\\s|But\\s|However\\s|That\\s|This\\s|Wherever)'

acronyms = '([A-Z][.][A-Z][.](?:[A-Z][.])?)'

websites = '[.](com|net|org|io|gov)'

def split_into_sentences(text):
    text = ' ' + text + '  '
    text = text.replace('\n', ' ')
    text = re.sub(prefixes, '\\1<prd>', text)
    text = re.sub(websites, '<prd>\\1', text)
    if 'Ph.D' in text:
        text = text.replace('Ph.D.', 'Ph<prd>D<prd>')
    text = re.sub('\\s' + alphabets + '[.] ', ' \\1<prd> ', text)
    text = re.sub(acronyms + ' ' + starters, '\\1<stop> \\2', text)
    text = re.sub(alphabets + '[.]' + alphabets + '[.]' + alphabets + '[.]', '\\1<prd>\\2<prd>\\3<prd>', text)
    text = re.sub(alphabets + '[.]' + alphabets + '[.]', '\\1<prd>\\2<prd>', text)
    text = re.sub(' ' + suffixes + '[.] ' + starters, ' \\1<stop> \\2', text)
    text = re.sub(' ' + suffixes + '[.]', ' \\1<prd>', text)
    text = re.sub(' ' + alphabets + '[.]', ' \\1<prd>', text)
    if '"' in text:
        text = text.replace('."', '".')
    if '"' in text:
        text = text.replace('."', '".')
    if '!' in text:
        text = text.replace('!"', '"!')
    if '?' in text:
        text = text.replace('?"', '"?')
    text = text.replace('.', '.<stop>')
    text = text.replace('?', '?<stop>')
    text = text.replace('!', '!<stop>')
    text = text.replace('<prd>', '.')
    sentences = text.split('<stop>')
    sentences = sentences[:-1]
    sentences = [s.strip() for s in sentences]
    return sentences


ARGS = {
    'text': 'Hello world. This is a test. Dr. Smith works at ABC Inc. Visit us at example.com for more information!'
}
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 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
load_obj Not yet run
unverified (harvested, no recorded run)
cambridgeltl/deductive_reasoning_probing/src/probe.py
code served (permissive licence) · get_code("65f9aa843a9ae237")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
load_obj 1 other paper
1 dated earlier
2107.03663 (2021-07)
Graph and Recurrent Neural Network-based Vehicle Trajectory Prediction For Highway Driving

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

Acquiring factual knowledge with Pretrained Language Models (PLMs) has attracted increasing attention, showing promising performance in many knowledge-intensive tasks. Their good performance has led the community to believe that the models do possess a modicum of reasoning competence rather than merely memorising the knowledge. In this paper, we conduct a comprehensive evaluation of the learnable deductive (also known as explicit) reasoning capability of PLMs. Through a series of controlled experiments, we posit two main findings. (i) PLMs inadequately generalise learned logic rules and perform inconsistently against simple adversarial surface form edits. (ii) While the deductive reasoning fine-tuning of PLMs does improve their performance on reasoning over unseen knowledge facts, it results in catastrophically forgetting the previously learnt knowledge. Our main results suggest that PLMs cannot yet perform reliable deductive reasoning, demonstrating the importance of controlled examinations and probing of PLMs' reasoning abilities; we reach beyond (misleading) task performance, revealing that PLMs are still far from human-level reasoning capabilities, even for simple deductive tasks.

For agents

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

get_harvested_code_for_paper("2210.06442")
get_code_for_paper("2210.06442")
have("2210.06442")

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

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

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

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

Connect an agent — have() is free.