SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.13956 · 2024

Can You Learn Semantics Through Next-Word Prediction? The Case of Entailment

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2402.13956.json · badge: /api/ran/2402.13956.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
zhaofengwu/entailment-from-lm canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
featurize Ran
ran, honoured the contract we drafted
zhaofengwu/entailment-from-lm/trained_classifier.py
pointer only (licence: NONE) · get_code("151c44d02c12763d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaofengwu/entailment-from-lm 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.

map_labels Ran
ran, honoured the contract we drafted
zhaofengwu/entailment-from-lm/trained_classifier.py
pointer only (licence: NONE) · get_code("e065c52100664b5f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaofengwu/entailment-from-lm 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.

max_model_length Ran
ran, honoured the contract we drafted
zhaofengwu/entailment-from-lm/src/entailment_tester.py
pointer only (licence: NONE) · get_code("00742a1f953f232a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaofengwu/entailment-from-lm 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.

main Not yet run
unverified (harvested, no recorded run)
zhaofengwu/entailment-from-lm/write_nli_data.py
pointer only (licence: NONE) · get_code("79fcad06171a7835")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaofengwu/entailment-from-lm 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.

read_data Not yet run
unverified (harvested, no recorded run)
zhaofengwu/entailment-from-lm/src/utils.py
pointer only (licence: NONE) · get_code("fac32c2ba2247307")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhaofengwu/entailment-from-lm 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.

Also present in other papers' code

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

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-22.

Repositories linked to this paper

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

Abstract

Do LMs infer the semantics of text from co-occurrence patterns in their training data? Merrill et al. (2022) argue that, in theory, sentence co-occurrence probabilities predicted by an optimal LM should reflect the entailment relationship of the constituent sentences, but it is unclear whether probabilities predicted by neural LMs encode entailment in this way because of strong assumptions made by Merrill et al. (namely, that humans always avoid redundancy). In this work, we investigate whether their theory can be used to decode entailment relations from neural LMs. We find that a test similar to theirs can decode entailment relations between natural sentences, well above random chance, though not perfectly, across many datasets and LMs. This suggests LMs implicitly model aspects of semantics to predict semantic effects on sentence co-occurrence patterns. However, we find the test that predicts entailment in practice works in the opposite direction to the theoretical test. We thus revisit the assumptions underlying the original test, finding its derivation did not adequately account for redundancy in human-written text. We argue that better accounting for redundancy related to explanations might derive the observed flipped test and, more generally, improve computational models of speakers in linguistics.

For agents

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

get_harvested_code_for_paper("2402.13956")
get_code_for_paper("2402.13956")
have("2402.13956")

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

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

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

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

Connect an agent — have() is free.