SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.findings-naacl.131 · NAACL Findings · 2022

Great Truths are Always Simple: A Rather Simple Knowledge Encoder for Enhancing the Commonsense Reasoning Capacity of Pre-Trained Models

Ji-Rong Wen, Jinhao Jiang, Kun Zhou, Wayne Zhao

Open in the Atlas

Code that ran

13 of 19 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 9 have no contract verdict; 3 failures of our instrument; 6 no recorded run), measured 2026-11-24; 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/2022.findings-naacl.131.json · badge: /api/ran/2022.findings-naacl.131.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
RUCAIBox/SAFE canonical (classifier label)
classifier basis: census
13 ran · 6 no recorded run
FunctionStatusWhere it lives
convert_qajson_to_entailment Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_obqa.py
code served (permissive licence) · get_code("174ae40015de395f")
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

torch.manual_seed(0)

qa_json = {
    'question': {
        'stem': 'What is the capital of France?',
        'choices': [
            {'text': 'Paris', 'label': 'A'},
            {'text': 'London', 'label': 'B'},
            {'text': 'Berlin', 'label': 'C'}
        ]
    },
    'answerKey': 'A'
}

ARGS = {
    'qa_json': qa_json
}
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 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
convert_qajson_to_entailment Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_copa.py
code served (permissive licence) · get_code("5da03dfc3e3bf84f")
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.

# Analyze the function to understand what arguments it needs
# convert_qajson_to_entailment takes:
# 1. content: list - used as content[1], content[2], content[3], content[4]
# 2. label: str - used in string comparisons with '0' and '1'

# The function accesses list indices 1, 2, 3, 4
# content[1] is question_text (string)
# content[2] is prompt (string)
# content[3] is first choice text (string)
# content[4] is second choice text (string)

ARGS = {
    'content': [
        'index_0_unused',
        'What is the capital of France?',
        'The answer is ',
        'Paris',
        'London'
    ],
    'label': '0'
}
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
convert_qajson_to_entailment Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_csqav2.py
code served (permissive licence) · get_code("e6ddb464fb6e9344")
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

torch.manual_seed(0)

qa_json_example = {
    'question': 'What is the capital of France?',
    'id': 1,
    'topic_prompt': 'Paris is a city in France.',
    'answer': 'yes'
}

ARGS = {
    'qa_json': qa_json_example
}
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 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
convert_qajson_to_entailment Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_hswag.py
code served (permissive licence) · get_code("b15e4ac9ce1d0f30")
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.

# Setup code to construct valid arguments for convert_qajson_to_entailment

ARGS = {
    'line': {
        'ctx_a': '  What is the capital of France?  ',
        'ctx_b': '  paris is known as the city of light  ',
        'endings': [
            'because it has beautiful architecture',
            'because it is located in Europe',
            'because it has a famous tower',
            'because it is a major city'
        ],
        'ind': 'Q001'
    },
    'label': '0'
}
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
convert_qajson_to_entailment Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_phys.py
code served (permissive licence) · get_code("56d6a0d92fddcf21")
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

ARGS = {
    'qa_json': {
        'goal': 'What is the capital of France?',
        'sol1': 'Paris',
        'sol2': 'London'
    },
    'label': '0'
}
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 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
create_hypothesis Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_csqa.py
code served (permissive licence) · get_code("e4b000b919d28344")
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 re

BLANK_STR = '___'

def create_hypothesis(fitb: str, choice: str, ans_pos: bool) -> str:
    if '. ' + BLANK_STR in fitb or fitb.startswith(BLANK_STR):
        choice = choice[0].upper() + choice[1:]
    else:
        choice = choice.lower()
    if not fitb.endswith(BLANK_STR):
        choice = choice.rstrip('.')
    if not ans_pos:
        try:
            hypothesis = re.sub('__+', choice, fitb)
        except:
            print(choice, fitb)
        return hypothesis
    choice = choice.strip()
    m = re.search('__+', fitb)
    start = m.start()
    length = len(choice) - 1 if fitb.endswith(BLANK_STR) and choice[-1] in ['.', '?', '!'] else len(choice)
    hypothesis = re.sub('__+', choice, fitb)
    return (hypothesis, (start, start + length))


