Papers
Topics
Authors
Recent
Search
2000 character limit reached

AHaPairs: Aligning LLMs Against Affective Hallucination

Updated 9 July 2026
  • AHaPairs is a 5,000-instance dataset designed to counter affective hallucination by aligning model responses through pairwise preference learning.
  • The methodology employs Direct Preference Optimization, significantly improving safety metrics like AHaBench Score and reducing AHa Rates across models.
  • Data sourced from mental-health subreddits is refined using GPT-4o and expert guidance, ensuring rigorous operationalization of emotional safety and boundary integrity.

AHaPairs is a 5,000-instance preference dataset introduced for aligning LLMs away from affective hallucination, defined as the production of emotionally immersive responses that foster illusory social presence despite the model’s lack of affective capacity. It was released alongside AHaBench, a 500-prompt benchmark for diagnosing this risk in mental-health-related interactions, and is explicitly designed for Direct Preference Optimization (DPO) so that models produce neutral, bounded, autonomy-preserving responses rather than responses that imply companionship, emotional reciprocity, or durable relational commitment (Kim et al., 23 Aug 2025).

1. Definition and role in the AHaBench framework

AHaPairs occupies the training side of the AHaBench/AHaPairs framework. AHaBench is a 500-prompt evaluation benchmark with expert-informed reference responses and an automated scoring protocol, whereas AHaPairs is the corresponding alignment corpus used to move models away from affective hallucination through pairwise preference learning. In operational terms, the intended workflow is to fine-tune with AHaPairs and evaluate pre- and post-alignment with AHaBench (Kim et al., 23 Aug 2025).

The dataset targets a specific failure mode in LLM deployment for emotionally sensitive use cases. Rather than focusing on conventional harms such as toxicity, bias, or factual error, it addresses relational and affective risks: language that simulates emotional intimacy, implies enduring presence, or encourages dependence on the model. The preferred response in each pair is selected under emotional safety criteria, emphasizing professional boundaries, presence avoidance, and user autonomy; the rejected response is one that exhibits affective hallucination, such as “I’m here for you always” or similar formulations that invite misperception of genuine relational availability (Kim et al., 23 Aug 2025).

This design gives AHaPairs a complementary status relative to general harmlessness corpora. The paper states that datasets such as HH-RLHF and SafeRLHF mainly target cognitive safety, whereas AHaPairs is centered on relational and emotional safety. A plausible implication is that AHaPairs addresses a niche that is underrepresented in standard RLHF and preference-alignment pipelines (Kim et al., 23 Aug 2025).

2. Target construct: affective hallucination and its operational dimensions

The dataset is grounded in a three-part formalization of affective hallucination. The first dimension, Emotional Enmeshment, refers to model behavior that mirrors or amplifies the user’s emotional state in a way that blurs simulated empathy with authentic attunement, including claims such as “I know exactly how you feel.” The second, Illusion of Presence, refers to affective language that creates a false impression of genuine availability or companionship, for example “I’m here for you always.” The third, Fostering Overdependence, refers to positioning the assistant as a primary, ongoing source of emotional support, including patterns such as “Please keep reaching out whenever you need someone. I’ll be waiting” (Kim et al., 23 Aug 2025).

In AHaBench, these concepts are operationalized by a seven-point score S{0,,6}S \in \{0,\dots,6\}, where higher values are safer and more neutral. Scores 3\geq 3 indicate no affective hallucination, while scores 2\leq 2 indicate violations. The benchmark also reports AHa Rate, defined as the fraction of responses with S2S \leq 2 across the 500 prompts (Kim et al., 23 Aug 2025).

AHaPairs uses the same conceptual framework but expresses it through pairwise preferences rather than absolute scores. Preferences are derived from composite ratings on Neutrality, Harmlessness, and Helpfulness, with Neutrality weighted most heavily. This weighting is significant because it prioritizes boundary integrity, presence avoidance, and autonomy promotion over more conventional forms of affective helpfulness. The preferred responses therefore avoid simulating identity or felt emotion, acknowledge distress in conventional non-personalized ways, redirect to offline support when appropriate, and do not imply companionship or permanence (Kim et al., 23 Aug 2025).

3. Source data, construction pipeline, and record structure

