# Lossless Compression of Sensor Signals Using an Untrained Multi-Channel Recurrent Neural Predictor
## 1 Introduction  
As digitalization advances continuously, sensor technology is undergoing tremendous development and has been widely used in applications such as wearable medical devices [1], climate change tracking [2], and infrastructure monitoring [3]. At the same time, with the improvement of the resolution and sampling rate of analog-to-digital converters (ADCs), the volume of sensor signals increases rapidly, leading to great pressure on data storage. One way to alleviate such pressure is to reduce the redundancy existing in massive data through data compression. Data compression techniques can be categorized into two classes: lossless compression and lossy compression. Lossy compression of sensor signals discards part of the secondary information, and the resulting distortion is limited within an acceptable range. For example, [PERSON] et al. proposed a data compression method based on two-dimensional discrete cosine transform (DCT), which can effectively reduce the amount of data since most natural signals are concentrated in the low frequency parts of DCT [4]. [PERSON] et al. proposed a compression method based on wavelet transform and obtained a high signal-to-noise ratio [5]. These methods can produce a high compression ratio at the cost of dropping part of the signal information. However, in many scenarios, such as sensor debugging [6], sensor signals must be stored losslessly. In such cases, lossless data compression is used. For example, [PERSON] et al. explained the importance of lossless neural networkscompression algorithms in electromyography (EMG) sensors and analyzed the energy consumption and performance of existing lossless compressors [7]. Classical general-purpose lossless compression algorithms mainly include entropy coding and dictionary coding. The former is based on [PERSON] information theory [8], including Huffman coding [9], arithmetic coding [10], and asymmetric numeral systems (ANS) [11]. The later is based on LZ algorithm and its variants, which compress data by replacing repeated data with the earlier position of that data in the uncompressed stream [12; 13]. To better utilize the context information underlying sequential data, context-based compression methods were proposed. The general idea of these methods is to combine a context-based predictor and a coding algorithm. Among context-based algorithms, PAQ uses a large number of models conditioned on different contexts (e.g., n-grams, sparse contexts, analog contexts, etc.) to estimate the probability distribution of the next symbol [14]. Deep learning models are naturally context extractors, which can be used as effective probabilistic predictors in context-based compressors. [PERSON] proposed CMIX [15], which uses a large number of context models including a long short-term memory (LSTM) [16]. [PERSON] et al. proposed DZip [17], which uses a pre-trained neural network as a predictor, which is stored in the compressed file after compression. Different from DZip, tensorflow-compress [18] trains its deep learning predictor during compressing and decompressing; thus, it does not need to store the model parameters and can run with a large batch size to get a substantial speed improvement. The compressors mentioned above are general-purpose methods which perform data compression by reducing the redundant information between data points. For sensor signals, this inter-point relationship may be the continuity and periodicity. However, sensor signals also have intra-point features. Specifically, each bit in every signal point has its own underlying conditional distribution, depending on the history values of its own and other bits. For example, the values of lower-order bits change more frequently than values of higher-order bits. Therefore, applying general-purpose compressors directly to sensor signals often leads to a relatively low compression ratio, since they do not fully exploit the intra-point characteristics mentioned above. What is more, most of the general-purpose compressors read a fixed number of bits at a time.