TL;DR
This paper systematically investigates preference alignment for image inpainting using Direct Preference Optimization (DPO). The authors reveal that off-the-shelf reward models suffer from severe, opposing aesthetic biases (e.g., favoring extreme brightness vs. muted tones), which trigger "reward hacking" during training. By introducing a calibrated reward ensemble method, they eliminate these biases and achieve new state-of-the-art performance across multiple benchmarks without altering the underlying model architectures.
What Problem Does This Paper Address?
While text-to-image generation has benefited immensely from human preference alignment techniques like RLHF and DPO, image inpainting—the task of filling in missing or masked regions of an image coherently—has largely been left behind.
Aligning inpainting models with human preferences is uniquely challenging. Gathering human annotations for what makes a "good" edit is incredibly expensive and scales poorly. To bypass this, researchers typically turn to automated, off-the-shelf reward models (like HPSv2 or PickScore) to score generated images and build preference datasets.
However, this paper highlights a major trap: reward hacking. Because these reward models were trained on different datasets, they possess deep, systematic biases regarding brightness, color scheme, and composition. Blindly optimizing an inpainting model against a single reward model forces it to exploit these biases, resulting in weird, unnatural images that satisfy the reward model but look terrible to humans.
Methods
Instead of proposing a completely new generative architecture, the authors revisit preference alignment from first principles using Direct Preference Optimization (DPO). They apply this to two distinct baseline models: BrushNet (a U-Net/DDPM architecture) and FLUX.1 Fill (a Transformer/Flow Matching architecture).
To overcome reward hacking, they propose two ensembling strategies:
- Ensemble Reward via Mean Rank (Vanilla Ensemble): For a given prompt, they generate 16 candidate images. They rank these candidates using nine different public reward models and average their ranks. The top-ranked image becomes the preferred sample ($y^w$), and the bottom becomes the dispreferred sample ($y^l$).
- Calibrated Ensemble (CaEN): Recognizing that different reward models have different score distributions and variances, they reformulate the objective. CaEN uses a pairwise win-rate formulation (an indicator function of whether image $A$ beats image $B$) across the ensemble. This aligns the scales of different reward models and strips away variance discrepancies, preventing any single biased model from dominating the loss function.
Datasets
The authors evaluated their approach across several diverse datasets:
- BrushData / BrushBench: Used for training and evaluating creative, open-ended image inpainting.
- EditBench: A standard benchmark used to evaluate text-guided image editing and inpainting.
- I Dream My Painting: An additional dataset used to test the out-of-distribution generalization of their models.
- RORem / RORD-Val: Used to evaluate the model on object removal, shifting the focus from creative generation to seamless background completion.
Key Insights and Ideas
- The Bias Tug-of-War: The authors uncovered a fascinating polarization between popular reward models. HPSv2 aggressively favors high brightness, intricate compositions, and vivid colors. Conversely, PickScore prefers dim lighting, simple compositions, and muted tones.
- Bad Evaluators Can Still Be Good Teachers: Surprisingly, models like CLIPScore, VQAScore, and Perception failed the "oracle" test—meaning they couldn't even correctly score models trained on their own data. Yet, when their scores were used to construct large-scale training datasets, they still provided valid directional signals that improved the final model.
- Ensembling Neutralizes Hacking: By averaging ranks or calculating pairwise win-rates across an ensemble, the opposing biases of models like HPSv2 and PickScore cancel each other out. This yields a balanced, aesthetically pleasing middle ground that aligns tightly with actual human preferences.
- Alignment Suppresses Hallucinations: When applied to object removal, preference alignment acts as a regularizer, suppressing the model's natural tendency to hallucinate or invent spurious objects in the masked region.
Key Results
The authors named their preference-aligned models BruPA (BrushNet + Preference Alignment) and FluPA (FLUX.1 Fill + Preference Alignment).
Using GPT-4 as an automated, multi-dimensional judge (evaluating aesthetics, structure, and semantics), the ensemble-aligned models significantly outperformed all prior state-of-the-art methods:
- On BrushBench, FluPA achieved a GPT-4 score of 87.609, compared to the baseline FLUX.1 Fill score of 83.935.
- On EditBench, FluPA scored 72.307, beating the baseline's 67.465.
- In human user studies, volunteers consistently preferred the outputs of BruPA and FluPA over competing methods by a wide margin.
The visual improvements are striking, showing much higher semantic fidelity and contextual awareness:
Furthermore, the Calibrated Ensemble (CaEN) variant pushed performance even higher, achieving the best results in 8 out of 10 evaluation categories by successfully mitigating the variance differences between the underlying reward models.
Limitations and Future Work
- Dimensionality Constraints: The study is strictly confined to 2D image data. The authors note that extending these preference alignment insights to video and 3D inpainting remains an open frontier.
- Residual Bias: While the calibrated ensemble significantly dampens reward hacking, it does not completely eliminate the shared biases that might exist across all current public reward models.
- Social Impact: Because these models drastically improve the realism of image editing, they inherently increase the risk of generating highly convincing deepfakes or manipulated photographic evidence.
Summary updated