# Poster 31459

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/31459

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hello, my name is Oscar Mañas. I'm a fourth-year PhD student at Milan University of Montreal, and I'm also a visiting researcher at MetaFair, and today I'm going to present our work, Improving Text Image Consistency via Automatic Prompt Optimization. This work was accepted at TMLR and it was awarded a feature certification. As we all know, state-of-the-art text image models are very good at generating high-quality, aesthetically pleasing images.
The problem is that they still struggle to generate images which are fully consistent with the input prompt, uh that is that they accurately represent all of the visual concepts uh in the input prompt. Or maybe they need many trials to achieve that.
For instance, a stable division excel given the prompt a white cat and a black dog generates this image in which as you can see objects and attributes are mixed or the more recent stable division 3.5 given the prompt a horse riding an astronaut generates this image which again is not fully consistent with the input prompt. So as we can see these issues are still prevalent even in the more recent open source text image models.
Our idea is to pair the text image model with a large language model and instruct the LLM to act as a prompt optimizer to rephrase the user prompt to generate more consistent images. Now, the output of the LLM can be directly fed to a text image model, but the text image model generates images and the LLM takes text as input. So, to bridge this gap, we propose to use a scoring function which takes the generated images and text prompts as input and outputs a score which can be easily reformatted as text to be fed to the LLM.
More concretely, our method works as follows. Given the user-provided prompt, we feed it to a text-in-s model to generate a few images which may not be fully consistent with the prompt. And when evaluated with this image text consistency scorer, we obtain something like this. A global score, which in this case is 67%, so not perfect. And also we get a breakdown of which visual elements are actually present in the generated images. Now the idea is to take the initial user prompt,
the output of the scoring function and feed them to our text image prompt optimizer which after a few iterations of optimization comes up with a new optimized prompt which when fed to the text image model will generate images that are on average more consistent with the initial user provided prompt and of course when evaluated with the scoring function we get a perfect score.
Zooming into this text-image prompt optimizer, again given a user prompt we generate a few images with our text-image model and each of these images is independently evaluated with our consistent symmetric, always against the user-provided prompt. The output of this consistent symmetric are those fine -grained consistency scores that I showed and these are used to build our prompt history which is just a list of prompts and consistency scores.
Then we added our description and these forms our meta prompt. The meta prompt is used to adapt an off-the-shelf LLM behind context learning to act as a prompt optimizer. Basically this test description instructs the LLM to rephrase the user prompt to generate a few revised prompts which will maximize this consistency metric. So basically taking into account the feedback from the consistency metric. These revised prompts are then used to generate more images which are again evaluated with our consistency metric.
And the output of this consistent symmetric is then used to update the prompt history. And this optimization, this iterative optimization process continues either for a fixed number of iterations or until a desired level of consistency is reached. Finally, here we have some results. These plots show optimization curves tracking max and mean relative improvement in text image consistency across device prompt spread iteration and also average across a dataset of prompts.
In our experiments, we consider MS-COCO and Party Prompts as benchmarks, Decomposed Clip Score and DSG as consistency scores. The different colors in these plots correspond to different combinations of text-image model and LLM. And this dashed horizontal line represents our paraphrasing baseline, which consists simply in instructing the LLM to generate random paraphrases of the user prompt without taking into account any consistency metric.
What we observe is an overall upward trend which confirms that the LLM in our framework is indeed capable of optimizing text image prompts, and we also observe that our method consistently outperforms the paraphrasing baseline, which means that taking into account the feedback from the consistency metric helps in finding prompts that achieve a higher consistency score. So that's all. Thank you so much for listening.
