atlas

Research map / Large language models / Alignment and preferences

Measuring memorization in RLHF for code completion

ICLR 2025 · Large language models › Alignment and preferences · approach: Reward modeling for diverse preferences · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Measures how training data memorization propagates through the RLHF pipeline (fine-tuning, reward model training, RL fine-tuning) and compares it with direct preference learning via IPO, for code completion models.

Problem

Memorization of training data has been studied for pre-training and fine-tuning, but not for RLHF; it is unclear whether sensitive data used in reward modelling or RL fine-tuning of code completion models can be regurgitated.

Approach

Uses a counterfactual (control-model-based) definition of approximate memorization with sliding-window normalized edit distance, applied to synthetic crypto-code data with fictitious PII file paths, to track memorization across each RLHF stage and contrast it with IPO direct preference learning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use SD in reward model training instead of directly fine-tuning on itGemini Nano-1 (1.8B) RLHF · SD.Basememorization rate: 17.6% -> 0.9%Hurt
Use SD in reward model training instead of directly fine-tuning on itGemini Nano-1 (1.8B) RLHF · SD.LinksPII-like file path memorization rate: 50% -> 0%Hurt
Lower the KL coefficient from α=0.5 to α=0.005 (ablation)RLFT.1 initialized from FT.1 · SD.LinksPII-like file path memorization rate: 54.8% -> 12.6%Hurt
Lower the KL coefficient from α=0.5 to α=0.1 (ablation)RLFT.1 initialized from FT.1 · SD.LinksPII-like file path memorization rate: 54.8% -> 46.8%Hurt
Lower the KL coefficient during RL fine-tuning (ablation)RLFT.1 initialized from FT.1 · SD.Basememorized examples remaining after RL fine-tuning: 43-47%Mixed
Include preference data in IPO training rather than reward model training for RLHFGemma 2B · SD.Basememorization rate: 0.9% -> 18.2%Helped
Include preference data in IPO training rather than reward model training for RLHFGemma 7B · SD.Basememorization rate: 0.9% -> 19.5%Helped
Scale IPO from Gemma 2B to Gemma 7BIPO · SD.Basememorization rate: 18.2% -> 19.5%Helped
Increase the RL fine-tuning learning rate from 3e-6 to 3e-5 (ablation)RLFT.4 with α=0.005 · RL fine-tuning promptsprompt memorization rateHelped
Use IPO instead of RLHF with reward model trainingGemma 2B and Gemma 7B · SD.LinksPII-like file path memorization rate: 0% -> 0.6%Helped
Scale up the RLFT modelRLHF · SD, CodeXGLUE, and LIMARL prompt memorization rate: <1%Helped

Surprising findings

Limitations

Experimental setup

Datasets: SD (synthetic, Gemini Ultra generated) PD (scraped permissive Python) CodeXGLUE CodeCompletion-line LIMA Anthropic HH

Benchmarks: HumanEval Infilling HumanEval SD CodeXGLUE CodeCompletion-line LIMA Anthropic HH

Metrics: counterfactual memorization rate (0.1-approximate, normalize HumanEval pass@1 HumanEval Infilling single/multi-line scores

Baselines: DPO CodeGemma 2B DeepSeek Coder 2B StarCoder2 3B Gemma 2B Gemma 7B

Builds on: RLHF IPO Fill-in-the-middle Gemma CodeGemma

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy