Large-Scale Distributed Learning via Private On-Device LSH

Tahseen Rabbani, Marco Bornstein, Furong Huang

TL;DR

Researchers have developed PGHash, a new family of locality-sensitive hash functions that allows resource-constrained devices to perform "smart pruning" during training without needing to store the entire model. By using a clever "folding" technique to compress weights into a small sketch, this framework enables private, personalized, and memory-efficient federated learning for massive recommendation systems.

What Problem Does This Paper Address?

Modern neural networks, especially recommendation systems, are becoming gargantuan, often reaching billions of parameters. To train these efficiently, researchers use Locality-Sensitive Hashing (LSH) to perform "dynamic pruning." Essentially, LSH helps the system quickly find and only activate the neurons most relevant to a specific input, skipping the rest to save computation.

However, there’s a catch-22 in distributed or federated settings:

  1. Memory Bottleneck: Standard LSH (like SimHash) requires the device to perform projections using the full weight matrix. Mobile phones and even many GPUs simply don't have the RAM to hold these massive layers.
  2. Privacy Bottleneck: You can't offload this task to a central server because the server would need to see the user's private input data to figure out which neurons to activate.

This creates a "vicious circle" where devices are forced to choose between massive memory overhead or sacrificing privacy.

Methods

The authors introduce PGHash (Periodic Gaussian Hash). The core innovation is a technique called (d, c)-folding.

Comparison of SimHash and PGHash architectures

Instead of projecting a high-dimensional weight vector ($d$) against a random hyperplane as seen in standard SimHash, PGHash "folds" the vector onto itself—effectively summing up segments of the vector to create a much smaller "sketch" ($c$).

  • The "Periodic" Trick: Because the folding matrix is just a sequence of identity matrices, the device only needs to store and compute with a compressed version of the weights ($BW$).
  • On-Device Table Generation: Each device can independently generate its own hash tables using small, local Gaussian matrices. This allows for personalization, where different devices can use different numbers of hash tables or hash lengths based on their specific hardware limits.
  • PGHash-D: For tasks where the magnitude of entries matters more than the angle (common in some recommender datasets), they adapted the technique into a "Densified Winner Take All" (DWTA) variant.

Datasets

The framework was evaluated on three "extreme" multi-label classification datasets from the Extreme Classification Repository, which are standard benchmarks for large-scale recommendation:

  • Delicious-200K: ~200,000 labels.
  • Amazon-670K: ~670,000 labels.
  • WikiLSHTC-325K: ~325,000 labels.

These datasets are notoriously difficult because the feature and label spaces are incredibly sparse and high-dimensional.

Key Insights and Ideas

  • Sketching is Sufficient: The most surprising insight is that you don't need the "full resolution" of a weight matrix to identify which neurons will produce a high inner product. A compressed, "folded" sketch preserves enough angular information to make pruning decisions that are nearly as good as using the full weights.
Angular preservation comparison between SimHash and PGHash
  • Breaking the Privacy-Memory Tradeoff: By moving the LSH process entirely on-device using compressed sketches, the authors prove you can have your cake and eat it too: the server never sees the raw data, and the device never has to load the full model.
  • Induced Sparsity: The LSH process naturally leads to extreme sparsity. On the Delicious-200K dataset, the model eventually learns to activate fewer than 1% of the total neurons per sample while maintaining high accuracy.

Key Results

  • 90% Compression: PGHash remains competitive with full-scale training even when the weights used for LSH are compressed by 90%.
  • Competitive with SLIDE: In head-to-head tests against SLIDE (a popular LSH-based training framework), PGHash achieved similar or better accuracy while requiring significantly less on-device memory.
  • Faster Convergence: In federated settings (using 4 or 8 devices), PGHash actually converged to near-optimal accuracy faster than the standard "Federated Averaging" (FedAvg) baseline.
  • Efficiency: For the Amazon-670K dataset, PGHash-D matched the performance of full-scale DWTA while storing less than a tenth of the parameters required for the hashing process.

Limitations and Future Work

  • Angular Sensitivity: The theoretical analysis suggests that while PGHash is excellent at finding highly similar vectors, it might be less reliable at differentiating between vectors that are "intermediately" dissimilar.
  • Scope of Application: Currently, LSH-based pruning has mostly shown success in massive classification layers (the "output" layer) or attention layers in Transformers. Its utility for standard convolutional layers or smaller hidden layers is less clear.
  • Learnable Hashes: The authors suggest that integrating "learnable" hashes (like those in the Mongoose framework) into the PGHash pipeline could further improve efficiency in the future.

Reference: Rabbani, T., Bornstein, M., & Huang, F. (2023). Large-Scale Distributed Learning via Private On-Device Locality-Sensitive Hashing. 37th Conference on Neural Information Processing Systems (NeurIPS 2023).

Summary updated

BibTeX
@inproceedings{rabbani2023large,
  author = {Tahseen Rabbani and Marco Bornstein and Furong Huang},
  title = {{Large-Scale Distributed Learning via Private On-Device LSH}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=dpdbbN7AKr},
}
Figure