ARGS = {
    'fitb': 'The quick ___ fox jumps over the lazy dog',
    'choice': 'brown',
    'ans_pos': False
}
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 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
create_output_dict Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_obqa.py
code served (permissive licence) · get_code("345456d568545c8e")
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

torch.manual_seed(0)

ARGS = {
    'input_json': {'existing_key': 'existing_value'},
    'statement': 'This is a test statement',
    'label': True
}
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 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
create_output_dict Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/convert_csqav2.py
code served (permissive licence) · get_code("2e88c3ebf08d8942")
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

torch.manual_seed(0)

ARGS = {
    'statement': 'What is the capital of France?',
    'choice': 'Paris',
    'label': True
}
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 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
del_pos Ran
ran on a synthesized input
RUCAIBox/SAFE/utils/conceptnet.py
code served (permissive licence) · get_code("5f4eefd99c11e698")
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 numpy as np

# Create valid arguments for the del_pos function
ARGS = {
    "s": "example/n"
}
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 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
dropout_mask Ran
ran; our contract draft was wrong, not the code
RUCAIBox/SAFE/utils/layers.py
code served (permissive licence) · get_code("866c784c24ba2fa8")
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 tensor to use as x
x = torch.randn(2, 4)

# Define arguments
ARGS = {
    'x': x,
    'sz': (2, 4),
    'p': 0.5
}
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
gelu Ran
ran, honoured the contract we drafted
RUCAIBox/SAFE/utils/layers.py
pointer only (licence: MIT); the stored copy get_code serves, from qshi95/lergv, is pointer only (licence: NONE) · get_code("b75e9c793d2a286a")
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 qshi95/lergv, 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. A run is recorded.

get_fitb_from_question Ran
ran; our contract draft was wrong, not the code
RUCAIBox/SAFE/utils/convert_csqa.py
code served (permissive licence) · get_code("a9a454bf4414e3fe")
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.

# Setup code for replace_wh_word_with_blank and get_fitb_from_question

# The function takes a question_text string and returns a FITB (Fill In The Blank) version
# Let's create test cases for different scenarios

ARGS = {
    "question_text": "What is the capital of France?"
}
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 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
make_one_hot Ran
ran; our contract draft was wrong, not the code
RUCAIBox/SAFE/modeling/modeling_qagnn.py
code served (permissive licence) · get_code("440036c58abd9ccc")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create labels: a LongTensor of shape (2,) with class indices
# Each value should be between 0 and C-1
labels = torch.LongTensor([0, 2])
labels = Variable(labels)

# Number of classes
C = 4

ARGS = {
    "labels": labels,
    "C": C,
}
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
calculate_loss Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/qagnn.py
code served (permissive licence) · get_code("8d4cd6c11b3d961f")
How it ran

no invocation recorded.

construct_graph Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/utils/conceptnet.py
code served (permissive licence) · get_code("be8c35c9c1d52b66")
How it ran

no invocation recorded.

convert_qajson_to_entailment Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/utils/convert_csqa.py
code served (permissive licence) · get_code("15baaf34a0e42ec6")
How it ran

no invocation recorded.

evaluate_accuracy Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/qagnn.py
code served (permissive licence) · get_code("2839d26e6f9412c8")
How it ran

no invocation recorded.

glove_init Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/utils/conceptnet.py
code served (permissive licence) · get_code("9dcf00b849de8977")
How it ran

no invocation recorded.

