Editor’s introduction
The study evaluates a flow-matching framework that uses valence-arousal conditioning and a neutral semantic anchor to maintain content fidelity during emotion-based image generation. It compares generated images against original prompts and target emotional values, measuring emotional expressiveness and text–image alignment through participant ratings. The method reduces emotional drift seen in baseline approaches, where stronger emotional cues cause unintended changes in scene structure or composition. Evidence from 3,300 prompt-emotion pairs shows improved valence and arousal accuracy and better CLIPScore than prior models, though image quality drops slightly in reference-free settings. The strongest support for the anchor mechanism comes from direct comparison between anchor-included and anchor-only variants on the SD3.5M backbone, where the anchor improves both emotional alignment and semantic consistency despite a small increase in VA error. The results are specific to the SD3.5M configuration and do not isolate the contribution of GRPO alone.
Introduction
Emotion-aware image generation aims to control not only what an image depicts, but also the affect that it conveys. This capability is useful in affective computing, human–computer interaction, personalized content creation, and creative or therapeutic applications. Meanwhile, modern text-to-image models provide strong semantic priors for generating complex scenes from natural-language prompts. Combining these two forms of control raises a central question that how can a generator change the perceived emotion of an image without changing the content requested by the user?
This question is nontrivial because visual emotion is not an independent style attribute. Perceived affect arises from the interaction of global appearance cues, such as color, illumination, and atmosphere, with semantic cues, such as objects, actions, and scene context. Some appearance cues can be adjusted while preserving the depicted event, whereas changing an object or action may alter both affect and meaning. A useful emotional generator must therefore distinguish affective appearance changes from prompt-inconsistent semantic changes.
The valence–arousal (VA) model represents emotion in a continuous two-dimensional space, where valence describes pleasantness and arousal describes activation. Compared with discrete emotion labels, VA coordinates support gradual changes and interpolation between affective states. EmotiCrafter introduces this continuous control into text-to-image generation by injecting VA values into textual features. However, the emotion condition and the prompt semantics remain coupled in the learned representation. As the VA condition becomes stronger, the generator may alter objects, scene layout, illumination, or event content instead of changing affect alone.
Continuous Emotion-Conditioned Generation
Early emotion-conditioned generators commonly use categorical labels such as happiness, sadness, and anger. EmoGen maps discrete emotion labels to visual content descriptors for domain-free emotional image generation. Its control variable is therefore drawn from a finite set of categories, whereas our method accepts an arbitrary numerical coordinate in the continuous VA space together with a free-form prompt. Although category-based control is intuitive, it does not directly capture gradual affective transitions or distinguish nearby affective states within the same category.
Dimensional affect models instead represent emotion in a continuous space. The circumplex model characterizes affective states using valence and arousal. EmotiCrafter injects a target VA coordinate into the text features of a pretrained text-to-image model, enabling a free-form prompt and continuous emotion values to be specified jointly. Visual-emotion analysis has progressed from stimuli-aware feature extraction and scene–object relational reasoning to subjective emotion-distribution learning and cross-modal semantic-guided pretraining. Recent studies have further enhanced visual-emotion representation through hierarchical feature interaction, structured emotional annotations, and multimodal VA recognition. These studies primarily improve affect understanding and representation, whereas our work focuses on using continuous VA signals to guide image generation while mitigating semantic drift. In particular, they do not directly optimize the VA error of the final image together with a paired constraint that preserves the prompt-conditioned scene.
Reinforcement Learning in Generative Models
Many objectives in image generation, including human preference, aesthetics, and task-specific scores, can only be evaluated after an image has been decoded. Preference datasets and learned reward models provide output-level supervision for these objectives. Policy optimization offers a means of improving such terminal objectives without differentiating through the evaluator. DPOK applies policy gradients with KL regularization to diffusion-model fine-tuning, while DDPO formulates iterative denoising as a Markov decision process. Score-based SDE models provide a stochastic-process foundation for diffusion generation, and continuous-time formulations further connect generative modeling with stochastic control.
PPO introduces clipped policy updates for stable optimization. GRPO estimates relative advantages from a group of sampled outputs and avoids the need for a separately trained value model. DanceGRPO extends group-relative optimization to diffusion-based visual generation. Flow-GRPO adapts this approach to flow matching by replacing the deterministic training sampler with a marginal-preserving SDE and reducing the number of online denoising steps. Related group-relative objectives have also been investigated for masked generative models.
These methods provide general mechanisms for optimizing decoded-image objectives, but the resulting behavior remains dependent on the task-specific reward and constraints. In emotional synthesis, a VA reward alone may favor semantic shortcuts, whereas an overly strong semantic penalty may suppress perceptible emotional changes. We therefore adopt Flow-GRPO rather than redefining it. Its role is to make the final-image VA signal amenable to optimization in a flow-matching generator, while our task-specific contribution is to couple this policy objective with continuous VA conditioning and a semantic reference matched by prompt and initial latent.
Reinforcement Learning in Affective Computing
Reinforcement learning has also been explored in affective computing to optimize emotion-related objectives using feedback from generated or recognized visual content. In this setting, the supervision is typically obtained from the output rather than imposed solely through the generation process, making it relevant to our use of final-image VA supervision. EmoFeedback2 uses a large vision–language model to evaluate generated images and provide both an emotion-aware score and textual feedback. Its feedback loop uses the vision–language model to guide subsequent generation. EmoSENSE instead adopts hierarchical fuzzy reinforcement learning: a high-level module associates discrete emotion categories with visual attributes, while a low-level module adjusts the attribute mapping for different emotion–object combinations. These studies demonstrate the value of output-level feedback, but their control variables and optimization signals differ from those of continuous VA-conditioned synthesis.
More specifically, the differences between these approaches and ours lie in three aspects. First, EmoSENSE employ categorical emotion control simlar as EmoGen, whereas our method uses a continuous VA coordinate. Second, EmoFeedback2 obtains learned score-and-text feedback from a vision–language model, whereas our scalar reward is defined as the negative numerical distance between the predicted and target VA coordinates. Third, our optimization incorporates a zero-VA image generated from the same prompt and initial latent as a paired semantic reference; neither categorical control nor affective feedback alone provides this constraint. This distinction motivates the proposed joint objective, and we do not claim that reward optimization or Flow-GRPO itself constitutes a novel contribution. Because the published systems employ different emotional interfaces, backbones, and evaluation protocols, the present experiments do not constitute a direct quantitative comparison with EmoGen, EmoFeedback2, or EmoSENSE.
Problem Formulation
These two requirements are tightly coupled and, in practice, often conflict with each other. When the emotional signal becomes stronger, the generator may indeed move closer to the desired emotion in the valence-arousal space, but such improvement is frequently achieved at the cost of semantic fidelity. For example, instead of expressing emotion through subtle changes in color tone, lighting, facial expression, or atmosphere, the model may alter the scene composition, replace important objects, or modify the environment in a way that changes the meaning of the original prompt. We refer to this phenomenon as emotion-semantic drift. Therefore, emotional image generation should not be viewed as a pure emotion prediction problem or a pure text-to-image generation problem, but rather as a joint optimization problem in which emotional expressiveness must be improved under an explicit semantic preservation constraint.
Based on this observation, we treat the denoising generator as a policy and optimize two complementary terms: a terminal reward for continuous emotion alignment and an anchor regularizer for semantic preservation. The reward is defined on the final decoded image and can therefore be optimized without differentiating through the frozen VA predictor. The anchor term remains differentiable through the generated image and restricts the policy from obtaining a high emotional reward through large content changes. Sections III-C–III-F define the conditioning mechanism, anchor regularizer, stochastic policy, and joint objective, respectively.
Framework Overview
If trained only on emotional reward, the model could exploit shortcuts by altering scene structure to improve the emotion score. Conversely, training only on the anchor would suppress emotional variation. Our framework balances these forces: Flow-GRPO encourages emotionally accurate generation, while the anchor constraint regularizes the optimization trajectory so that the learned policy remains faithful to the original content. In this sense, the entire method can be understood as a constrained emotional generation framework in which emotion alignment is directly optimized under semantic preservation.
Anchor-Based Semantic Constraint
Although continuous emotion injection allows the model to condition generation on target valence-arousal values, this alone is not sufficient to guarantee semantic fidelity. A common failure mode in emotion-conditioned generation is that the model reduces emotional prediction error by making large semantic changes to the image, such as altering the scene type, replacing key objects, or dramatically changing the layout. These changes may improve the score of an emotion predictor, but they do so by violating the intended content of the prompt. To explicitly discourage such behavior, we introduce an anchor-based semantic constraint.
Qualitative Results
For example, in the meadow and mountain scenes, the baseline outputs exhibit noticeable deviations from the original content, including changes in atmosphere and scene composition. Similarly, in the river and beach cases, structural elements such as terrain and water flow become less consistent. In the horses example, the baseline introduces additional variations in background and subject arrangement.
In contrast, the selected outputs from our method retain more of the prompt-level content while producing emotionally varied images. Scene layout, object identity, and spatial relationships are generally more stable than in the baseline examples, indicating an overall reduction rather than complete elimination of emotion–semantic drift. Figures 8 and 9 further illustrate this tendency across the valence-arousal space for a person-centric prompt and a landscape prompt, respectively.
Our Method Analysis
Compared with the baseline, our anchor-constrained GRPO method (right grid) more often retains the prompt’s central subject and key objects across the VA conditions. The boy, tree, and comic book remain identifiable in most samples, although local details and the background may still vary. The grid therefore suggests that the proposed method reduces emotion–semantic drift overall, rather than guaranteeing exact semantic preservation at every VA coordinate. Moreover, emotional variation is expressed mainly through attributes such as facial expression, color temperature, illumination, and atmosphere. This behavior supports smoother affective transitions with fewer large scene changes, while still allowing residual content variation and generation artifacts.
Quantitative Results
The SDXL All configuration jointly applies GRPO and the anchor on the SDXL backbone. It remains close to EmotiCrafter in VA error and CLIPScore, whereas replacing the backbone with SD3.5M yields a substantially larger improvement. The results should therefore be interpreted as evidence for the complete SD3.5M-based configuration, rather than attributing the full gain to GRPO alone. The strongest evidence for the anchor mechanism comes from comparing our full method with the GRPO-only variant on SD3.5M, as shown in Table I. GRPO-only achieves slightly lower VA errors (1.097/1.375) but sacrifices CLIPScore (28.648). In contrast, adding the anchor loss boosts CLIPScore to 30.179 (+1.531) with only a minor increase in VA error. This trade-off is precisely the intended behavior, where the anchor constraint prevents the model from exploiting semantic shortcuts (e.g., changing scene layout or objects) to game the VA reward, thereby preserving the prompt’s original content while maintaining strong emotional expressiveness.
Moreover, relative to the SDXL-based counterpart in Table II, the SD3.5M configuration reduces V-Err by 0.359 (24.1%) and A-Err by 0.344 (18.7%), while increasing CLIPScore by 2.291. IQA decreases from 0.912 to 0.861, so the comparison supports improved emotional alignment and prompt consistency but not an across-the-board quality gain.
Ablation Study
On SD3.5M (Group 1), using only the anchor loss yields a CLIPScore of 29.183, compared with 27.742 for EmotiCrafter, but its VA errors remain 1.174/1.652. Using only GRPO produces the lowest VA errors (1.097/1.375) among the SD3.5M variants but a lower CLIPScore of 28.648. Their combination achieves the highest CLIPScore among the SD3.5M variants (30.179) while retaining low VA errors (1.132/1.492). The complementary pattern is consistent with the intended roles of the two terms: GRPO emphasizes emotional alignment, whereas the anchor penalizes semantic deviation.
The anchor constraint restricts semantic variation, making VA optimization harder: on SD3.5M, adding the anchor increases V-Err by 0.035 and A-Err by 0.117 compared to GRPO-only, but raises CLIPScore by 1.531. This confirms reduced semantic shortcutting, though CLIPScore alone does not fully measure scene-structure preservation.
GRPO-only achieves the lowest VA errors (1.097/1.375), but its CLIPScore (28.648) is 1.531 below that of the full method. The combination of GRPO and the anchor therefore provides the best observed balance among the SD3.5M variants. The comparison with SDXL All further shows that the stronger SD3.5M backbone contributes materially to the reported VA-error and CLIPScore gains; this conclusion does not extend to IQA, on which SDXL All remains higher.
User Study
To complement the automatic metrics and directly assess human perception of emotional expressiveness and text–image alignment, we conduct a user study comparing the proposed method with EmotiCrafter and an ablation variant without the anchor constraint (Ours w/o Anchor).
Participants
A total of 30 volunteers (18 female, 12 male; age 18–41) are recruited via a university mailing list. All participants have normal or corrected-to-normal vision and are fluent in English. Each participant evaluates a random subset of 50 images to reduce fatigue.
Evaluation Protocol
For each image, participants are presented with the original text prompt and the corresponding target VA values (e.g., “Valence = 3, Arousal = 3: very happy and excited”). They then rate the generated images along two independent dimensions using a 5-point Likert scale. The first dimension measures emotional expressiveness, indicating how well the image reflects the target emotion (1 = not at all, 5 = perfectly). The second dimension evaluates text–image alignment, reflecting how well the image matches the content described in the prompt (1 = not at all, 5 = completely).
Results
As summarized in Table IV, the proposed method receives higher mean ratings than both baselines on the two evaluation dimensions. Text–image alignment increases from 2.72 for EmotiCrafter to 4.45 for the proposed method, while emotional expressiveness increases from 3.67 to 4.32. These human ratings complement the model-based VA errors and support the intended emotion–semantic balance.
The human evaluation results show higher mean ratings for both text–image alignment and emotional expressiveness in the evaluated samples. These results are consistent with an improved emotion–semantic balance, but they do not imply that the anchor prevents semantic drift in every generated image.
Discussion in Emotional Image Generation
Within our evaluation setting, Flow-GRPO reduces the continuous VA error, while the anchor improves CLIPScore over GRPO-only; the SD3.5M backbone further contributes to both improvements. These results suggest that emotional alignment and semantic preservation require complementary optimization objectives. In particular, the anchor helps mitigate the semantic degradation that may arise when optimizing primarily for emotional alignment.
Conclusion
In this paper, we presented an anchor-regularized Flow-GRPO framework for continuous emotion-conditioned image generation. The marginal-preserving ODE-to-SDE conversion provides stochastic transition densities for online policy optimization, the frozen VA regressor supplies a terminal emotion reward, and the zero-VA anchor penalizes semantic deviation in the CLIP visual space. On the evaluated benchmark, the full SD3.5M configuration obtains the lowest valence and arousal errors and improves CLIPScore over EmotiCrafter and the GRPO-only variant. The lower IQA score relative to several baselines shows that stronger emotional alignment does not automatically imply uniformly higher perceptual quality. Overall, the results support joint reward optimization and semantic regularization as a practical direction for continuous-affect image synthesis.