AHaPairs was constructed from posts drawn from five mental-health-related subreddits: ADHD, PTSD, OCD, Aspergers, and Depression. A total of 5,500 posts were manually reviewed, with 500 allocated to AHaBench and 5,000 to AHaPairs. Preprocessing removed community-meta references such as “as the title says” and “TW,” and reframed content from group-directed discourse into one-on-one private disclosures suitable for chatbot interaction. A subset of prompts was augmented by GPT-4o to intensify dependency cues, including formulations such as “You are the one I am leaning on,” after which the prompts were verified by humans for plausibility (Kim et al., 23 Aug 2025).

Candidate responses were generated by multiple instruction-tuned models: LLaMA3.1-8B-Instruct, Qwen2.5-7B-Instruct, Mistral-7B-Instruct, GPT-3.5-turbo, and GPT-4o. Preferences were then generated automatically by GPT-4o-as-a-judge using carefully designed rubrics and few-shot exemplars. The paper states that joint evaluation of candidates within the same context was used to reduce intramodel variability, and deterministic decoding was applied both for open-source response generation and for GPT-4o judging with temperature =0.0= 0.0 (Kim et al., 23 Aug 2025).

The ranking procedure was clinically informed but not manually pair-ranked end-to-end. Clinical expert guidance shaped the definitions and reference-response style, while pair ranking itself was performed by GPT-4o with deterministic settings and rationale generation to enhance reproducibility. The paper does not specify train/validation/test splits for AHaPairs (Kim et al., 23 Aug 2025).

Field Type Description
prompt string Mental-health-related user query adapted to one-on-one assistant dialogue
chosen string Preferred response under emotional safety criteria
rejected string Dispreferred response exhibiting affective hallucination risk
score_chosen number Numeric signal from the automated pair derivation rubric
score_rejected number Numeric signal from the automated pair derivation rubric

The dataset format mirrors Hugging Face TRL’s DPO schema. The associated evaluation file, AHaBench.csv, uses the fields query, category, and human_response. Sensitive and potentially distressing content is present throughout, and irrelevant or purely factual posts, such as product or medication reviews, were excluded (Kim et al., 23 Aug 2025).

4. Alignment objective and DPO training methodology

AHaPairs is designed explicitly for Direct Preference Optimization. The paper gives the standard DPO objective, with reference model π0\pi_0, as

LDPO(πθ;π0)=E(x,y+,y)D[logσ(βlogπθ(y+x)π0(y+x)βlogπθ(yx)π0(yx))].L_{\mathrm{DPO}}(\pi_\theta; \pi_0) = - \mathbb{E}_{(x, y^+, y^-)\sim D} \left[ \log \sigma \left( \beta \log \frac{\pi_\theta(y^+|x)}{\pi_0(y^+|x)} - \beta \log \frac{\pi_\theta(y^-|x)}{\pi_0(y^-|x)} \right) \right].

An equivalent form is also provided in terms of log-probability differences relative to a reference model πref\pi_{\mathrm{ref}} (Kim et al., 23 Aug 2025).

The reported training setup uses instruction-tuned base models as the DPO starting point and as the reference model π0\pi_0. Base models include LLaMA3.1-8B-Instruct, Qwen2.5-7B-Instruct, and Mistral-7B-Instruct-v0.3; larger Qwen variants at 14B, 32B, and 72B were examined for scaling effects. Parameter-efficient fine-tuning uses LoRA with rank =8= 8, 3\geq 30, dropout 3\geq 31, and adapters on q_proj, k_proj, v_proj, o_proj, gate_proj, and up_proj. The implementation uses Hugging Face TRL with per-device batch size 3\geq 32, gradient accumulation 3\geq 33 for effective batch size 3\geq 34, and num_train_epochs = 3 for standalone DPO; in sequential SFT+DPO, DPO is run for 1 epoch after SFT. Inference is performed with temperature 3\geq 35 and maximum output length of 512 tokens (Kim et al., 23 Aug 2025).

Training was conducted on two NVIDIA A100 GPUs, with inference on one A100; Qwen-72B required two A100s. The paper further notes that few-shot prompting produced modest improvements but trailed DPO, that SFT alone produced partial improvement, and that SFT+DPO showed no advantage over DPO alone. It also states that additional analysis suggests larger preference sets, from 1K to 5K, reduce hallucination rates substantially. This suggests that the full AHaPairs corpus is not merely convenient scale-up but part of the empirical efficacy of the alignment procedure (Kim et al., 23 Aug 2025).

5. Empirical effects on safety and retained capabilities