masked_softmax Not yet run
unverified (harvested, no recorded run)
RUCAIBox/SAFE/utils/layers.py
code served (permissive licence) · get_code("3841430a72ff67fa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 14 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 11 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
gelu 51 other papers
30 dated earlier, 14 later, 7 same year, order not determinable · 8 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 48 more not named here
del_pos 5 other papers
2 dated earlier, 2 later, 1 same year, order not determinable
1909.02151 (2019-09)
KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
and 2 more not named here
construct_graph 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
2023.findings-emnlp.540 (2023 (year only))
Open-ended Commonsense Reasoning with Unrestricted Answer Scope
and 1 more not named here
dropout_mask 4 other papers
2 dated earlier, 1 later, 1 same year, order not determinable
2021.findings-emnlp.130 (2021 (year only))
Cross-lingual Transfer for Text Classification with Dictionary-based Heterogeneous Graph
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
and 1 more not named here
get_fitb_from_question 4 other papers
2 dated earlier, 1 later, 1 same year, order not determinable
1909.02151 (2019-09)
KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
and 1 more not named here
glove_init 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
2023.findings-emnlp.540 (2023 (year only))
Open-ended Commonsense Reasoning with Unrestricted Answer Scope
and 1 more not named here
convert_qajson_to_entailment 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
aaai_26578 (2023 (year only))
Relation-Aware Language-Graph Transformer for Question Answering
create_output_dict 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
aaai_26578 (2023 (year only))
Relation-Aware Language-Graph Transformer for Question Answering
masked_softmax 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
aaai_26578 (2023 (year only))
Relation-Aware Language-Graph Transformer for Question Answering
convert_qajson_to_entailment 2 other papers
1 later, 1 same year, order not determinable
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
aaai_26578 (2023 (year only))
Relation-Aware Language-Graph Transformer for Question Answering
create_hypothesis 2 other papers
1 dated earlier, 1 later
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
aaai_26578 (2023 (year only))
Relation-Aware Language-Graph Transformer for Question Answering
make_one_hot 2 other papers
1 dated earlier, 1 same year, order not determinable
2104.06378 (2021-04)
QA-GNN: Reasoning with Language Models and Knowledge Graphs for Question Answering
2210.09338 (2022-10)
Deep Bidirectional Language-Knowledge Graph Pretraining
calculate_loss 1 other paper
1 same year, order not determinable
2205.01841 (2022-05)
Great Truths are Always Simple: A Rather Simple Knowledge Encoder for Enhancing the Commonsense Reasoning Capacity of Pre-Trained Models
evaluate_accuracy 1 other paper
1 same year, order not determinable
2205.01841 (2022-05)
Great Truths are Always Simple: A Rather Simple Knowledge Encoder for Enhancing the Commonsense Reasoning Capacity of Pre-Trained 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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Commonsense reasoning in natural language is a desired ability of artificial intelligent systems. For solving complex commonsense reasoning tasks, a typical solution is to enhance pre-trained language models (PTMs) with a knowledge-aware graph neural network (GNN) encoder that models a commonsense knowledge graph (CSKG). Despite the effectiveness, these approaches are built on heavy architectures, and can't clearly explain how external knowledge resources improve the reasoning capacity of PTMs. Considering this issue, we conduct a deep empirical analysis, and find that it is indeed relation features from CSKGs (but not node features) that mainly contribute to the performance improvement of PTMs. Based on this finding, we design a simple MLP-based knowledge encoder that utilizes statistical relation paths as features. Extensive experiments conducted on five benchmarks demonstrate the effectiveness of our approach, which also largely reduces the parameters for encoding CSKGs. Our codes and data are publicly available at https://github.com/RUCAIBox/SAFE.

For agents

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

get_harvested_code_for_paper("2022.findings-naacl.131")
get_code_for_paper("2022.findings-naacl.131")
have("2022.findings-naacl.131")

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

curl https://syntology.ai/api/ran/2022.findings-naacl.131.json

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

[![Syntology run record](https://syntology.ai/api/ran/2022.findings-naacl.131.svg)](https://syntology.ai/paper/2022.findings-naacl.131)

Connect an agent — have() is free.