惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
V
V2EX
WordPress大学
WordPress大学
博客园 - Franky
Last Week in AI
Last Week in AI
博客园 - 司徒正美
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
V
Visual Studio Blog
C
CERT Recently Published Vulnerability Notes
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
腾讯CDC
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
J
Java Code Geeks
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
A
Arctic Wolf
量子位
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
雷峰网
雷峰网
博客园_首页
Google Online Security Blog
Google Online Security Blog
Spread Privacy
Spread Privacy
罗磊的独立博客
H
Hacker News: Front Page
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
TaoSecurity Blog
TaoSecurity Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
IT之家
IT之家
The Cloudflare Blog
爱范儿
爱范儿
博客园 - 叶小钗
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
DPO vs SimPO: What Your Preference Trainer Is Actually Optimizing
Natnael Alem · 2026-05-08 · via DEV Community

SalesConversion-Bench had one uncomfortable preference-tuning mismatch: the code trained with TRL DPOTrainer, while the methodology narrative argued for SimPO.

That is not just a naming issue. DPO and SimPO turn the same (prompt, chosen, rejected) pair into different update signals. If the held-out lift is small, like 22.73% vs 18.18%, the project cannot honestly claim whether the model improved because DPO was the right objective, because LoRA rank constrained the update, or because training margins improved without robust held-out behavior.

The useful answer is not "DPO good, SimPO good, ORPO also good." The useful answer is:

Compare the objectives under fixed conditions, control for LoRA rank, and keep the objective whose gains survive held-out evaluation instead of only improving training margins.

The gradient difference

DPO: reference-relative preference learning

DPO treats preference tuning as a comparison between two log-probability gaps:

policy_gap = log pi_theta(chosen | prompt) - log pi_theta(rejected | prompt)
ref_gap    = log pi_ref(chosen | prompt)   - log pi_ref(rejected | prompt)

loss = -log sigmoid(beta * (policy_gap - ref_gap))

Enter fullscreen mode Exit fullscreen mode

So the update asks:

Has the trainable policy made the chosen answer more preferred than the rejected answer, beyond what the reference policy already believed?

That reference-relative part is the key. DPO does not only ask whether the chosen answer is more likely than the rejected answer. It asks whether the policy improved that preference gap relative to a reference model.

In a LoRA setup with TRL DPOTrainer(ref_model=None), the exact reference handling depends on TRL and PEFT configuration. Some setups avoid loading a separate reference model and compute reference behavior by disabling adapters; others use a frozen reference copy. The implementation detail should be verified in the actual training stack.

But the conceptual point stays the same: DPO is anchored to a reference policy. That can be helpful if the base instruct model already has useful judgment priors. It can also preserve the wrong shortcut if the reference already favors short, generic, policy-shaped answers.

SimPO: reference-free margin learning

SimPO removes the reference model and scores each answer using average log-probability per token:

r(prompt, answer) = (1 / answer_length) * log pi_theta(answer | prompt)

loss = -log sigmoid(beta * (r_chosen - r_rejected - gamma))

Enter fullscreen mode Exit fullscreen mode

The update asks:

Has the policy made the chosen answer better than the rejected answer by at least the target margin gamma, using length-normalized scores?

That changes two things:

  1. No reference anchor: SimPO directly pushes the chosen answer above the rejected answer. It does not ask whether the policy improved relative to the base model.
  2. Length normalization: A long rejected answer is not punished merely because total log-probability accumulates over more tokens.

That second point matters in preference data where chosen and rejected answers differ in length. If the preferred answer is often shorter, a total-log-prob objective can make brevity look like quality. SimPO's average-log-prob reward reduces that artifact.

The falsifiable hypothesis is:

If DPO's gains are mostly coming from reference-relative or length artifacts, then SimPO with the same data, seed, train steps, and LoRA rank should produce cleaner held-out margins and accuracy without increasing the train/eval gap.

Where ORPO fits

ORPO combines a supervised chosen-answer term with an odds-ratio preference term. It should not be co-equal in this comparison. The live mismatch is DPO in code vs SimPO in the methodology.

ORPO becomes interesting if both DPO and SimPO are unstable, or if the model needs stronger behavior-cloning pressure toward chosen outputs. For this decision, it is a fallback, not the main branch.

The overoptimization check

Training loss alone is not enough. In a small preference-tuning run, the warning pattern is:

training preference margins improve,
but held-out accuracy or held-out margins do not improve.

Enter fullscreen mode Exit fullscreen mode

The two metrics to inspect first are:

Diagnostic Why it matters Bad sign
Train rewards/margins vs held-out pair accuracy or held-out margins Separates real preference learning from training-set margin inflation Train margins rise while held-out behavior stays flat or worsens
Chosen/rejected reward or log-prob movement Shows whether improvement comes from lifting chosen answers, suppressing rejected answers, or drifting oddly from the reference Rejected scores collapse while chosen quality does not improve

If TRL logs rewards/chosen, rewards/rejected, and rewards/margins, use those directly. If it also logs policy/reference log-probs, inspect whether the DPO margin is improving because chosen answers are becoming more likely, or mainly because rejected answers are being pushed down.

