All work

Research

Risk-aware reward model

Tackling LLM hallucinations in medical Q&A through reward modelling

I led a team of three testing whether penalising confident wrong answers during reward-model training can curb hallucinations in medical question answering.

Result

A clear null result: penalising confident wrong answers left the model's behaviour unchanged

Role

Team lead (team of 3)

Period

Oct 2025 – Nov 2025

Stack

Python, PyTorch, Hugging Face Transformers, LLaMA-3.2-3B-Instruct, SQLite, NumPy, Pandas, Matplotlib

In short

LLMs sometimes hallucinate, giving answers that sound right but are wrong. In medicine, a confident wrong answer about a medication can cause real harm. A 2025 paper from OpenAI, Why Language Models Hallucinate, argues that this is partly caused by how models are trained.

We tested a change to training based on that argument, using real medical questions. It had no measurable effect, and working out why helped clarify what a more effective approach would need.

Why models guess

Consider a student taking a multiple-choice test. A blank answer scores zero, while a guess might score a point, so the best strategy is to always guess, even without knowing the answer.

LLMs have a similar incentive. Part of their training (RLHF) uses a reward model, a second AI that scores their answers. If "I don't know" scores nothing and a guess might score something, the model learns to guess, and to sound confident when it does.

Many exams deal with this through negative marking, where a wrong answer loses points, so guessing only makes sense when you're fairly sure. We applied the same idea to the reward model. Confident wrong answers were penalised more, and most heavily on high-risk questions such as treatment and dosing.

Our hypothesis was that a reward model trained with this penalty would score confident wrong answers lower than a standard reward model does.

Method

  1. Data. 103 real health questions sent in by the public, each with many candidate answers that experts rated from incorrect to excellent.
  2. Risk tiers. Questions about treatment, medication and dosing are high risk. Symptoms and diagnosis are medium. General information is low.
  3. A confidence score. Each answer is scored on how sure it sounds. Hedging words like "may" lower the score. Words like "always" and "definitely", exact doses and medical terms raise it.
  4. Answer pairs. Within each question, every two answers become a pair with a better and a worse one, giving 31,102 pairs.
  5. The penalty. When the worse answer in a pair is poor but sounds very confident, that pair counts for more in training. The penalty is doubled for medium-risk questions and tripled for high-risk ones.
  6. The comparison. The same reward model is trained twice, with and without the penalty, then compared on questions it never saw in training.

How we worked

This was a course project for DSA4213 at NUS. I led a team of three, and built the data pipeline and training setup. That covered downloading and joining the source datasets, recovering missing answers, the risk tiers, the confidence score and the answer pairs. It also included splitting questions into training, validation and test sets so that no question appears in more than one.

Results

With and without the penalty

Both versions ranked the better answer first about 61% of the time. Their training curves, the gaps between their scores for better and worse answers, and their calibration were all nearly identical. Calibration measures whether a model's confidence matches how often it is actually right. In terms of the exam analogy, adding negative marking didn't change how the model graded answers.

Calibration error on held-out questions, by risk tier

High risk

Medium risk

Low risk

Lower is better. The two versions differ by 0.003 at most.
Show as a table
Without the penaltyWith the penalty
High risk0.1530.151
Medium risk0.2050.202
Low risk0.1830.181

Why the penalty had no effect

  • The penalty only changed how much each pair counted. Some pairs were given more weight, but the model was still learning the same thing: to rank one answer above another. Nothing in the training taught it how confident it should be.
  • Sounding confident isn't the same as being wrong. The confidence score is based on word counts, so a phrase like "studies show definitively" scores as confident whether or not the claim is true, while a careful, correct answer is scored as less confident.
  • There was no "I don't know" option. In terms of the exam analogy, we added negative marking but never let the student leave a question blank. None of the training pairs showed an honest "I don't know" being preferred over a confident wrong answer, so the model had no safer behaviour to learn.
  • Only a small part of the model was trained. To save computing, we trained only the final scoring layer, 3,072 numbers on top of a frozen 3-billion-parameter model. If the frozen model doesn't already distinguish confident correct answers from confident wrong ones, a single layer can't learn to.
  • The dataset is small. It has 103 questions, while reward models are usually trained on hundreds of thousands of examples.

Next steps

A more effective approach would need training data that rewards admitting uncertainty, a learned way of judging confidence instead of counting words, and training more of the model. The full report covers these as directions for future work.

For the technically minded

The report (PDF) has the full method, the literature review and every figure.

The loss is Bradley–Terry, weighted per pair by 1 + β·p. The penalty p = 10 × risk multiplier (3, 2 or 1) × (confidence − 0.5), applied when the rejected answer is rated 2 or below, sounds confident (above 0.5) and is at least a point worse. We compared β = 0 with β = 3.

LLaMA-3.2-3B-Instruct is frozen, with only the scalar reward head trained: AdamW at 2×10⁻⁵, five epochs, mixed precision. Splits are by question: 24,970, 3,650 and 2,482 pairs over 82, 11 and 10 questions. With the penalty, validation accuracy rose from 59.07% after the first epoch to a peak of 61.42%. The code is on GitHub.

Limits

  • Accuracy is measured against the pairs we built, and some of those labels come from the confidence score breaking ties between equally rated answers.
  • The confidence score is a rule of thumb, not a probability of being correct.
  • The calibration measure still needs checking, so read its numbers as a comparison between the two versions, not as absolute values.
  • Each version was trained once, on one model and one dataset. This is a course project, not a peer-reviewed paper.