Large Language Models (LLMs) optimize implicit objectives that are dangerously opaque, making it difficult to verify if they are truly aligned with human values. When we align LLMs using Reinforcement Learning from Human Feedback (RLHF), the models internalize complex goals. Because these learned objectives aren't explicitly coded, auditing them for failure modes like reward hacking, preference inconsistencies, or shortcut exploitation is a significant challenge.
This paper introduces The Alignment Auditor, a Bayesian Inverse Reinforcement Learning (IRL) framework that recovers a distribution over an LLM's implicit reward function rather than a single point estimate. By sequentially updating this distribution, the framework reduces ambiguity, flags out-of-distribution inputs using uncertainty, and extracts a reliable reward signal that can successfully guide safe RLHF training.
The Challenge of Non-Identifiability
Inverse Reinforcement Learning (IRL) attempts to reverse-engineer the reward function directly from a model's behavior. However, standard IRL suffers from a fundamental flaw known as non-identifiability. This means multiple, vastly different reward functions can perfectly explain the exact same observed behavior.
Existing IRL methods typically ignore this ambiguity, producing a single, overconfident reward estimate. Without knowing the uncertainty behind that estimate, auditors cannot trust the inferred objective, leaving the alignment process vulnerable to spurious explanations and unsafe edge cases.
The Alignment Auditor Framework
The authors reframe reward inference from a one-shot estimation task into a comprehensive three-stage verification process:
- Quantifying Ambiguity with Bayesian IRL: Instead of seeking a single reward function, the framework learns a posterior distribution over possible reward weights using Variational Inference. The LLM's behavior is modeled as a contextual bandit, applying a linear reward head on top of frozen LLM embeddings and using a Bradley-Terry model to evaluate preferences.
- Auditing Trustworthiness: To systematically tackle non-identifiability, the framework uses sequential Bayesian updates. The data is partitioned into rounds where the posterior of one round becomes the prior for the next. The model's predictive uncertainty is also decomposed into aleatoric (inherent data noise) and epistemic (model ignorance) components.
- Policy-Level Validation: Finally, the mean of the refined, low-uncertainty reward posterior is used to run standard RLHF (via PPO) on a baseline model. If the inferred reward is accurate, this process reproduces the original, aligned behavior.
Key Findings and Results
The framework was evaluated primarily on the AllenAI RealToxicityPrompts dataset for detoxification, comparing completions from a baseline (toxic) policy and an expert (detoxified) policy. It was also tested on the HH-RLHF Helpfulness dataset to demonstrate generalization to nuanced human preferences.
- Measurable Posterior Contraction: Sequential updates dramatically tightened the reward posterior. For the Llama-1B model, the log-determinant of the covariance matrix dropped from -196 (single round) to -897 (5 rounds), proving a massive, mathematically verifiable reduction in ambiguity.
- Epistemic Uncertainty Exposes Shortcuts: The framework's epistemic uncertainty metric acts as a built-in anomaly detector. When spurious, irrelevant keywords were injected into a prompt, the model's epistemic uncertainty spiked. The latent reward variance achieved an AUC of ~0.86–0.88 for detecting these injected markers, vastly outperforming standard output-based toxicity classifiers (which hovered near random chance at AUC ~0.56–0.58).
- OOD Detection: The inferred reward's variance showed a near-perfect correlation ($r=0.989$) with the Mahalanobis distance from the training data, proving its reliability in flagging out-of-distribution (OOD) prompts where the reward model shouldn't be trusted.
- Preventing Reward Hacking: Aligning a model using the highly ambiguous reward posterior from just the first round of data caused the RLHF process to devolve into reward hacking (e.g., generating evasive text to avoid toxic tokens). In contrast, fully contracted, later-round posteriors yielded fluent, safe text.
Ultimately, policies fine-tuned using the framework's refined reward matched the ground-truth oracle, successfully collapsing toxicity to $\le 2\%$ on held-out prompts without sacrificing text quality. The authors also noted that larger base LLMs (like Llama-3.2-1B and 8B) produce more linearly separable feature spaces, allowing for better-calibrated and more faithful reward recovery.
Limitations and Future Directions
Currently, the framework models rewards as linear functions over frozen LLM embeddings. While highly interpretable, this linearity constraint may be too restrictive to capture highly complex, non-linear human preferences. Additionally, evaluations relied on a classifier-based proxy (a RoBERTa toxicity model) rather than actual human annotators.
Future work could replace the linear head with richer, non-linear reward families (like deep kernels), introduce structured sparsity priors to learn which specific features matter, and extend the framework to multi-objective settings using active, uncertainty-guided data collection. Overall, The Alignment Auditor provides a practical, principled toolkit for safety teams and regulators to verify what LLMs are truly trying to achieve.
Summary updated