ICML 2026
Yuanzhi Wang, Xuhua Ren, Jiaxiang Cheng, Bing Ma, Kai Yu,
Tianxiang Zheng, Qinglin Lu, Zhen Cui
Tencent Hunyuan
TL;DR: We introduce Implicit Preference Alignment (IPA), a pair-free post-training objective that learns from self-generated high-quality videos while staying close to a frozen pretrained flow model.
- No strict preference pairs. IPA learns from curated good samples without requiring a matched bad sample for every training example.
- Implicit reward maximization. A frozen pretrained model anchors the trainable model while the KL-gap objective moves it toward the preference distribution.
Figure 1. IPA removes the need for bad samples and aligns a trainable model against a frozen pretrained reference through an implicit preference objective.
Standard DPO-style preference optimization requires strict good-bad pairs. This is particularly expensive for human animation because hand quality can vary from frame to frame. IPA instead uses only self-generated videos that satisfy human preferences. It learns the high-quality patterns in those samples while a frozen reference model preserves the pretrained prior.
Let
A positive gap means that the trainable model is closer to the preference distribution than the reference model. IPA encourages this through
where
For flow matching, the Flow IPA preference objective is
Here,
import torch
import torch.nn.functional as F
def halo_error(prediction, target, hand_mask, hand_region_weight=10.0):
"""Return the per-sample HALO-weighted flow error.
`hand_region_weight` is the final multiplier on hand pixels. A value of
10.0 gives hand pixels 10x weight and background pixels 1x weight.
"""
squared_error = (prediction.float() - target.float()).square()
hand_mask = hand_mask.to(
device=squared_error.device,
dtype=squared_error.dtype,
).clamp(0, 1)
video_weight = 1.0 + (hand_region_weight - 1.0) * hand_mask
weighted_error = torch.cat(
[
squared_error[:, :, :1],
squared_error[:, :, 1:] * video_weight,
],
dim=2,
)
return weighted_error.flatten(1).mean(1)
def ipa_halo_loss(
model_prediction,
reference_prediction,
target,
normalized_timestep,
hand_mask,
beta,
hand_region_weight,
):
"""Compute pair-free IPA with HALO.
Args:
model_prediction: v_theta from the trainable model.
reference_prediction: v_ref from the frozen reference model.
target: flow target v = Z_1 - Z_0.
normalized_timestep: [B] values in [0, 1].
hand_mask: latent-space hand mask.
"""
model_error = halo_error(
model_prediction,
target,
hand_mask,
hand_region_weight,
)
with torch.no_grad():
reference_error = halo_error(
reference_prediction,
target,
hand_mask,
hand_region_weight,
)
# Positive when the trainable model improves on the frozen reference.
improvement = reference_error - model_error
t = normalized_timestep.float().reshape(-1)
if t.numel() != improvement.numel():
raise ValueError("one normalized timestep is required per sample")
logits = 0.5 * beta * (1.0 - t).square() * improvement
loss = -F.logsigmoid(logits).mean()
metrics = {
"ipa_gap": improvement.detach().mean(),
"model_error": model_error.detach().mean(),
"reference_error": reference_error.detach().mean(),
}
return loss, metricsMinimal integration into a flow-matching training step:
import copy
# Create a distinct reference after loading the shared base and initial adapter
# weights, but before optimizer construction or distributed wrapping. Loading a
# second instance from the same checkpoint is equivalent.
reference_model = copy.deepcopy(model).requires_grad_(False).eval()
model_prediction = model(noisy_latents, t=timesteps, **model_kwargs)[0]
with torch.no_grad():
reference_prediction = reference_model(
noisy_latents,
t=timesteps,
**model_kwargs,
)[0]
target = noise - clean_latents
normalized_timestep = timesteps.float() / num_train_timesteps
loss_ipa, metrics = ipa_halo_loss(
model_prediction,
reference_prediction,
target,
normalized_timestep,
hand_mask,
beta=600.0,
hand_region_weight=10.0,
)If you find this work useful, please cite:
@inproceedings{wang2026implicit,
title={Implicit Preference Alignment for Human Image Animation},
author={Wang, Yuanzhi and Ren, Xuhua and Cheng, Jiaxiang and Ma, Bing and Yu, Kai and Zheng, Tianxiang and Lu, Qinglin and Cui, Zhen},
booktitle = {Proceedings of the 43rd International Conference on Machine Learning},
year={2026}
}