FLINT: A Platform for Federated Learning Integration

Ewen Wang, Ajay Kannan, Yuefeng Liang, Boyi Chen, Mosharaf ChowdhuryMLSys 2023 · OpenReview

TL;DR

This paper introduces FLINT, a novel platform that integrates federated learning (FL) capabilities with existing machine learning infrastructure. FLINT provides a comprehensive decision workflow and tools to help engineers and researchers evaluate the trade-offs, costs, and effectiveness of deploying cross-device FL in real-world business applications, aiming to de-risk FL adoption.

What Problem Does This Paper Address?

Moving machine learning (ML) to the edge, particularly through cross-device federated learning (FL), offers significant advantages like improved privacy and reduced latency. However, deploying FL at scale for millions of users presents substantial challenges. These include estimating infrastructure costs, assessing model performance under real-world device constraints (like varying compute power and availability), and managing the complexity of integrating FL with existing centralized ML systems. Currently, many FL platforms are standalone, lacking seamless integration with established ML pipelines, and there's a lack of systematic workflows to guide decision-makers through the complex trade-offs involved in bringing FL into production responsibly.

Methods

The core contribution is the FLINT platform, a device-cloud collaborative system designed to integrate with existing ML infrastructure. Key components and methods include:

  • Integrated Platform Design: FLINT shares components like model stores and job scheduling with centralized ML platforms, while adding FL-specific functionalities.
  • On-Device Runtime Library: This library encodes FL training and inference tasks for integration into first-party or third-party applications.
  • Experimental Framework: Building on FedScale, FLINT extends simulation capabilities to realistically model FL scenarios. It uses device profiles, traces, and a virtual clock to simulate FL training under various constraints.
  • Real-World Measurements: The platform analyzes existing session logs to generate metrics and visualizations for device availability patterns and compute capabilities.
  • On-Device Benchmarks: FLINT packages models into benchmark apps to assess their performance on a diverse pool of test devices, providing insights into hardware impact.
  • Proxy Data Generator: This tool creates per-device proxy datasets from centralized data, allowing for realistic FL simulations with controlled data heterogeneity (e.g., using synthetic partitioning for non-IID data).
  • Feature Catalog: Manages both cloud and device-based features, including caching strategies for cloud features and device-side retention policies.
  • Decision Workflow: A structured process (visualized in Figure 9) guides users through evaluating FL projects, covering aspects from client participation criteria to privacy and security assessments.

Datasets

The paper does not explicitly mention specific public datasets used for training FL models. Instead, it focuses on using internal LinkedIn datasets for evaluating FL in real-world use cases (advertising, messaging, search). For benchmarking and simulation purposes, they leverage:

  • Proxy datasets: Generated from internal data using the Proxy Data Generator, designed to mimic characteristics like non-IID distributions and data quantity skew observed in real user data.
  • Device traces: Derived from anonymized session data to model client availability.
  • On-device benchmarks: Collected from a pool of 27 diverse mobile devices.

The paper also references existing benchmarks like Taobao Ad Display/Click dataset and Amazon Review dataset as potential proxies for certain tasks, and mentions Stackoverflow and Reddit for next-word query prediction.

Key Insights and Ideas

  • The critical need for integration: Standalone FL platforms are insufficient; seamless integration with existing ML infrastructure is key for practical adoption and de-risking.
  • Real-world constraints are paramount: Unlike centralized ML, FL's success hinges on understanding and modeling device heterogeneity, availability fluctuations, and user behavior. These factors significantly impact model performance and system feasibility.
  • A systematic decision workflow is essential: Navigating the trade-offs of FL (performance vs. privacy, cost vs. complexity) requires a structured approach, which FLINT provides.
  • Proxy datasets are powerful simulators: Generating realistic proxy datasets that capture data heterogeneity is crucial for evaluating FL models before production deployment.
  • On-device model size matters: Even if a model performs well centrally, its size and resource footprint on mobile devices can be a major bottleneck, necessitating careful selection and optimization.

Key Results

  • Performance Parity: For three business-critical domains (advertising, messaging, search), FLINT demonstrated that models could achieve performance comparable to centralized models, with only slight losses (e.g., -1.85% for ads, -0.18% for messaging, -1.64% for search in terms of specific metrics like AUPR and NDCG).
  • Training Time: Projected FL training times to convergence varied significantly, from 4.2 days for advertising to 18.9 hours for messaging, and 2.58 hours for search, demonstrating the impact of model complexity and data size.
  • Device Availability Impact: The paper highlights that restrictive client participation criteria (e.g., requiring WiFi, >80% battery) can drastically reduce the available client pool (down to 22% in one example), underscoring the challenge of client selection.
  • Model Size Constraints: For messaging, a centralized NLP model's embedding layer was over 500MB, requiring significant reduction (60x decrease) to fit within typical mobile app constraints (<10MB).
  • Asynchronous Training Benefits: The study suggests that asynchronous training (FedBuff) can offer speedups over synchronous methods (FedAvg), especially when client task durations are heavy-tailed and staleness limits are higher.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that proxy datasets are inherently a subset of all available signals, representing a worst-case estimation for on-device performance.
  • While FLINT can evaluate privacy-enhancing technologies (PETs), achieving desired privacy properties may still require further research and integration.
  • The security evaluation identified a potential hub-and-spoke attack scenario if an SDK's host application controls a significant portion of participants, prompting further security research.
  • Future Work:
    • The authors emphasize the need for further innovations in the device-cloud platform space, particularly for scenarios where both device-side and cloud-side data and systems can be leveraged collaboratively.
  • The paper suggests that more tabular FL datasets with sparse features, noisy labels, and heavy data quantity skew are needed for realistic benchmarks.
  • Researchers are encouraged to report model size and on-device resource usage alongside benchmark results.
  • Further security research is needed to address unique attack vectors identified in the FL context.

Summary updated

Abstract

Cross-device federated learning (FL) has been well-studied from algorithmic, system scalability, and training speed perspectives. Nonetheless, moving from centralized training to cross-device FL for millions or billions of devices presents many risks, including performance loss, developer inertia, poor user experience, and unexpected application failures. In addition, the corresponding infrastructure, development costs, and return on investment are difficult to estimate. In this paper, we present a device-cloud collaborative FL platform that integrates with an existing machine learning platform, providing tools to measure real-world constraints, assess infrastructure capabilities, evaluate model training performance, and estimate system resource requirements to responsibly bring FL into production. We also present a decision workflow that leverages the FL-integrated platform to comprehensively evaluate the trade-offs of cross-device FL and share our empirical evaluations of business-critical machine learning applications that impact hundreds of millions of users.
BibTeX
@inproceedings{wang2023flint,
  author = {Ewen Wang and Ajay Kannan and Yuefeng Liang and Boyi Chen and Mosharaf Chowdhury},
  title = {{FLINT: A Platform for Federated Learning Integration}},
  booktitle = {MLSys},
  year = {2023},
  url = {https://openreview.net/forum?id=COdBXQepx9},
}
Figure