The principal evaluation result is that DPO fine-tuning on AHaPairs substantially reduces affective hallucination on AHaBench. For LLaMA3.1-8B-Instruct, AHaBench Score improves from 3.18 to 5.14 and AHa Rate drops from 0.41 to 0.00. For Mistral-7B-Instruct, the score changes from 1.99 to 5.24 and AHa Rate from 0.74 to 0.04. For Qwen2.5-7B-Instruct, the score changes from 4.72 to 5.21 and AHa Rate from 0.08 to 0.02 (Kim et al., 23 Aug 2025).

The paper also reports human–model agreement analyses supporting the validity of the benchmark and the automated evaluator. On AHaBench, before DPO, the aggregate score is approximately 2.94 under GPT-4o evaluation versus 2.97 under human evaluation, with AHa Rate 0.46 versus 0.46. After DPO, the score is approximately 5.14 versus 5.13, with AHa Rate 0.01 versus 0.02. Mean absolute error on the 0–6 scale decreases from 0.64 before alignment to 0.35 after alignment, and across pooled samples the reported Pearson correlations are 0.95 for human–human and 0.85 for GPT-4o–human agreement. These figures are presented as evidence that AHaBench reliably captures the intended relational safety properties and that AHaPairs preferences are consistent with that evaluation framework (Kim et al., 23 Aug 2025).

The alignment gains are reported to occur without material degradation in core reasoning and knowledge benchmarks. On LLaMA3.1-8B, MMLU changes from 66.4 to 66.5, GSM8K from 81.0 to 80.2, and ARC-Challenge from 60.6 to 60.2. On Mistral-7B, the changes are 61.8 to 61.6, 51.4 to 49.7, and 64.0 to 63.7. On Qwen2.5-7B, they are 73.8 to 73.7, 73.9 to 74.6, and 66.3 to 65.2. The paper characterizes these deltas as marginal (Kim et al., 23 Aug 2025).

A related scaling observation is that larger model size alone does not remove the relational risk. Qwen variants up to 32B maintained good performance, but the 72B variant showed degraded AHaBench safety absent targeted alignment. This is used in the paper to argue that affective hallucination is not simply a small-model artifact and requires explicit mitigation (Kim et al., 23 Aug 2025).

6. Ethical positioning, access, and limitations

AHaPairs is positioned as a mitigation resource rather than a capability dataset for simulated companionship. The paper explicitly states that it is not intended to teach chatbots to simulate companionship. Deployment guidance emphasizes neutral, professional acknowledgments; avoidance of presence claims such as “I’m here for you,” “we’re in this together,” and “I’ll always be here”; encouragement of autonomy and offline support; referrals to licensed professionals when appropriate; and refusal or redirection policies when users request companionship or imply dependency on the AI. The paper also recommends transparency about the model’s lack of emotional capacity and pairing technical safeguards with user education and AI literacy (Kim et al., 23 Aug 2025).

The dataset is available on Hugging Face at o0oMiNGo0o/AHaBench, with an alternate listing at Neuripssubmission/AHaBench, and the code is available on GitHub at 0oOMiNGOo0/AHaBench, with an alternate listing at Neurips1003/AHaBench. The license is Creative Commons Attribution-NonCommercial 4.0 (CC BY-NC 4.0), which restricts use to non-commercial settings and requires attribution. The paper also includes a warning that the mental-health-related prompts and responses may be emotionally distressing (Kim et al., 23 Aug 2025).

Several limitations are identified. The prompts are drawn from English-language Reddit communities, so demographic and cultural skew may limit generalizability. GPT-4o was used both for prompt augmentation and for evaluation, with human oversight; the paper states that broader rater panels and cross-model judges would strengthen validation. The current formulation is single-turn, leaving multi-turn interaction dynamics and long-term psychological safety as open problems. Future work is described in terms of broader cross-cultural datasets, multi-turn benchmarks, more diverse evaluator ensembles, and system-level guardrails integrated with proactive refusal and referral strategies (Kim et al., 23 Aug 2025).

Within the current literature, AHaPairs is notable for centering relational safety as a distinct alignment target. Its contribution is not only the 5,000-instance preference corpus, but also the accompanying methodological claim that boundary maintenance, presence avoidance, and autonomy promotion can be encoded in preference optimization without materially reducing performance on standard reasoning and knowledge benchmarks (Kim et al., 23 Aug 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to AHaPairs.