Pearl · Rewards
Lab

Architecture 02 · Pointwise classification

Pointwise binary verifier

Abstract. A pointwise verifier judges one candidate alone. The label is correct or incorrect (or safe/unsafe). Training uses binary cross-entropy. The output is a probability in \([0,1]\). This fits math and code well when a hard criterion exists.

1. Idea

Previously we learned from \(A \succ B\). Now we learn from a single pair \((x,y)\) with label \(z\in\{0,1\}\).

\(z=1\) means acceptable. \(z=0\) means not.

2. Architecture

Question + candidate
Transformer → \(h_T\)
Logit \(a=w^\top h_T+b\)
\(p=\sigma(a)\in[0,1]\)
(1) \[ p_\theta(x,y)=\sigma(w^\top h_T+b). \]

3. Example

Question: what is \(12\times 8\)?

Candidate A: \(96\) with \(z=1\). Candidate B: \(86\) with \(z=0\).

Model might predict \(p_A=0.97\), \(p_B=0.08\). No pairing required.

4. Loss

(2) \[ \mathcal{L}=-\big[z\log p+(1-z)\log(1-p)\big]. \]

If \(z=1\), loss \(=-\log p\) (push \(p\to 1\)). If \(z=0\), loss \(=-\log(1-p)\) (push \(p\to 0\)).

Example: correct answer with \(p=0.9\) gives loss \(\approx 0.105\). Same answer with \(p=0.1\) gives loss \(\approx 2.3\).

\(\mathcal{L}=-[z\log p+(1-z)\log(1-p)]\)

5. vs pairwise scalar RM

Pairwise scalarPointwise verifier
Training inputTwo candidatesOne candidate
LabelWinner / loserCorrect / incorrect
MeaningRelative preferenceClass probability
Needs absolute criterion?Not alwaysYes
Best forOpen-ended qualityMath, code, checks
Subtle point

Pairwise can prefer "bad" over "worse." Pointwise asks whether the answer meets a bar.

6. Where labels come from

  • Humans: correct/incorrect, safe/unsafe.
  • Programs: final answer match, unit tests, task success.

Programmatic labels are cheap and objective, but often only check the final result.

7. ORM or PRM?

Pointwise is an output style, not a location. Apply it to a full solution (ORM) or after every step (PRM):

(3) \[ \text{Step 1}\to 0.98,\quad \text{Step 2}\to 0.91,\quad \text{Step 3}\to 0.07. \]

8. Uses

  • Best-of-N: pick \(\arg\max_i p(x,y_i)\).
  • Filtering: reject when \(p<\tau\) (for example \(\tau=0.8\)).
  • Search: keep high-\(p\) branches.
  • RL: reward \(p\) or the raw logit \(a\) (logits saturate less).

9. Weaknesses

  • Needs an explicit criterion (hard for creative writing).
  • Correct final answer can hide bad reasoning.
  • Class imbalance: always predicting "wrong" can look accurate.
  • Overconfidence: \(p=0.99\) is not a guarantee.
  • Distribution shift breaks verifiers trained on easier data.

10. Laboratory · BCE playground

Logit, label, loss

Binary cross-entropy live
\(p=\sigma(a)\)-
Loss-
Adjust logit and label.

11. Worked

  1. Take one (x, y) with label z in {0,1}.
  2. Run Transformer; read final state; compute logit a.
  3. p = sigma(a).
  4. Loss = -[z log p + (1-z) log(1-p)].
  5. Use p for filtering, best-of-N, search, or RL.

12. Next

Previous

← Scalar RM

Next

Direct pairwise comparator

Read A and B together. Predict which wins.

Continue →