SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.10144 · 2024

NLP Verification: Towards a General Methodology for Certifying Robustness

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 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 0 have no contract verdict; 2 failures of our instrument; 0 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/2403.10144.json · badge: /api/ran/2403.10144.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
antonionlp/antonio canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
load_align_mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antonionlp/antonio/src/data.py
code served (permissive licence) · get_code("a5afe646482fd175")
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 ndarray, ndim 2, dtype family float, shape (3, 3) 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 numpy as np
import os
import tempfile

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Create the necessary directory structure
dataset_name = "test_dataset"
encoding_model_name = "test_model"
dataset_path = os.path.join(temp_dir, dataset_name, "embeddings", encoding_model_name)
os.makedirs(dataset_path, exist_ok=True)

# Create sample data - a 4x3 matrix for SVD
# The function uses data.shape and performs SVD on it
data = np.random.randn(4, 3).astype(np.float32)

# Pre-save an align_mat so we can test the load_saved_align_mat=True path
u, s, vh = np.linalg.svd(a=data)
align_mat_saved = np.linalg.solve(a=vh, b=np.eye(len(data[0])))
np.save(os.path.join(dataset_path, "align_mat.npy"), align_mat_saved)

ARGS = {
    "dataset_name": dataset_name,
    "encoding_model_name": encoding_model_name,
    "data": data,
    "load_saved_align_mat": True,
    "path": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) 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
load_data Ran
ran; our contract draft was wrong, not the code
antonionlp/antonio/src/data.py
code served (permissive licence) · get_code("6a132d1af4182cbb")
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. 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 pandas as pd
import numpy as np
import tempfile
import os

# Create temporary directory structure with mock CSV files
temp_dir = tempfile.mkdtemp()
datasets_dir = os.path.join(temp_dir, 'datasets')

# Create ruarobot dataset structure
ruarobot_dir = os.path.join(datasets_dir, 'ruarobot', 'data')
os.makedirs(ruarobot_dir, exist_ok=True)

# Create mock ruarobot CSV files
train_pos_data = pd.DataFrame({
    'text': ['positive sample one', 'positive sample two'],
    'label': ['p', 'p']
})
train_pos_data.to_csv(os.path.join(ruarobot_dir, 'pos.train.csv'), index=False)

train_neg_data = pd.DataFrame({
    'text': ['negative sample one', 'negative sample two'],
    'label': ['n', 'n']
})
train_neg_data.to_csv(os.path.join(ruarobot_dir, 'neg.train.csv'), index=False)

train_amb_data = pd.DataFrame({
    'text': ['ambiguous sample one', 'ambiguous sample two'],
    'label': ['a', 'a']
})
train_amb_data.to_csv(os.path.join(ruarobot_dir, 'amb.train.csv'), index=False)

val_pos_data = pd.DataFrame({
    'text': ['val positive one'],
    'label': ['p']
})
val_pos_data.to_csv(os.path.join(ruarobot_dir, 'pos.val.csv'), index=False)

val_neg_data = pd.DataFrame({
    'text': ['val negative one'],
    'label': ['n']
})
val_neg_data.to_csv(os.path.join(ruarobot_dir, 'neg.val.csv'), index=False)

val_amb_data = pd.DataFrame({
    'text': ['val ambiguous one'],
    'label': ['a']
})
val_amb_data.to_csv(os.path.join(ruarobot_dir, 'amb.val.csv'), index=False)

test_pos_data = pd.DataFrame({
    'text': ['test positive one', 'test positive two'],
    'label': ['p', 'p']
})
test_pos_data.to_csv(os.path.join(ruarobot_dir, 'pos.test.csv'), index=False)

test_neg_data = pd.DataFrame({
    'text': ['test negative one', 'test negative two'],
    'label': ['n', 'n']
})
test_neg_data.to_csv(os.path.join(ruarobot_dir, 'neg.test.csv'), index=False)

test_amb_data = pd.DataFrame({
    'text': ['test ambiguous one', 'test ambiguous two'],
    'label': ['a', 'a']
})
test_amb_data.to_csv(os.path.join(ruarobot_dir, 'amb.test.csv'), index=False)

# Create medical dataset structure
medical_dir = os.path.join(datasets_dir, 'medical', 'data')
os.makedirs(medical_dir, exist_ok=True)

expert_data = pd.DataFrame({
    'query': ['medical query ' + str(i) for i in range(10)],
    'query-label-expert': [1, 2, 3, 0, 0, 1, 2, 3, 0, 0]
})
expert_data.to_csv(os.path.join(medical_dir, 'medicheck-expert.csv'), index=False)

med_neg_data = pd.DataFrame({
    'query': ['negative medical query ' + str(i) for i in range(5)],
    'query-label-expert': [1, 1, 1, 1, 1]
})
med_neg_data.to_csv(os.path.join(medical_dir, 'medicheck-neg.csv'), index=False)

ARGS = {
    'dataset_name': 'ruarobot',
    'path': datasets_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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

Also present in other papers' code

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

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

Machine Learning (ML) has exhibited substantial success in the field of Natural Language Processing (NLP). For example large language models have empirically proven to be capable of producing text of high complexity and cohesion. However, they are prone to inaccuracies and hallucinations. As these systems are increasingly integrated into real-world applications, ensuring their safety and reliability becomes a primary concern. There are safety critical contexts where such models must be robust to variability or attack, and give guarantees over their output. Computer Vision had pioneered the use of formal verification of neural networks for such scenarios and developed common verification standards and pipelines, leveraging precise formal reasoning about geometric properties of data manifolds. In contrast, NLP verification methods have only recently appeared in the literature. While presenting sophisticated algorithms, these papers have not yet crystallised into a common methodology. They are often light on the pragmatical issues of NLP verification and the area remains fragmented. In this paper, we attempt to distil and evaluate general components of an NLP verification pipeline, that emerges from the progress in the field to date. Our contributions are two-fold. Firstly, we propose a general methodology to analyse the effect of the embedding gap, a problem that refers to the discrepancy between verification of geometric subspaces and the semantic meaning of sentences, which the geometric subspaces are supposed to represent. We propose a number of practical NLP methods that can help to quantify the effects of the embedding gap. Secondly, we give a general method for training and verification of neural networks that leverages a more precise geometric estimation of semantic similarity of sentences in the embedding space and helps to overcome the effects of the embedding gap in practice.

For agents

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

get_harvested_code_for_paper("2403.10144")
get_code_for_paper("2403.10144")
have("2403.10144")

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

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

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

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

Connect an agent — have() is free.