All benchmarks

  Paper

A 7B Qwen trained with RL on 5,000 logic puzzles beat o1 and GPT-4o at Knights and Knaves

Made by Tian Xie and nine co-authors

arXiv preprint

The result

  • Quality

    Knights and Knaves puzzles solved, averaged over 2 to 8 people. Small model: Qwen2.5-7B-Instruct-1M + Logic-RL (7B). Large model: o3-mini-high, the best large model in the table (prompt and sampling not described).

    0.89vs 0.94

    o3-mini-high ahead

    Qwen 7B + Logic-RL0.89
    o3-mini-high0.94

    Large model: o3-mini-high, the best large model in the table (prompt and sampling not described)

    Knights and Knaves accuracy · higher is better

The story

A puzzle with one checkable answer

In Knights and Knaves puzzles, knights always tell the truth and knaves always lie, and from what a few islanders say you must work out who is which. A generator from an earlier paper makes them with 2 to 8 people, so difficulty can be raised, and each puzzle has one answer that a program can check.

Researchers at Microsoft Research Asia and Ubiquant used the puzzles to study whether a small open model can learn to reason through rule-based reinforcement learning, as DeepSeek-R1 did. Their method, Logic-RL, rewards only the answer format and the final answer.

Data

Knights and Knaves puzzles

Fewer than 5,000, with 3 to 7 people

Generated with the Knights and Knaves generator of Xie et al. (2024)

Puzzles with 2 and 8 people were left out of training; the paper doesn’t give the test set’s size.

Small model

Qwen2.5-7B-Instruct-1M + Logic-RL

7B (7.6B on Hugging Face) · Qwen (Alibaba), base model

Reinforcement learning only, rewarded for the <think>/<answer> format and the correct answer; trained weights not published

Base
Qwen2.5-7B-Instruct-1M

The reward is a rule, not a model: +1 or −1 for reasoning inside <think> tags and answering inside <answer> tags, then +2 for a fully correct answer, −1.5 for a partly wrong one and −2 if it can’t be parsed. The base and instruct Qwen 2.5 7B trained almost identically; the authors kept the instruct model for its slightly higher test accuracy.

Training

REINFORCE++ with a KL loss

3,600 steps, learning rate 4e-7, temperature 0.7, 8 puzzles per batch with 8 answers each, answers up to 4,096 tokens

Hardware
4 GPUs in the authors’ REINFORCE++ script; NVIDIAA100 80G per their README’s GRPO command; not in the paper

Not reported: time and cost.

Against o1, o3-mini and DeepSeek-R1

Large model

o3-mini-high

Size not disclosed · OpenAI

Used as released; prompt and sampling not described

Base
OpenAI o3-mini at high reasoning effort

Evaluation

Test set
Knights and Knaves puzzles with 2 to 8 people from the same generator; 2 and 8 people are outside the training range
Metric
Share of puzzles solved exactly, per number of people (2 to 8) and on average
Items
Not stated in the paper; the authors’ evaluation script, added six days after it, reads 100 puzzles per size from the public K&K test split
How it was compared
The paper doesn’t say how the API models were prompted or sampled, or whether they saw the same puzzles.

Average accuracy rose from 0.19 to 0.89. That beats o1-2024-12-17 (0.42), GPT-4o (0.37) and DeepSeek-R1 (0.81), but not o3-mini-high (0.94), the best model in the table. DeepSeek-R1 also won on the two largest sizes: 7 people (0.88 vs 0.80) and 8 people (0.83 vs 0.67). On 8-person puzzles, a size never seen in training, the 7B’s 0.67 compares with o1’s 0.20.

The paper gives no costs or response times.

All the numbers

Show all numbersHide all numbersEvery model · Cost, latency and energy · 5 more results

Every model on the headline test

Cost, latency and energy, as reported

Cost
Not reported
Latency
Not reported
Energy
Not reported

More from the source

  • Average accuracy vs GPT-4o

    Small model 0.89Large model 0.37 accuracy (0 to 1)

    Table 2

  • Average accuracy vs DeepSeek-R1

    Small model 0.89Large model 0.81 accuracy (0 to 1)

    Table 2

  • Where the large model wins: average accuracy vs o3-mini-high

    Small model 0.89Large model 0.94 accuracy (0 to 1)

    o3-mini-high is ahead at every size except 2 (tie, 0.99) and 3 (0.98 vs 0.99).

    Table 2

  • 8 people, a size not seen in training: Logic-RL vs o1 / GPT-4o / DeepSeek-R1 / o3-mini-high

    Small model 0.67Large model 0.20 / 0.11 / 0.83 / 0.83 accuracy (0 to 1)

    DeepSeek-R1 also beats the 7B at 7 people (0.88 vs 0.80).

    Table 2

  • Same 7B before RL (Qwen2.5-7B-Instruct-1M), average

    Small model 0.89Large model 0.19 accuracy (0 to 1)

    Before vs after training, not a large model.

    Table 2

Worth knowing

  • Preprint (arXiv v1 only); the comparison table is the authors’ own and the setup for the API models is not described. o1’s low average (0.42, below DeepSeek-R1’s 0.81) is not explained.
  • Training and test puzzles come from the same generator, so 3 to 7 people is in-distribution for the 7B; only 2 and 8 people are outside its training range.
  • o3-mini-high beats the 7B on average, and DeepSeek-R1 beats it on the hardest puzzles.
  • Hardware comes from the code README, not the paper.
1 more caveat
  • No official trained weights were published on Hugging Face.

Weights on Hugging Face

Base model on Hugging Face

Base model only. No official Logic-RL checkpoint from the authors was found on Hugging Face (only third-party reproductions). The public K&K dataset has a test split of 100 puzzles per size; the paper doesn’t say whether that split is its test set.

Sources

  1. Xie, Gao, Ren, Luo, Hong, Dai, Zhou, Qiu, Wu, Luo, ‘Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning’, arXiv 2502.14768
  2. Logic-RL code (GitHub; README links the paper)
  3. Knights and Knaves dataset (Hugging Face)
  4. arXiv v1, 20 Feb 2025 (the only version).
3 more sources behind this page
  1. arXiv 2502.14768v1 (HTML)
  2. github.com/Unakar/Logic-RL/blob/main/eval_kk/eval.sh
  3. github.com/Unakar/Logic-RL/scripts/train_reinforce_plus_4gpu_7Binstruct.sh
Share this benchmark

Drawing the image…

Post text