Abstract
The design process of user interfaces (UIs) often begins with articulating high-level design goals. Translating these high-level design goals into concrete design mock-ups, however, requires extensive effort and UI design expertise. To facilitate this process for app designers and developers, we introduce three deep-learning techniques to create low-fidelity UI mock-ups from a natural language phrase that describes the high-level design goal (e.g. "pop up displaying an image and other options"). In particular, we contribute two retrieval-based methods and one generative method, as well as pre-processing and post-processing techniques to ensure the quality of the created UI mock-ups. We quantitatively and qualitatively compare and contrast each method's ability in suggesting coherent, diverse and relevant UI design mock-ups. We further evaluate these methods with 15 professional UI designers and practitioners to understand each method's advantages and disadvantages. The designers responded positively to the potential of these methods for assisting the design process.
Introduction
Designing a user interface (UI) is a complex, iterative process that typically requires significant expertise and time. While professional designers might spend hours articulating and visualizing requirements, small-scale developers often lack the resources to produce high-quality mock-ups from scratch.
However, these developers often possess high-level text specifications. The challenge lies in the "translation" step: moving from a text phrase to a coherent, diverse, and relevant visual layout. Previous attempts often relied on rigid linguistic parsers or limited, human-curated design sets. This research seeks to automate this translation using the flexibility and power of modern deep learning, bridging the gap between abstract design goals and concrete visual prototypes.
Methodology
To address the text-to-UI problem, three distinct deep-learning architectures were developed, each offering unique advantages for the design workflow:
- Text-only Retriever: This baseline approach utilizes a pre-trained BERT model to embed the user's input text. It compares these embeddings against a database of existing UI captions to retrieve the UIs associated with the most semantically similar descriptions.
- Multi-modal Retriever: This more sophisticated model employs a "dual-encoder" architecture. It learns a shared embedding space where both text descriptions and actual UI structures (including element types, positions, and content) are mapped. This allows the model to find UIs that match the underlying intent of the text more deeply than simple keyword matching.
- UI Generator: Unlike the retrieval methods, this model constructs UIs from scratch using a Transformer Encoder-Decoder architecture. The encoder processes the text, while the decoder predicts UI elements as a sequence of coordinates, dimensions, and classes. To handle continuous screen positions, it utilizes a Mixture Density Network (MDN) and requires post-processing steps like "snapping to grid" to ensure professional visual alignment.
Datasets
The models were trained and evaluated using the screen2words dataset, which is built upon the massive Rico mobile UI corpus. Rico contains over 66,000 unique UI screens from Android apps. The screen2words dataset adds over 112,000 high-level text descriptions (captions) for roughly 22,000 of those screens, provided by human crowd-workers. Semantic annotations were also utilized to group UI elements into meaningful classes (e.g., "button," "image," or "text") to help the models understand functional components.
Key Insights
- Retrieval vs. Generation: Retrieval methods provide "real-world" inspiration and well-formed layouts but are limited by the existing dataset. Conversely, the Generative model can create novel layouts but requires careful post-processing to maintain professional standards.
- The Power of Multi-modality: The Multi-modal Retriever significantly outperformed the Text-only version in matching specific details. For instance, it was more effective at identifying that a "pop up with an image" should contain a large image element rather than a simple menu list.
- Context and Empty States: The UI Generator proved particularly adept at creating "empty states" (like a blank history page), learning to vary the structure of these simple pages more effectively than a retriever could find unique examples in a fixed dataset.
- Designer Workflow: Professional designers indicated that different models are useful at different stages: retrieval for early brainstorming and generation for refining specific layout ideas.
Evaluation and Results
The retrieval models were benchmarked against SWIRE, a state-of-the-art sketch-to-UI retrieval system. The Multi-modal Retriever achieved superior accuracy when tested on subsets of the data, demonstrating the effectiveness of the shared embedding space.
In a user study with 15 professional UI/UX practitioners, participants found the suggested UIs highly relevant to the text descriptions. Designers noted that these tools could provide "quick, initial mocks" to jumpstart the creative process and help communicate ideas to non-experts. While the UI Generator produced coherent variations, it occasionally lacked the broad thematic diversity seen in the retrieval methods.
Limitations and Future Work
Several areas for improvement remain. The captions in screen2words are descriptive (what is on the screen) rather than goal-oriented (what a designer wants to achieve). Future work could involve training on actual design requirement documents. Additionally, designers expressed a desire for "steerability"—the ability to "pin" certain elements while the model regenerates the rest of the layout. Finally, balancing the generative model's output between "legal" layouts and creative novelty remains an open challenge.
Summary updated