TL;DR
Floe is a hybrid federated learning framework that bridges cloud-hosted, black-box Large Language Models (LLMs) with edge-deployed Small Language Models (SLMs) for real-time, privacy-preserving inference. By combining hardware-adaptive LoRA fine-tuning with logit-level fusion, Floe delivers highly personalized, high-performance text generation while keeping sensitive user data strictly on-device.
What Problem Does This Paper Address?
Deploying state-of-the-art Large Language Models (LLMs) directly on edge devices (like smartphones or IoT hardware) is currently blocked by a "memory wall." For instance, running a 65-billion-parameter model requires over 130 GB of memory just for inference, far exceeding edge hardware capacities.
While federated learning (FL) offers a way to train models collaboratively without centralizing private user data, standard federated LLM approaches face severe real-world bottlenecks:
- Proprietary Black Boxes: The best-performing LLMs (e.g., GPT-4, Gemini) are closed-source. Their weights are inaccessible, making standard white-box fine-tuning or model-splitting techniques impossible.
- Resource Constraints: Edge devices have highly diverse compute and memory limits (system heterogeneity).
- Data Heterogeneity: User data across devices varies wildly in task types and distributions (non-IID data), leading to "negative transfer" where a single global model performs poorly for everyone.
Small Language Models (SLMs) can run locally on edge devices, but they lack the broad reasoning and general knowledge of cloud-scale LLMs. The authors introduce Floe to solve this dilemma, creating a framework where cloud LLMs and edge SLMs collaboratively generate text without compromising user privacy or model intellectual property.
Methods
Floe operates in two distinct phases: Federated Fine-Tuning and Collaborative Inference.
1. Federated Fine-Tuning Phase
Instead of tuning the massive cloud LLM, Floe uses the edge-deployed SLM as the global base model.
- Heterogeneity-Aware Adaptive-Rank LoRA: To accommodate varying hardware capabilities, each edge device dynamically adjusts its Low-Rank Adaptation (LoRA) rank ($r$) based on local memory budgets and global latency deadlines. Devices with less memory use a lower rank, while more powerful devices use a higher rank.
- Task-Specific Aggregator: Rather than naively averaging all client updates, the server projects the local LoRA modules into a task-aware embedding space, clustering them using a $k$-means algorithm. This allows cluster-wise, task-specific aggregation to preserve specialization and handle cross-task data heterogeneity.
2. Collaborative Inference Phase
During inference, the system harmonizes the cloud LLM's general knowledge with the local SLM's personalized context.
- Two-Stage Privacy Detector: Before any data leaves the device, a local heuristic filter checks the prompt. Stage 1 uses regex and Named Entity Recognition (NER) to catch explicit identifiers (e.g., phone numbers, financial terms). Stage 2 uses semantic embedding similarity to detect implicit privacy cues. If a prompt is flagged as sensitive, it bypasses the cloud entirely and runs solely on the local SLM.
- Prompt-Wise MoE Router: For non-sensitive prompts, a parameter-free Mixture-of-Experts (MoE) router dynamically blends the aggregated LoRA modules on the edge device based on the prompt's embedding, tailoring the local SLM to the specific task.
- Logit-Level Fusion: The cloud LLM and the local SLM run inference in parallel. Floe merges their output probability distributions (logits) using a lightweight alignment module that computes a dynamic fusion weight.
- Real-Time Fallback: If network conditions degrade and cloud logits fail to arrive within a predefined latency budget (e.g., 200ms), the system automatically forces the fusion weight to favor the local SLM, ensuring a fluid user experience.
Datasets
The authors evaluated Floe using several benchmarks and datasets:
- CoGenesis: A real-world user interaction dataset for privacy-sensitive tasks, partitioned by User IDs to simulate distinct data islands.
- Flanv2: A multi-task benchmark spanning 10 distinct task clusters (e.g., Translation, Sentiment Analysis, Reading Comprehension) used to simulate task-level non-IID data heterogeneity.
- WikiText2: Used to measure system efficiency metrics, such as computation latency and energy consumption on edge hardware.
- Big-Bench Hard (BBH): A suite of 23 challenging multi-domain reasoning tasks used to evaluate downstream task performance.
Key Insights and Ideas
- Logit Fusion Bypasses the Black Box: Floe proves that collaboration between edge and cloud models doesn't require access to internal weights or activations. By combining models at the final decoding stage (logits), proprietary cloud models can safely interact with open-source local models.
- The Specialization Hypothesis: Analysis of the dynamic fusion weights revealed a distinct skew toward the local SLM ($w > 0.5$). This empirically validates that a fine-tuned local SLM often yields lower entropy (higher confidence) for domain-specific tokens than a zero-shot cloud LLM.
- Zero Effective Latency Penalty: When network Round-Trip Time (RTT) is low (<100ms), the cloud communication overhead is completely masked by the local SLM's parallel computation time, meaning the hybrid intelligence comes at no extra latency cost to the user.
Key Results
- Downstream Accuracy Boost: On the BBH benchmark, Floe outperformed the standalone untuned SLM baseline by 14.2% and beat the conventional standalone LLM (Gemma-7B) by 3.6%.
- Hybrid Synergy: When pairing commercial APIs, a hybrid setup of GPT-3.5-Turbo + a specialized local SLM actually outperformed standalone GPT-4-Turbo on specific tasks like email generation (6.23 vs 3.79 score).
- Massive Communication Savings: Because Floe only transmits compact LoRA modules rather than full or compressed model parameters, it reduces upload and download communication latency by 99% compared to traditional model compression baselines.
- Robust Privacy Filtering: The on-device Privacy Detector achieved a 94.3% F1 score, successfully routing over 93% of sensitive prompts strictly to the local SLM, completely bypassing the cloud.
Limitations and Future Work
The authors note three primary limitations:
- Heuristic Privacy Limitations: The two-stage privacy detector is a heuristic filter, not a formal cryptographic guarantee. Its 91.7% recall rate implies that a small percentage of sensitive queries could still accidentally leak to the cloud.
- Vocabulary Mapping Dependency: Logit-level fusion assumes that the tokenizers and vocabulary distributions of both models are known and mappable. If a cloud provider completely conceals its logit vocabulary, this fusion mechanism fails.
- Hardware Bias in Data Contribution: Because the framework assigns lower LoRA ranks to weaker hardware to prevent Out-Of-Memory (OOM) errors, the final aggregated model may under-utilize high-quality local data that happens to reside on resource-constrained devices.
Summary updated