Skip to content
Go back 2505.04993 arXiv logo

Latent Preference Coding: Aligning Large Language Models via Discrete Latent Codes

Published:  at  11:14 AM
76.90 🤔

This paper introduces Latent Preference Coding (LPC), a framework that uses discrete latent codes to model multifaceted human preferences, consistently improving the performance of offline alignment algorithms like DPO, SimPO, and IPO across multiple LLMs and benchmarks.

Large Language Model, Alignment, Reinforcement Learning, Representation Learning, Robustness

Zhuocheng Gong, Jian Guan, Wei Wu, Huishuai Zhang, Dongyan Zhao

Wangxuan Institute of Computer Technology, Peking University, Ant Group

Generated by grok-3

Background Problem

Aligning large language models (LLMs) with human preferences is a critical challenge due to the complex, multifaceted nature of human feedback, which often involves conflicting factors (e.g., helpfulness vs. safety) that vary across tasks and populations. Existing methods typically rely on a single reward function or direct optimization, failing to capture the intricate structure of preferences and struggling with issues like defining relative weights for different factors. This work introduces Latent Preference Coding (LPC) to address these limitations by modeling implicit preference factors and their combinations without predefined rewards or weights.

Method

Latent Preference Coding (LPC) is a novel framework that models human preferences using discrete latent codes, each representing an underlying factor influencing holistic preferences. It employs variational inference to estimate these codes from data, learning a prior network to predict preference distributions based on input prompts and a posterior network to infer weights from preference annotations. The policy model generates outputs conditioned on the latent variable, integrating preference representations into language generation via a Transformer architecture and Gumbel-softmax for differentiable sampling. LPC is designed to seamlessly integrate with offline alignment algorithms like DPO, SimPO, and IPO, enhancing their optimization objectives by accounting for multifaceted preferences without additional computational overhead.

Experiment

The experiments evaluate LPC using three base LLMs (Mistral-7B, Llama3-8B, Llama3-8B-Instruct) and three offline alignment algorithms (DPO, SimPO, IPO) on the UltraFeedback dataset, with downstream tasks including commonsense reasoning (ARC-Challenge, ARC-Easy), mathematical reasoning (GSM8K), and truthfulness (TruthfulQA). The setup is comprehensive, testing across diverse tasks and models, with results showing consistent performance improvements when LPC is integrated (e.g., DPO with LPC achieves higher accuracy across all tasks compared to vanilla DPO). However, gains are modest in tasks relying on intrinsic model capabilities like reasoning, and variability exists with SimPO and IPO underperforming in some scenarios without LPC. Preference accuracy also improves with LPC, though the effect is muted for heavily fine-tuned models like Llama3-8B-Instruct. Additional analyses, such as flipping-label experiments and latent code visualization, demonstrate robustness against noise and the ability to capture preference distributions, though the optimal codebook size (32-64) suggests potential limitations in scalability. Overall, results align with expectations of enhanced alignment but highlight task-specific limitations.

Further Thoughts

The concept of using discrete latent codes in LPC to model human preferences opens intriguing avenues for exploration, particularly in how it might intersect with personalized AI systems. For instance, extending LPC to account for population-specific preferences, as hinted in the paper, could tie into federated learning paradigms where models adapt to localized user feedback without centralized data aggregation, enhancing privacy and customization. Additionally, the observed limitation in enhancing intrinsic reasoning capabilities suggests a potential synergy with pre-training strategies focused on emergent abilities—could LPC be paired with techniques like contrastive learning to better encode task-specific priors? Another concern is the interpretability of latent codes; while the paper shows clustering via T-SNE, linking these codes to explicit preference factors (e.g., safety vs. creativity) could bridge the gap to explainable AI, aligning with broader efforts in trustworthy AI. Finally, the robustness to noisy data prompts a question about real-world deployment—how would LPC fare in dynamic, online feedback scenarios where preferences evolve, potentially requiring integration with online learning methods?



Previous Post
Large Language Model Compression with Global Rank and Sparsity Optimization
Next Post
Rethinking Meta-Learning from a Learning Lens