CoolFace
Datasetpublic

AxiomicLabs/LogicMark

LogicMark A procedurally generated benchmark for evaluating symbolic logic in language models. Each problem presents a set of variable equality/inequality premises and asks the model to identify which conclusion necessarily follows. Unlike knowledge-based benchmarks, LogicMark contains no facts a model could have memorised from pretraining. Every problem is generated fresh from abstract variable names (a, b, c, ...), so a model cannot pattern-match to training data - it must… See the full description on the dataset page: https://huggingface.co/datasets/AxiomicLabs/LogicMark.

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
2likes342downloads
Dataset Card

[image]

LogicMark

A procedurally generated benchmark for evaluating symbolic logic in language models. Each problem presents a set of variable equality/inequality premises and asks the model to identify which conclusion necessarily follows.

Unlike knowledge-based benchmarks, LogicMark contains no facts a model could have memorised from pretraining. Every problem is generated fresh from abstract variable names (a, b, c, ...), so a model cannot pattern-match to training data - it must actually reason. This makes LogicMark a direct probe of intrinsic reasoning capability: the logical structure that has been built into the model's weights through training, independent of world knowledge or surface-level heuristics.

Evaluation is log-likelihood multiple-choice — no chain-of-thought, no prompting tricks. Models are scored purely on how well they assign probability to the correct completion.


Benchmark Results (10000 examples)

Evaluated using average log-likelihood over ending tokens, normalised by length. Random chance = 25%.

CompanyModelParams1-hop2-hop3-hop4-hop5-hopAvg
AlibabaQwen2.5-Math-1.5B1.5B51.10%56.47%50.40%44.60%47.40%51.73%
Axiomic LabsGPT-X2-125M125M69.00%48.98%48.76%41.07%42.50%49.09%
HuggingFaceSmolLM2-135M135M78.70%50.72%43.16%38.47%39.10%48.6%
EleutherAIpythia-2.8b2.8B79.90%51.73%40.56%37.93%37.50%48.26%
AlibabaQwen2.5-3B3.1B47.10%53.33%47.68%41.13%40.80%48.21%
AlibabaQwen2.5-1.5B1.5B48.30%50.42%46.36%42.00%43.00%47.19%
HuggingFaceSmolLM2-1.7B1.7B70.50%51.08%37.64%35.13%37.10%45.87%
AlibabaQwen2.5-Coder-1.5B1.5B46.70%49.93%43.48%38.73%42.60%45.58%
EleutherAIGPT-neo-125m125M72.10%50.58%36.96%34.47%36.00%45.45%
FacebookMobileLLM-R1-140M-base140M68.00%48.98%38.96%34.00%38.10%45.04%
EleutherAIpythia-31m30M63.90%49.60%37.84%35.40%37.40%44.74%
OpenAIgpt2124M56.60%51.42%36.88%35.47%37.50%44.52%
OpenAIgpt2-medium355M57.50%51.42%36.92%35.47%36.10%44.48%
OpenAIgpt2-xl1.6B58.60%49.55%37.76%36.00%38.00%44.32%
HuggingFaceSmolLM-135M135M58.80%50.28%36.36%34.93%35.90%43.91%
AlibabaQwen2.5-0.5B494M48.60%49.10%39.60%37.53%38.40%43.87%
FacebookOPT-125M125M59.40%49.53%36.68%35.40%36.20%43.85%
Axiomic LabsGPT-X-125M125M57.30%49.45%37.16%35.33%37.10%43.81%
EleutherAIpythia-160m162M56.10%41.33%32.68%30.93%34.20%38.37%
EleutherAIpythia-70m70M44.00%38.70%30.48%28.67%29.90%34.79%

Task Format

If:
a = g
e != f
b != g
d = h
c = g
a != b
d = e
a = e

Then
A. c = h
B. c != h
C. c != e
D. b = h

The model must select the option that is logically entailed by the premises. Distractors include the flipped version of the correct answer and false statements drawn from the same variable set.


Hop Depth

Each problem is tagged with a hop depth — the minimum number of inference steps required to derive the correct answer from the premises:

  • 1-hop: answer is directly stated as a premise
  • 2-hop: requires one transitive step (e.g. a=b, b=ca=c)
  • 3-hop: requires two transitive steps
  • 4-hop+: longer inference chains

The current dataset (1000 problems) targets the following distribution:

HopTarget
110%
240%
325%
415%
510%

Graph Styles

Premises are generated using six equality graph topologies, each producing different reasoning patterns:

StyleDescription
chainVariables linked in a linear sequence
starOne central variable connected to many others
clustersGroups of variables internally linked
treeBinary tree topology — maximises chain depth per variable
bipartiteEdges only cross between two halves — same-side equalities are structurally impossible
mixedRandom combination of the above

Generator

baseloggen_v2.py — full generator with hop depth control and equality type balancing.

python
from baseloggen_v2 import Config, generate_dataset, to_benchmark_format

cfg = Config(
    limit=1000,
    min_vars=4,
    max_vars=8,
    min_eq=2,
    max_eq=5,
    min_neq=1,
    max_neq=3,
    num_choices=4,
    min_answer_hop=2,
    target_hop_dist={1: 0.10, 2: 0.40, 3: 0.25, 4: 0.15, 5: 0.10},
    styles=("chain", "star", "clusters", "tree", "bipartite", "mixed"),
    seed=42,
)

dataset = generate_dataset(cfg)
formatted = [to_benchmark_format(p, i) for i, p in enumerate(dataset)]

Key Config Parameters

ParameterDescription
min_answer_hopMinimum hop depth for the correct answer (suppresses trivial problems)
target_hop_distDict mapping hop depth → fraction. Generator samples each bucket exactly.
stylesTuple of graph topologies to sample from

Design Decisions

Equality type balance — correct answers are 50/50 sampled from = and != statements to prevent models from exploiting the observation that correct answers tend to be equality statements.

Exact hop targeting — when target_hop_dist is set, each bucket is generated with rejection sampling targeting exactly that hop depth, rather than relying on natural distribution (which heavily favours 2-hop).

Flipped distractor — the negation of the correct answer (e.g. a = ba != b) is always included as a distractor to ensure the model can't win by ignoring inequality structure.


Dataset Format

json
{
  "id": "symbolic_00042",
  "domain": "Symbolic",
  "context": "If:\na = b\nb != c\na = d\n\nThen",
  "options": ["a != c", "d = c", "b = d", "a = c"],
  "answer_index": 0,
  "answer": "a != c",
  "hop_depth": 2
}