The second case is not automatically reward hacking. It is a review flag. It needs held-out and qualitative confirmation.

Hands-on pattern: inspect train vs eval margins

Before arguing that DPO or SimPO "worked," add a tiny log inspection step. The goal is not to prove overoptimization from one scalar. The goal is to force the comparison between training margins and held-out behavior.

import json
from pathlib import Path


def load_jsonl(path):
    rows = []
    for line in Path(path).read_text().splitlines():
        line = line.strip()
        if line:
            rows.append(json.loads(line))
    return rows


def last_number(rows, *keys):
    for row in reversed(rows):
        for key in keys:
            value = row.get(key)
            if isinstance(value, (int, float)):
                return float(value)
    return None


def review_preference_run(train_log, eval_log=None):
    train = load_jsonl(train_log)
    midpoint = max(1, len(train) // 2)

    early_margin = last_number(
        train[:midpoint],
        "rewards/margins",
        "train_rewards/margins",
    )
    late_margin = last_number(
        train[midpoint:],
        "rewards/margins",
        "train_rewards/margins",
    )
    chosen = last_number(
        train[midpoint:],
        "rewards/chosen",
        "train_rewards/chosen",
    )
    rejected = last_number(
        train[midpoint:],
        "rewards/rejected",
        "train_rewards/rejected",
    )

    print(f"train margin: {early_margin} -> {late_margin}")
    print(f"late chosen/rejected rewards: {chosen} / {rejected}")

    if eval_log:
        eval_rows = load_jsonl(eval_log)
        eval_margin = last_number(
            eval_rows,
            "eval_rewards/margins",
            "rewards/margins",
        )
        eval_acc = last_number(eval_rows, "eval_accuracy", "accuracy")
        print(f"held-out margin: {eval_margin}")
        print(f"held-out accuracy: {eval_acc}")

    if early_margin is not None and late_margin is not None:
        if late_margin > early_margin and eval_log is None:
            print("Review flag: train margin improved. Confirm with held-out pairs.")
        elif late_margin <= early_margin:
            print("Review flag: weak training signal. Check rank, LR, or pair quality.")

Enter fullscreen mode Exit fullscreen mode

The useful pattern is the comparison:

train margins up + held-out behavior up    -> plausible improvement
train margins up + held-out behavior flat  -> likely training-set margin inflation
train margins flat                         -> weak signal, bad data, or too little capacity

Enter fullscreen mode Exit fullscreen mode

LoRA rank is a confounder

The current LoRA config is r=16, alpha=32, dropout=0.05. For a 0.5B model, that is plausible. The risk is not that r=16 is obviously wrong. The risk is that rank can fake an objective conclusion.

Rank failure Expected pattern First observable
Rank too low Training margins plateau early, train loss barely moves, held-out accuracy is flat rewards/margins and train loss
Rank too high for small data Training margins keep improving while held-out accuracy or margins get noisy or worse Train/eval margin gap

So rank should stay in the ablation, but lightly. It is not the main theory. It is a control that prevents the false conclusion "SimPO lost" or "DPO won" when the real issue was adapter capacity.

The smallest decisive ablation

The cleanest small matrix is 2 objectives x 2 ranks:

Run Objective LoRA rank Purpose
A DPO r=16 Current baseline
B SimPO r=16 Isolate objective change at current capacity
C DPO r=8 Test whether lower rank regularizes DPO
D SimPO r=8 Test whether lower rank regularizes SimPO

Everything else should stay fixed: model, train/validation split, seed, pair data, max length, epochs or steps, learning rate, batch size, and evaluation script.

The decision rule:

Prefer SimPO if:
SimPO beats DPO at the same rank on held-out accuracy or held-out margin,
and the gain is not paired with a larger train/eval margin gap.

Prefer DPO if:
DPO matches or beats SimPO at the same rank,
and DPO has a smaller train/eval gap or better qualitative behavior.

Prefer the lower rank if:
r=8 has slightly lower training margins but equal or better held-out behavior.

Enter fullscreen mode Exit fullscreen mode

The important correction is sample size. With only 22 held-out pairs, a 3 percentage-point rule is too fine-grained because one example is about 4.5 percentage points.

A more defensible rule is:

Switch objectives only if the winner improves by at least one additional held-out pair, has better or equal held-out margin behavior, and does not worsen the important qualitative failure slices.

One extra correct pair alone is a hint. One extra correct pair plus cleaner margins and no slice regression is a decision.

Bottom line

The SalesConversion-Bench run should be described as DPO preference tuning with LoRA, not SimPO-first preference tuning.

The gap closes when the project can say:

  1. DPO updates the model using a reference-relative chosen-vs-rejected margin.
  2. SimPO updates the model using a reference-free, length-normalized target margin.
  3. The objective choice should be decided by a controlled DPO-vs-SimPO ablation at fixed rank, with one lower-rank control to catch LoRA overfitting.

That turns "we prefer SimPO" from a narrative claim into an experiment the project can actually defend.

Sources