UISim: An Interactive Image-Based UI Simulator for Dynamic Mobile Environments

Jiannan Xiang, Yun Zhu, Lei Shu, Maria Wang, Lijun Yu, Gabriel Barcik, James David Lyon, Srinivas Sunkara, Jindong Chen

TL;DR

This paper introduces UISim, a novel image-based simulator for mobile UIs that generates realistic and interactive UI transitions from screen images and user actions. By employing a two-stage approach (layout prediction followed by image synthesis), UISim offers fine-grained control and high fidelity, outperforming existing end-to-end methods for UI simulation and paving the way for better AI agent training.

What Problem Does This Paper Address?

Developing and testing mobile user interfaces (UIs) is a complex and time-consuming process. Current methods often rely on physical devices or emulators, which are inflexible and don't scale well for comprehensive testing or training AI agents. Static analysis of screenshots is also limited, as it fails to capture the dynamic nature of real-world mobile environments. Furthermore, training AI agents to navigate and interact with these dynamic UIs requires realistic simulation environments that can generate plausible next states based on user actions. Existing simulators struggle to provide this dynamic, interactive, and visually consistent experience, especially for complex UIs.

Methods

UISim tackles this challenge with a novel two-stage pipeline:

  1. Layout Information Generation: This stage takes an initial UI screen image and a textual description of a user action (e.g., "open email app") as input. It uses a finetuned vision-language model (VLM), specifically Qwen2-VL-7B-Instruct, to predict a structured, machine-readable representation of the next UI state's layout. This layout describes UI components and their semantics.
  2. Layout-to-Image Generation: The predicted layout from the first stage is then fed into a high-fidelity image diffusion model. This model synthesizes a visually consistent and realistic UI screen image that represents the predicted next state.

This decoupled approach allows for fine-grained control over UI structure and content, breaking down the complex image-to-image UI transformation into more manageable sub-problems. It's analogous to the "Chain-of-Thought" reasoning in LLMs, where intermediate steps lead to better outcomes.

Datasets

The paper utilizes the Android in the Wild dataset [23] for training and evaluation. This dataset contains real-world mobile interactions. The authors extracted frame pairs from trajectories and annotated user actions with Gemini 1.5 Pro [29] and UI layout information using ScreenAI [4]. This resulted in a dataset of 28,306 UI state transition examples. For the second stage (layout-to-image generation), they leverage a pretrained layout-to-image diffusion model that was trained on large-scale collections of UI layout-image pairs.

Key Insights and Ideas

  • Decoupling is Key: Separating layout prediction from image synthesis is crucial. It allows for explicit control over UI structure and content, leading to more coherent and realistic transitions than end-to-end generation.
  • VLMs for Reasoning: Using a Vision-Language Model (VLM) for layout prediction allows the system to interpret both visual context and semantic user actions, enabling more intelligent reasoning about UI changes.
  • Structured Prompts for Diffusion Models: Providing a detailed, structured layout as a prompt to the diffusion model significantly improves the quality and accuracy of the generated UI screens, similar to how detailed text prompts enhance image generation.
  • Scalability through Data Leverage: The two-stage approach allows leveraging existing large-scale layout-image datasets for pretraining the image generation model, bypassing the difficulty of collecting clean image-action-image triplets for end-to-end models.

Key Results

UISim significantly outperforms two end-to-end baselines (CogV-Image and CogV-Video) in generating realistic and coherent UI screens. This is quantitatively measured by the Fréchet Inception Distance (FID) [15], where UISim achieved an FID score of 61.64, compared to 98.37 for CogV-Image and 99.51 for CogV-Video. This represents a substantial improvement, demonstrating the effectiveness of the two-stage, layout-guided approach.

Limitations and Future Work

The authors acknowledge that their system is currently focused on single-frame transitions. Future work includes:

  • Integrating multi-step simulation: Enabling the simulation of longer sequences of UI interactions.
  • Expanding to multimodal UI representations: Incorporating other modalities beyond just images and text.
  • Exploring tighter loops between layout reasoning and generative feedback: Further refining the interaction between the layout prediction and image generation stages.

They believe UISim provides a strong foundation for more scalable, flexible, and intelligent interfaces and AI agents in the future.

Summary updated

BibTeX
@inproceedings{xiang2025uisim,
  author = {Jiannan Xiang and Yun Zhu and Lei Shu and Maria Wang and Lijun Yu and Gabriel Barcik and James David Lyon and Srinivas Sunkara and Jindong Chen},
  title = {{UISim: An Interactive Image-Based UI Simulator for Dynamic Mobile Environments}},
  booktitle = {LAW @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=ubbYuG64m4},
}
Figure