LLM-based Knowledge Pruning for Time Series Data Analytics on Edge-computing Devices

Ruibing Jin, Qing Xu, Min Wu, Yuecong Xu, Dan Li, Xiaoli Li, Zhenghua ChenarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) possess extensive world knowledge but are computationally prohibitive for edge devices. We present Knowledge Pruning (KP), a method to extract task-specific "pertinent knowledge" from LLMs and distill it into lightweight models. KP achieves performance improvements of up to 19.7% in regression and 13.7% in classification tasks while requiring zero LLM parameters at runtime, enabling advanced analytics on resource-constrained hardware.

Introduction

Time series data generalization is a persistent challenge due to its inherent diversity and small-scale nature. While LLMs offer strong generalization, their deployment on edge devices is limited by massive computational requirements. Existing LLM-based time series methods often necessitate loading the entire model during inference. We propose that for specific tasks, most LLM knowledge is redundant. By pruning this knowledge to its pertinent components, we can enhance tiny models without the overhead of full LLM inference.

Methods

The KP paradigm consists of three stages: Knowledge Prompt Set (KPS) generation, Knowledge Anchor Point (KAP) production via a pre-trained LLM, and Pertinent Knowledge Distillation.

The Knowledge Pruning (KP) workflow diagram.

The target model learns to align its features with LLM-generated "anchors" in a latent space using metric learning. For regression, an Anchor Voting Scheme (AVS) enables continuous value prediction from discrete anchors by calculating a weighted average based on confidence distributions.

Experimental Results

Evaluations on the C-MAPSS (regression) and human activity recognition (classification) datasets show that KP significantly outperforms baselines.

Regression performance on the C-MAPSS dataset.

Key findings include:

  • Accuracy: KP improved regression scores on C-MAPSS by an average of 19.7% compared to state-of-the-art baselines.
  • Efficiency: A KP-enhanced Bi-LSTM with only 0.042M parameters achieved state-of-the-art results, requiring 2,980x fewer GFLOPs than the anchoring LLM.
  • Zero Runtime Overhead: The method requires no LLM parameters during deployment, making it ideal for microcontrollers.

Conclusion

Knowledge Pruning effectively bridges the gap between LLM capabilities and edge constraints by treating LLMs as static knowledge bases. Future research will address hyperparameter sensitivity and prompt optimization to further refine the quality of knowledge anchors.

Summary updated

Abstract

Limited by the scale and diversity of time series data, the neural networks trained on time series data often overfit and show unsatisfacotry performances. In comparison, large language models (LLMs) recently exhibit impressive generalization in diverse fields. Although massive LLM based approaches are proposed for time series tasks, these methods require to load the whole LLM in both training and reference. This high computational demands limit practical applications in resource-constrained settings, like edge-computing and IoT devices. To address this issue, we propose Knowledge Pruning (KP), a novel paradigm for time series learning in this paper. For a specific downstream task, we argue that the world knowledge learned by LLMs is much redundant and only the related knowledge termed as "pertinent knowledge" is useful. Unlike other methods, our KP targets to prune the redundant knowledge and only distill the pertinent knowledge into the target model. This reduces model size and computational costs significantly. Additionally, different from existing LLM based approaches, our KP does not require to load the LLM in the process of training and testing, further easing computational burdens. With our proposed KP, a lightweight network can effectively learn the pertinent knowledge, achieving satisfactory performances with a low computation cost. To verify the effectiveness of our KP, two fundamental tasks on edge-computing devices are investigated in our experiments, where eight diverse environments or benchmarks with different networks are used to verify the generalization of our KP. Through experiments, our KP demonstrates effective learning of pertinent knowledge, achieving notable performance improvements in regression (19.7% on average) and classification (up to 13.7%) tasks, showcasing state-of-the-art results.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
OppotunityDTL (Baseline1)F1-Score74.03HAR classification; training and inference follow the iSPLInception protocol.
Source quote
L228: Baseline1 │ 93.11 │ 74.03 │ 82.16 │ 96.42
OppotunityDTL + KP (Baseline1+KP)F1-Score84.14HAR classification; training and inference follow the iSPLInception protocol.
Source quote
L229: Baseline1+KP (ours) │ 96.63 │ 84.14 │ 85.28 │ 97.18
BibTeX
@misc{jin2024llm,
  author = {Ruibing Jin and Qing Xu and Min Wu and Yuecong Xu and Dan Li and Xiaoli Li and Zhenghua Chen},
  title = {{LLM-based Knowledge Pruning for Time Series Data Analytics on Edge-computing Devices}},
  year = {2024},
  eprint = {2406.08765},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.08765},
}
Figure