PolyDroid: Learning-Driven Specialization of Mobile Applications

Brian Heath, Neelay Velingker, Osbert Bastani, Mayur NaikarXiv 2019

Introduction

Mobile application developers face a significant challenge in balancing high-quality user experiences (UX) with the diverse resource constraints of mobile hardware. An app that performs flawlessly on a flagship device may drain the battery or exceed data limits on a budget handset. Furthermore, user preferences are dynamic; a traveler may prioritize data savings over image resolution, while the same user at home expects full fidelity. Currently, developers must manually implement "saver" modes—a process that is both labor-intensive and prone to error.

PolyDroid introduces an automated system designed to specialize mobile applications to meet specific resource constraints while maximizing UX. By decoupling app implementation from the optimization of UX-resource trade-offs, PolyDroid allows for personalized, context-aware application behavior.

The PolyDroid Framework

The PolyDroid workflow automates the specialization process through several integrated stages:

  1. Reductions and Test Scripts: Developers provide the original application along with a set of candidate "reductions." These are modified versions of the app designed to consume fewer resources, such as lowering image quality, reducing frame rates, or removing non-essential animations.
  2. Resource Metering: PolyDroid executes these reductions within an emulator environment to automatically quantify their impact on CPU cycles, memory footprint, and network data usage.
  3. Active Learning via Thompson Sampling: To avoid the impracticality of asking users to rate every possible configuration, PolyDroid employs Thompson Sampling. This bandit-learning algorithm intelligently selects reductions for user evaluation based on their likelihood of being optimal or the system's current uncertainty regarding their UX impact.
Visual impact of various quality reductions in the SkyTube application, ranging from original quality to full image removal.

Learning User Preferences

A core innovation of PolyDroid is its ability to learn high-quality UX predictions with minimal user input. The system utilizes a Bayesian Prior derived from historical data of other applications. This "zero-shot" capability allows PolyDroid to form an initial estimate of how a specific reduction might affect UX even before the first user experiment.

By combining these priors with active learning, PolyDroid can adapt to individual user tolerances. For instance, one user may be highly sensitive to blurry images but indifferent to animation speeds, while another may have the opposite preference. PolyDroid captures these nuances through targeted queries, typically requiring as few as two to four user experiments to reach high accuracy.

Evaluation and Key Results

The researchers evaluated PolyDroid using a benchmark suite of 20 diverse, open-source Android applications, including SkyTube, Wikipedia, and NASA Images. A total of 139 unique reductions were tested.

Key findings from the evaluation include:

  • Efficiency: PolyDroid achieves over 80% UX prediction accuracy with just two user experiments, and exceeds 90% with four.
  • Optimization: On average, the system achieves more than 85% of the optimal UX/resource trade-off using only two user queries.
  • Contextual Sensitivity: The study confirmed that the UX impact of technical changes is highly contextual. Removing images might be acceptable in a weather app but catastrophic for a shopping or media application. PolyDroid’s learning-driven approach successfully captures these differences without manual rule-coding.

Conclusion and Future Work

PolyDroid demonstrates that automated, learning-driven specialization is a viable path toward smarter mobile applications. By leveraging active learning and historical priors, the system significantly reduces the burden on both developers and users.

Future research directions include automating the generation of reductions through program analysis, expanding the scope of reductions to include network call batching or background task management, and extending the framework to other platforms such as iOS and the web. While the current study utilized emulators for resource metering, future iterations will explore the nuances of real-world hardware characteristics to further refine the optimization process.

Summary updated

BibTeX
@misc{heath2019polydroid,
  author = {Brian Heath and Neelay Velingker and Osbert Bastani and Mayur Naik},
  title = {{PolyDroid: Learning-Driven Specialization of Mobile Applications}},
  year = {2019},
  eprint = {1902.09589},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.09589},
}
Figure