MUSE: Manipulating Unified Framework for Synthesizing Emotions in Images via Test-Time Optimization

Yingjie Xia, Xi Wang, Jinglei Shi, Vicky Kalogeiton, Jian YangarXiv 2025 · DOI

Abstract

Image Emotional Synthesis (IES) aims to generate or edit images to evoke specific emotional responses in viewers. Despite recent progress in diffusion models, existing IES methods often suffer from pipeline fragmentation—treating generation and editing as separate tasks—and heavy reliance on specialized datasets or expensive model finetuning. Furthermore, managing the conflict between a scene's inherent semantic content and a target emotion remains a significant challenge. We present MUSE (Manipulating Unified framework for Synthesizing Emotions), a novel framework that addresses these issues through test-time optimization. By optimizing "emotional tokens" in the text-embedding space during the denoising process, MUSE achieves state-of-the-art emotional accuracy and semantic diversity. Our approach utilizes CLIP-based semantic similarity to strategically time the introduction of guidance and a multi-emotion loss to suppress inherent and similar emotions, ensuring high-fidelity results that respect the original prompt's intent.

Introduction

The ability to synthesize images that evoke specific emotions is a cornerstone of creative AI, yet the field of Image Emotional Synthesis (IES) has been historically bifurcated. Researchers have typically developed separate models for generation (creating new images from text) and editing (modifying existing images), leading to deployment inefficiencies and inconsistent cross-task performance.

Beyond architectural fragmentation, IES faces two major hurdles: data dependency and the "Content-Emotion" conflict. Many current state-of-the-art (SOTA) methods require extensive finetuning on hard-to-collect emotional datasets. Moreover, it is notoriously difficult to inject a target emotion, such as "joy," into a scene with a strong, contradictory inherent emotion, like a "cemetery," without destroying the image's realism or semantic meaning. MUSE overcomes these hurdles by treating emotional synthesis as a test-time scaling problem, searching for optimal emotional inputs during inference rather than modifying the underlying diffusion model's weights.

Methodology

MUSE introduces a unified strategy centered on three fundamental questions: How to guide, When to guide, and Which emotions to target.

The "How, When, and Which" of Emotional Guidance

The framework operates by concatenating learnable emotional tokens ($S$) with the original text prompt ($P$). Unlike methods that apply gradient guidance directly to image latents—which can lead to adversarial artifacts—MUSE optimizes these tokens in the text-embedding space. During the denoising process, gradients from an off-the-shelf emotion classifier are back-propagated to progressively refine these tokens in an inner optimization loop.

To ensure the image content forms correctly before emotional modification, MUSE introduces a temporal control mechanism. Introducing emotional guidance too early can disrupt basic content formation, while introducing it too late makes the inherent emotions of the scene unchangeable. MUSE uses CLIP-based semantic similarity as a supervisory signal to identify the "Goldilocks zone"—starting optimization only after the image content has preliminarily formed.

Finally, to prevent "emotional drift," the authors propose a multi-emotion loss ($\mathcal{L}_{emo}$). This loss does not merely promote the target emotion; it explicitly suppresses inherent emotions (derived from the prompt or source image) and similar emotions (e.g., preventing "disgust" from bleeding into "sadness") based on psychological models like Mikel’s emotion wheel.

The MUSE framework architecture illustrating the 'How, When, and Which' strategy for emotional guidance during the diffusion process.

Experimental Results

MUSE was evaluated using several key datasets, including EmoSet for pre-training classifiers, COCO for semantic alignment, and FI_8 for external validation. It demonstrates superior performance across both generation and editing tasks.

Quantitative Performance and Fidelity

On the SDXL backbone, MUSE achieved an emotional evocation accuracy (Emo-A) of 41.87%, nearly doubling the performance of the base SDXL model (~19.48%) and outperforming specialized models like EmoGen. Despite this significant emotional shift, MUSE maintained lower (better) FID scores across COCO and EmoSet compared to other IES methods, indicating it produces more realistic images. In a blind user study, MUSE ranked highest in both emotional fidelity and content diversity, proving that its "test-time" approach aligns well with human perception.

Qualitative Success and Optimization Dynamics

The model successfully handles difficult "semantic-emotional conflicts." For instance, it can generate a "joyful cemetery" by incorporating vibrant colors and festive elements while maintaining the structural integrity of a graveyard. The effectiveness of the test-time optimization is visible in the convergence of emotion probabilities. As the inner loop progresses, the probability of the target emotion increases sharply while competing emotions are suppressed.

Optimization curve showing the rapid convergence of the 'Anger' emotion probability during the test-time optimization process.

Conclusion

MUSE represents a significant step forward in unified emotional image synthesis. By leveraging test-time optimization of text tokens, it avoids the pitfalls of adversarial latent guidance and the high costs associated with model finetuning. While the iterative nature of the optimization loop introduces additional inference latency, the gains in emotional fidelity, semantic integrity, and content diversity are substantial. Future work will explore continuous valence-arousal spaces to move beyond discrete emotion categories and improve the robustness of guidance classifiers across diverse datasets.

Summary updated

BibTeX
@misc{xia2025muse,
  author = {Yingjie Xia and Xi Wang and Jinglei Shi and Vicky Kalogeiton and Jian Yang},
  title = {{MUSE: Manipulating Unified Framework for Synthesizing Emotions in Images via Test-Time Optimization}},
  year = {2025},
  eprint = {2511.21051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.21051},
}
Figure