NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Federated Topic Model and Model Pruning Based on Variational Autoencoder

Chengjie Ma, Yawen Li, Meiyu Liang, Ang Li · OpenReview

Abstract

Topic modeling has emerged as a valuable tool for discovering patterns and topics within large collections of documents. However, when cross-analysis involves multiple parties, data privacy becomes a critical concern. Federated topic modeling has been developed to address this issue, allowing multiple parties to jointly train models while protecting privacy. However, there are communication and performance challenges in the federated scenario. In order to solve the above problems, this paper proposes a method to establish a federated topic model while ensuring the privacy of each node, and use neural network model pruning to accelerate the model, where the client periodically sends the model neuron cumulative gradients and model weights to the server, and the server prunes the model. To address different requirements, two different methods are proposed to determine the model pruning rate. The first method involves slow pruning throughout the entire model training process, which has limited acceleration effect on the model training process, but can ensure that the pruned model achieves higher accuracy. The second strategy is to quickly reach the target pruning rate in the early stage of model training in order to accelerate the model training speed. Experimental results show that the federated topic model pruning based on the variational autoencoder proposed in this paper can greatly accelerate the model training speed while ensuring the model's performance.

Introduction

Topic modeling is essential for discovering themes in massive document collections, particularly in sensitive fields like Science, Technology, and Innovation (STI) analysis. However, organizations often cannot share raw documents due to legal or competitive constraints, making data privacy a primary hurdle. Federated Learning (FL) offers a solution by allowing models to be trained locally on client devices, with only model updates (weights) being sent to a central server.

Despite its privacy benefits, standard FL for neural topic models is notoriously resource-intensive. Sending full neural network parameters creates a massive communication bottleneck. This paper presents Prune-FedAVITM, a framework that combines FL with Variational Autoencoders (VAE) and progressive pruning to make topic modeling both private and efficient.

Methodology: Prune-FedAVITM

The core innovation of Prune-FedAVITM is a Progressive Pruning strategy integrated into the federated training loop of an Autoencoding Variational Inference for Topic Model (AVITM). The process follows these key steps:

  1. Vocabulary Consensus: Clients and the server collaborate to establish a shared global vocabulary before training begins.
  2. Cumulative Gradient Tracking: Unlike standard magnitude pruning, this method tracks the cumulative gradients of neurons. This ensures that neurons that are currently small but actively learning are not prematurely deleted.
  3. Pruning Strategies:
    • NormalPrune: Pruning occurs slowly throughout the training process, prioritizing final model accuracy and reducing inference time.
  4. FastPrune: The model is aggressively pruned in early stages to reach a target size quickly, prioritizing training speed.
  5. Server-Side Aggregation: The server uses the FedAvg algorithm to aggregate weights and manages pruning masks, which are then distributed back to clients.

Experimental Evaluation

The approach was evaluated using two standard text benchmarks: 20NewsGroup (20NG), containing ~20,000 newsgroup documents, and DBLP, a computer science bibliography dataset used to categorize research papers.

Performance and Accuracy

Experimental results indicate that topic models are highly redundant. In many cases, a model with only 10% of its neurons (0.1 density) could represent the main information without a significant drop in performance. On the DBLP dataset, the unpruned model achieved 64.15% accuracy. As shown in Figure 5, the pruned versions maintained comparable performance even at low densities.

Test accuracy on the DBLP dataset across different target densities for Normal and Fast pruning strategies.

Topic Quality

Beyond accuracy, the quality of discovered topics was measured through diversity and coherence. Figure 1 illustrates that topic diversity remains stable across various pruning levels, suggesting that the pruning process effectively removes noise without destroying the underlying thematic structure.

Test topic diversity across different target densities, comparing Normal and Fast pruning.

Key Insights

  • Pruning as Regularization: In some experiments, pruned models outperformed unpruned versions, suggesting that pruning acts as a form of regularization by removing "noise" neurons.
  • Massive Speedups: For a target density of 0.2, the FastPrune method reduced training time to just 30% of the baseline when accounting for data access latency.
  • Gradient Advantage: Using cumulative gradients avoids the "blindness" of simple magnitude pruning, which often deletes weights that are small simply because they haven't been updated recently.

Conclusion

Prune-FedAVITM demonstrates that federated topic models can be significantly accelerated through progressive pruning without compromising performance. While FastPrune offers superior speed, it may lose information on complex tasks like 20NG, whereas NormalPrune offers a more balanced approach. Future work may explore heterogeneous pruning to accommodate clients with varying hardware constraints.

Summary updated

BibTeX
@misc{ma2023federated,
  author = {Chengjie Ma and Yawen Li and Meiyu Liang and Ang Li},
  title = {{Federated Topic Model and Model Pruning Based on Variational Autoencoder}},
  year = {2023},
  eprint = {2311.00314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.00314},
}
Figure