Deep Lossless Compression Algorithm Based on Arithmetic Coding for Power Data

Zhoujun Ma, Hong Zhu, zhiping he, Yue Lu, Fuyuan SongSensors 2022 · DOI

TL;DR

This paper introduces a novel deep learning-based lossless compression algorithm for minute-level power data, leveraging Bi-LSTM networks and arithmetic coding. By adaptively learning data characteristics, the proposed method achieves a higher compression ratio (4.06) compared to traditional entropy coding techniques, addressing the challenge of efficiently storing and transmitting large volumes of smart grid data.

What Problem Does This Paper Address?

The proliferation of smart grids generates massive amounts of power consumption data, posing significant challenges for communication and storage. Traditional lossless compression algorithms, while fast, often struggle with the non-sparse, time- and frequency-domain characteristics of minute-level power data. This leads to inefficient storage and increased communication costs. The paper aims to develop a more effective compression method that can automatically learn the complex patterns within this data to achieve better compression ratios.

Methods

The core of the proposed method involves a two-stage process: model training and coding compression.

  1. Model Training: The authors explore two deep learning architectures for learning the temporal dependencies in power data:
  2. Bi-LSTM (Bi-directional Long Short-Term Memory): This recurrent neural network architecture is chosen for its effectiveness in capturing long-term dependencies in time-series data. It processes data in both forward and backward directions, allowing it to better understand context.
  3. Transformer: While also explored, the paper leans towards Bi-LSTM due to its slightly better performance on this specific dataset. Transformers utilize self-attention mechanisms, which can be effective but might struggle with short-distance dependencies compared to Bi-LSTM in this context.

    Both models process input power data segments, and their output is a probability distribution of the next data point. The training utilizes a cross-entropy loss function to minimize the difference between predicted and true probabilities.

  4. Coding Compression: The probability distribution generated by the deep learning model is then fed into an arithmetic coding module. Unlike traditional static entropy coding, this approach uses the model's context-adaptive probability predictions. This allows for a more precise representation of the data, leading to higher compression efficiency. Finally, the output is converted to a binary stream via bit coding.

Datasets

The paper uses a "private dataset" consisting of actual user electricity consumption data collected by a power supply company. This data is described as minute-level power data from 200 users, collected in "String format." The experiments were conducted on this dataset, and no new benchmarks were introduced.

Key Insights and Ideas

  • Deep Learning for Data-Driven Compression: The paper highlights that traditional, hand-engineered compression methods are insufficient for complex, non-sparse data like minute-level power consumption. Deep learning models can automatically learn intricate data features, leading to superior compression.
  • Arithmetic Coding Synergy with Deep Learning: Combining the predictive power of deep learning models with the efficiency of arithmetic coding proves to be a potent strategy. The adaptive probability distributions generated by the neural networks allow arithmetic coding to achieve near-optimal compression.
  • Bi-LSTM Outperforms Transformer (for this data): While both models are powerful, the Bi-LSTM architecture demonstrated a slight edge in compression performance for the specific minute-level power data used in the study. This suggests that for certain time-series data, the explicit handling of sequential dependencies in Bi-LSTM can be more advantageous than the attention-based approach of Transformers.
  • Context-Adaptive Probability is Key: The success of the proposed method hinges on the model's ability to predict probabilities that closely match the actual data distribution. This context-adaptive nature is a significant improvement over static probability models used in traditional methods.

Key Results

  • Average Compression Ratio (CR): The proposed Bi-LSTM-based algorithm achieved an average CR of 4.06.
  • Comparison to Traditional Methods: This CR of 4.06 is higher than classical entropy coding methods like AC (3.31) and Huffman (1.98).
  • Model Performance: The Bi-LSTM model showed slightly better compression results than the Transformer model.
  • Entropy Reduction: The paper demonstrates a significant reduction in entropy after compression, indicating more efficient data representation. For example, entropy before compression was 3.23, while after compression with Bi-LSTM it was 2.17.
  • Computational Efficiency: While training takes approximately 2 hours on a GPU, the model achieves an average inference time of less than 0.1 seconds per call on a CPU in real-world scenarios.

Limitations and Future Work

  • Dataset Specificity: The performance is evaluated on a specific private dataset. The generalizability to other types of power data or different smart grid environments might require further validation.
  • Computational Cost: While inference is fast, the training process can be time-consuming.
  • Future Work: The authors plan to improve the model architecture and further enhance both compression performance and speed. They also suggest that their algorithm is scalable and can be integrated with other deep learning models to capture more potential power features.

Summary updated

Abstract

Classical lossless compression algorithm highly relies on artificially designed encoding and quantification strategies for general purposes. With the rapid development of deep learning, data-driven methods based on the neural network can learn features and show better performance on specific data domains. We propose an efficient deep lossless compression algorithm, which uses arithmetic coding to quantify the network output. This scheme compares the training effects of Bi-directional Long Short-Term Memory (Bi-LSTM) and Transformers on minute-level power data that are not sparse in the time-frequency domain. The model can automatically extract features and adapt to the quantification of the probability distribution. The results of minute-level power data show that the average compression ratio (CR) is 4.06, which has a higher compression ratio than the classical entropy coding method.
BibTeX
@inproceedings{ma2022deep,
  author = {Zhoujun Ma and Hong Zhu and zhiping he and Yue Lu and Fuyuan Song},
  title = {{Deep Lossless Compression Algorithm Based on Arithmetic Coding for Power Data}},
  booktitle = {Sensors},
  year = {2022},
  doi = {10.3390/s22145331},
}
Figure