# Binary Reward

> This section outlines the reward design used during reinforcement learning training, which functions as the primary evaluation metric. It probes the model's ability to perform multimodal logical reasoning and produce correctly formatted final answers. The protocol relies on a strict binary correctness check rather than partial credit for reasoning steps. Use when the user has predictions and gold and needs to compute binary_reward.

- Skill: `qhjqhj00/binary-reward` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/binary-reward`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/binary-reward/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/binary-reward

---


# binary_reward

> VisualSphinx: Large-Scale Synthetic Vision Logic Puzzles for RL — Feng et al. (2025) (arXiv:2505.23977, 2025)

## What this evaluates

This section outlines the reward design used during reinforcement learning training, which functions as the primary evaluation metric. It probes the model's ability to perform multimodal logical reasoning and produce correctly formatted final answers. The protocol relies on a strict binary correctness check rather than partial credit for reasoning steps.

## Datasets

- (no dataset; pure metric skill)

## Metrics

- `binary_reward` **(primary)** — range: [0, 1]
  - Returns 1 if the model's final answer inside \boxed{} exactly matches the ground truth, and 0 otherwise.

## Input / output format

**Input**: A multimodal logic puzzle image accompanied by a text instruction appended to the prompt: 'Let's think step by step and output the final answer within \boxed{}.'

**Output**: Step-by-step reasoning text followed by the final answer enclosed in \boxed{}.

## Scoring recipe

```python
def compute_metric(predictions, golds):
    correct = 0
    for pred, gold in zip(predictions, golds):
        pred_ans = extract_boxed(pred)
        if pred_ans == gold:
            correct += 1
    return correct / len(golds)
```

## Common pitfalls

- The protocol explicitly excludes formatting rewards, so models are not penalized for missing \boxed{} or poor step-by-step reasoning, only for the final answer.
- The metric is used as a reward signal during RL training rather than a sparse post-hoc evaluation metric, which may affect how results are reported.

## Evidence (verbatim from paper)

> For the reward design, we assign binary rewards: 1 for a correct response and 0 for an incorrect response, without providing additional rewards for formatting.

## Citation

```bibtex
@misc{feng2025visualsphinx,
  title={VisualSphinx: Large-Scale Synthetic Vision Logic Puzzles for RL},
  author={Feng et al. (2025)},
  year={2025},
  note={arXiv:2505.23977}
}
```

- arXiv: 2505.23977

