README.md
June 29, 2026 ยท View on GitHub
LLMEval-Logic: A Solver-Verified Chinese Benchmark for Logical Reasoning of LLMs with Adversarial Hardening
Note: For the Chinese version of this README, please refer to README_zh.md.
๐ News
- ๐ [2026-05] Our paper is released on arXiv: arXiv:2605.19597.
- ๐ [2026-05] 80% public release is live. The remaining 20% (50 Base / 36 Hard / 50 rubrics) is held out as a private contamination-resistant test set maintained by Fudan NLP Lab.
๐ Overview
LLMEval-Logic is a Chinese logical reasoning benchmark built through a three-stage audited construction pipeline: (a) trained annotators forward-author each item from a real-world situational scenario rather than templating backward from formulas, (b) each item passes a four-layer normalization pipeline and is double-audited by an expert-developed rubric plus the Z3 SMT solver, and (c) surviving items are elevated through a closed-loop adversarial-hardening agent workflow that filters out items too easy for frontier models. The dataset has two paired splits:
- LLMEval-Logic-Base โ single-question PL & FOL items with Z3-verified answers, gold formalizations, and atom-level NLโFL rubrics (1,400 atoms across 246 items; the public split ships 196 items).
- LLMEval-Logic-Hard โ multi-question / sub-question items obtained by adversarially hardening Base items under six strategies (branching, effective distractors, explicit uncertainty, set-valued output, counterfactual variants, alias/coreference shifts). The strongest evaluated frontier model still only reaches 37.5% Item Accuracy on Hard.
๐๏ธ Project Structure
.
โโโ bench/ the 80% public release
โ โโโ base/ Base items + paired rubrics
โ โ โโโ llmeval_logic_base.json 196 items + gold FL + answers
โ โ โโโ rubrics/ 196 per-problem rubric files (NL+Z3 atoms)
โ โโโ hard/
โ โโโ llmeval_logic_hard.json 154 items / 766 sub-questions
โ
โโโ code/
โ โโโ client.py pluggable OpenAI-compatible model dispatch
โ โโโ lib/ shared HTTP / FL schema / Z3 engine / IO
โ โ
โ โโโ nl_eval/ direct answer-accuracy track (Base + Hard)
โ โ โโโ eval.py
โ โ โโโ llm_judge/
โ โ
โ โโโ fl_eval/ formalization-accuracy track (Base only)
โ โโโ formalize/ NL โ candidate FL JSON
โ โโโ z3_judge/ Z3 execution โ "Z3" column
โ โโโ rubric_judge/ rubric atom scoring โ "Rubric" column
โ
โโโ evaluate.py โ
one-command end-to-end evaluator
โโโ requirements.txt
โโโ .env.example copy to .env, fill OPENAI_BASE_URL + OPENAI_API_KEY
The repo layout mirrors the paper's two evaluation axes โ bench/base/ carries everything the formalization track needs (items + rubrics); bench/hard/ is the multi-question subset used by the direct answer track only.
๐พ Dataset Structure
Base item (bench/base/llmeval_logic_base.json)
Each Base item is a JSON object with at least:
idโ global integer id assigned over the full 436-item corpus (Base spans0..245, Hard246..435). The same item keeps the sameidin the public / private / full splits, and the id is also the rubric filename (e.g.id=10โbench/base/rubrics/010.json).titleโ short Chinese tag for the item.logictypeโpl(propositional logic) orfol(first-order logic).original.background/original.question/original.answerโ Chinese natural-language premises, question, and reference answer (free text).formalization.parameters/.translation/.premise/.question/.answerโ the hand-verified gold FL (parameters, NLโsymbol mapping, formal premises, formal query, Z3-verified answer).label_typeโ list of answer-type tags (possible,necessary,enumerate_models,count_models, etc.).
The public split is a subset of these ids (0..245); the held-out private split is the complement. Both are gappy with respect to 0..245.
Hard item (bench/hard/llmeval_logic_hard.json)
Hard items live in the 246..435 portion of the same global id space and are deliberately formalization-free:
idโ global integer id (246..435). Public Hard ids are a subset of this range; held-out Hard ids are the complement.titleโ short Chinese tag (โค 10 characters) summarising the scenario.backgroundโ Chinese NL setup of the scenario.questionโ list of sub-question strings.answerโ list of sub-question gold answers (Z3- and human-double-checked); same length asquestion.
Rubric file (bench/base/rubrics/<id>.json)
A per-problem rubric of atomic NLโFL faithfulness criteria, organised into three groups:
logical_relationโ does the candidate FL preserve the original logical relations?stated_constraintโ are stated constraints preserved?query_alignmentโ does the query semantically match the NL question?
Each atom carries both a natural-language criterion and a Z3-checkable formula, so the production judge can mix solver-decided atoms (auto-pass via Z3 prefilter) with LLM-decided atoms.
๐ ๏ธ Usage Guide
git clone https://github.com/llmeval/LLMEval-Logic.git
cd LLMEval-Logic
pip install -r requirements.txt
cp .env.example .env
# Edit .env: set OPENAI_BASE_URL + OPENAI_API_KEY to any
# OpenAI-compatible endpoint (OpenAI / OpenRouter / vLLM / SGLang / Ollama / ...).
python evaluate.py --model openai/gpt-4o
evaluate.py is the single entry point. Pass any OpenAI-compatible model id and it runs all four stages (nl-base, nl-hard, fl-free, fl-fixed) end-to-end, then prints a final scoreboard. Every stage is fully resumable โ re-running the same command picks up where the previous run left off.
Common flags:
# Use a different judge (default: openai/gpt-4o):
python evaluate.py --model my-model --judge-model anthropic/claude-3.5-sonnet
# Smoke-test on the first 3 items only:
python evaluate.py --model openai/gpt-4o --limit 3
# Skip a stage (or pin to one stage):
python evaluate.py --model openai/gpt-4o --skip nl-hard
python evaluate.py --model openai/gpt-4o --only fl-fixed
If your provider speaks OpenAI Chat Completions and your model id forwards as-is, no code edits are needed. For models that require extra request parameters (e.g. a reasoning toggle), register a friendly key in code/client.py:MODEL_CONFIGS and pass it to --model.
๐ Evaluation Metrics
| Stage | Bench | Metric | What it measures |
|---|---|---|---|
nl-base | bench/base/ | Item / Sub-Q Acc | Free-form answer matches Z3-validated reference (LLM-judged). |
nl-hard | bench/hard/ | Item / Sub-Q Acc | Same as above, on the adversarially hardened multi-question subset. |
fl-free | bench/base/ + bench/base/rubrics/ | Z3 / Rubric / Both | Model invents its own symbol space โ Z3 execution + per-atom rubric. |
fl-fixed | bench/base/ + bench/base/rubrics/ | Z3 / Rubric / Both | Gold parameters/translation injected; model only writes premise/question; rubrics scored with a Z3 prefilter. |
Z3 = the model's FL, after Z3 execution, produces the natural-language answer matching the reference. Rubric = every hand-reviewed atom in bench/base/rubrics/<id>.json is satisfied (Z3+LLM hybrid). Both is the intersection โ the strictest column.
All numbers in the paper are run with gpt-5.1-chat as the LLM-as-Judge, three independent samples averaged. Inter-judge agreement against two further frontier judges (Claude Opus 4.6, Gemini 3.1 Pro) gives pairwise Cohen's ฮบ โ [0.873, 0.922] ("almost perfect" by Landis & Koch 1977).
๐ Held-out 20%
Following the contamination-resistant evaluation tradition of LLMEval-Fair, only 80% of LLMEval-Logic is released publicly. The remaining 20% (50 Base / 36 Hard / 50 rubrics) is held out as a private contamination-resistant test set maintained by Fudan NLP Lab. To submit a model for official evaluation against the holdout, please contact mingzhang23@m.fudan.edu.cn.
๐ฅ Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
๐ฎ Contact Us
For questions or suggestions, please:
-
Open an issue on GitHub
-
Contact the project maintainers:
Ming Zhang: mingzhang23@m.fudan.edu.cn
๐ Citation
If you find this benchmark useful, please cite our work:
@misc{zhang2026llmevallogic,
title = {{LLMEval-Logic}: A Solver-Verified Chinese Benchmark for Logical Reasoning of LLMs with Adversarial Hardening},
author = {Ming Zhang and Qiyuan Peng and Yinxi Wei and Yujiong Shen and Kexin Tan and Yuhui Wang and Zhenghao Xiang and Junjie Ye and Zhangyue Yin and Zhiheng Xi and Shihan Dou and Tao Gui and Maxm Pan and Ruizhi Yang and Qi Zhang and Xuanjing Huang},
year = {2026},
eprint = {2605.19597},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2605.19597}
}
๐ Related Projects
| Project | Description | Paper | Code |
|---|---|---|---|
| LLMEval-Fair (ACL 2026 Main) | Robust & fair evaluation across 13 disciplines, 200K+ questions | arXiv | GitHub |
| LLMEval-Med (EMNLP 2025 Findings) | Physician-validated clinical benchmark | arXiv | GitHub |
| LLMEval-2 (AAAI 2024) | Phase II: Professional domain evaluation | arXiv | GitHub |
| LLMEval-1 (AAAI 2024) | Phase I: General capability evaluation | arXiv | GitHub |
Full project list & leaderboard: llmeval.com ยท All datasets: ๐ค llmeval-fdu
LLMEval | Fudan University NLP Lab