Pairwise GUI Dataset Construction Between Android Phones and Tablets

Han Hu, Haolan Zhan, Yujin Huang, Di Liu

In the current landscape of pervasive mobile computing, applications frequently exist across both smartphones and tablets. Although these apps share most functionalities and core graphic user interfaces (GUIs), the transition between form factors is rarely seamless. Developers often find themselves rebuilding tablet interfaces from scratch, a process that escalates costs and squanders existing design resources.

While researchers have attempted to use deep learning to automate cross-platform GUI generation, they have been severely hindered by a gap in available data. To bridge this gap, researchers have introduced Papt, the first large-scale dataset of pairwise GUIs across Android phones and tablets. By providing a "before-and-after" mapping of how apps adapt to different screen sizes, this work establishes a new benchmark for automating responsive UI design.

The Challenge of Cross-Platform UI Design

Existing datasets like Rico or UI2Code contain thousands of individual phone screenshots, but they lack pairwise correspondence. In other words, they do not show how a specific phone screen relates to its tablet counterpart. Without these pairs, generative models cannot learn the "rules" of responsive design—such as when to expand a list into a grid, or when to add a multi-pane layout.

Example of a pairwise GUI mapping between a phone and tablet layout. Notice how the tablet version introduces a sidebar and changes a vertical list into a grid.

Tablet GUIs are not simply "big phone" GUIs. As illustrated above, tablet interfaces often introduce entirely new component groups (like sidebars) or fundamentally change the nesting structure of the UI. This makes automated conversion much harder than simple resizing.

Methodology: How to Collect Pairwise Data

To build a comprehensive dataset, the authors developed a two-pronged algorithmic approach to collect and pair GUI data from 5,593 unique apps:

1. Dynamic Resolution Adjustment

For apps that utilize "Responsive/Adaptive" layouts—where the app detects the screen size and changes automatically—the researchers employed a clever "Resolution Hack." They used the Android Debug Bridge (ADB) to programmatically force a single device to switch between phone and tablet resolutions. This allowed them to capture the exact same app state in two different layouts, generating perfectly synchronized ground-truth data.

The Dynamic Resolution Adjustment pipeline, which uses ADB to programmatically toggle resolutions on a single device to capture synchronized layouts.

2. UI Similarity-Based Pairing

For apps that do not automatically adapt and instead use separate APKs or hardcoded layouts, the team crawled separate phone and tablet versions. They used a pre-trained BERT model to match "Activities" (specific app screens) based on their internal names (e.g., MainActivity). They then refined these pairs by ensuring that at least 50% of the UI components (buttons, text views) were semantically similar.

To ensure high data quality, a panel of three experts manually reviewed the automated pairings, removing roughly 2,300 inconsistent or mismatched pairs.

The Papt Dataset

The resulting Papt dataset contains 10,035 phone-tablet GUI pairs sourced from 5,593 apps across 22 categories (with Entertainment, Social, and Communication being the most common). Each pair includes both the visual screenshots and the underlying XML metadata (the DOM tree) for both devices.

Compared to established baselines like Rico, Enrico, and Clay, Papt is the only dataset providing cross-platform pairs. It also boasts higher data accuracy by eliminating "visual mismatches" where the underlying metadata doesn't match the rendered screenshot.

Evaluating Current Deep Learning Models

By testing state-of-the-art layout models on this new dataset, the authors realized that current AI struggles significantly with this task. They evaluated three generative models—LayoutTransformer, LayoutVAE, and VTN—on converting a phone GUI layout into a tablet layout.

  • Top Performer: VTN (Variational Transformer Network) emerged as the best model, likely due to its ability to handle global relationships via self-attention.
  • The Performance Gap: Despite being the top performer, VTN only achieved a Matched Rate of 0.19. This means it successfully reproduced only about 20% of the UI components found in the actual ground-truth tablet layouts.
  • Perceptual Quality: Qualitative results showed that while models can place bounding boxes on a screen, they often fail to maintain the logical margins, alignments, and deeply nested hierarchies necessary for a functional, aesthetically pleasing user interface.

Limitations and Future Directions

The primary limitation identified in the study is non-correspondence. Often, a tablet screen contains content from multiple phone screens (e.g., a split-view email app showing both the inbox list and an open message). Current models only take one phone screen as input, making it impossible to "predict" the extra content that should appear on the tablet.

Moving forward, the authors suggest several promising research directions:

  1. Multimodal Fusion: Combining structural XML data with actual pixel information from screenshots to help models better understand visual context.
  2. Handling Multi-Page Mapping: Developing models capable of aggregating multiple phone GUI pages into a single, cohesive tablet interface.
  3. Improved Encoding: Finding better ways to represent the deeply nested "tree" structure of mobile layouts so that deep learning models can parse and generate them more effectively.

Summary updated

BibTeX
@inproceedings{hu2023pairwise,
  author = {Han Hu and Haolan Zhan and Yujin Huang and Di Liu},
  title = {{Pairwise GUI Dataset Construction Between Android Phones and Tablets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=8gDJXL652A},
}
Figure