Systems and methods for compressing structured data via latent variable estimation

12531575 ยท 2026-01-20

Assignee

Inventors

Cpc classification

International classification

Abstract

A computer-implemented method for compressing structured data or semi-structured data is provided. The method comprises: (a) estimating one or more latent variables associated with rows or columns of the structured data or semi-structured data; (b) partitioning the structured data or semi-structured data in one or more blocks according to the one or more one or more latent variables; (c) applying a sequential encoding algorithm to each of the blocks; and (d) appending a compressed encoding of the one or more latent variables.

Claims

1. A computer-implemented method for compressing structured data or semi-structured data, comprising: (a) estimating latent variables associated with rows or columns of the structured data or semi-structured data; (b) partitioning the structured data or the semi-structured data into one or more blocks according to the latent variables; (c) applying a sequential encoding algorithm to each of the one or more blocks; and (d) appending a compressed encoding of the latent variables to the compressed encoding of each of the one or more blocks.

2. The computer-implemented method of claim 1, wherein the latent variables comprise row latent variables associated with the rows and column latent variables associated with the columns.

3. The computer-implemented method of claim 1, wherein the latent variables are estimated utilizing a spectral clustering algorithm.

4. The computer-implemented method of claim 1, wherein the latent variables are estimated using side information.

5. The computer-implemented method of claim 4, wherein the side information comprises a column datatype, a column name, or a row name.

6. The computer-implemented method of claim 1, further comprising, prior to (b), reordering the rows and columns of the structured data or semi-structured data based at least in part on the latent variables.

7. The computer-implemented method of claim 1, further comprising, prior to (c), generating a serialized block vector for each of the one or more blocks.

8. Computer-implemented method of claim 7, wherein the sequential encoding algorithm is applied to each serialized block vector.

9. The computer-implemented method of claim 8, wherein applying the sequential encoding algorithm comprises applying a first base compressor to each serialized block vector and a second base compressor to a latent variables of each serialized block vector.

10. The computer-implemented method of claim 9, wherein the first base compressor and the second base compressor are different.

11. The computer-implemented method of claim 1, wherein the structured data or semi-structured data is associated with hyperspectral imaging, image processing, quantum chemistry, or large language models.

12. The computer-implemented method of claim 1, wherein the structured data or semi-structured data is associated with tabular data.

13. The computer-implemented method of claim 1, wherein the method achieves an optimal compression rate.

14. The computer-implemented method of claim 1, wherein the method reduces a compression rate by at least about 5% compared to frequency-based entropy encoders (ANS), Lempel-Ziv encoders, or finite-state encoders.

15. A non-transitory computer readable medium comprising machine executable code that, upon execution by one or more computer processors, implements a lossless compression algorithm, comprising: (a) estimating latent variables associated with rows or columns of a structured data or semi-structured data; (b) partitioning the structured data or semi-structured data into one or more blocks according to the latent variables; (c) applying a sequential encoding algorithm to each of the one or more blocks; and (d) appending a compressed encoding of the latent variables to the compressed encoding of each of the one or more blocks.

16. The non-transitory computer readable medium of claim 15, wherein the latent variables comprise row latent variables associated with the rows and column latent variables associated with the columns.

17. The non-transitory computer readable medium of claim 15, wherein the latent variables are estimated utilizing a spectral clustering algorithm.

18. The non-transitory computer readable medium of claim 15, wherein the latent variables are estimated using side information.

19. The non-transitory computer readable medium of claim 18, wherein the side information comprises a column datatype, a column name, or a row name.

20. A computer program product for compressing structured data or semi-structured data, the computer program product comprising at least one non-transitory computer-readable medium having computer-readable program code portions embodied therein, the computer-readable program code portions comprising: an executable portion configured to estimate variables associated with rows or columns of the structured data or semi-structured data; an executable portion configured to partition the structured data or the semi-structured data into one or more blocks according to the latent variables; an executable portion configured to apply a sequential encoding algorithm to each of the one or more blocks; and an executable portion configured to append a compressed encoding of the latent variables to the compressed encoding of each of the one or more blocks.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The novel features of the invention are set forth with particularity in the appended claims. A better understanding of the features and advantages of the present invention will be obtained by reference to the following detailed description that sets forth illustrative embodiments, in which the principles of the invention are utilized, and the accompanying drawings (also figure and FIG. herein), of which:

(2) FIG. 1 shows an example of a spectral clustering algorithm in the pseudo-code for estimating spectral latents, in accordance with some embodiments;

(3) FIG. 2 shows an example of data reduction rate (DRR) using different datasets achieved by classical and latent-based compressors on real tabular data, in accordance with some embodiments. Datasets included Facebook (FB) Networks 1, 2, and 3, GP Network 1, Forest, Card Transactions, Business price index, US census, and Jokes. LZ refers to row-major order ZSTD, LZ (c) refers to column-major order ZSTD. KMeans was run on the data 5 times with random initializations finding the DRR each time and reporting the average. Datasets marked with(s) had rows randomly permuted (e.g., shuffled) before compressing. ZSTD generally refers to a Zstandard fast compression algorithm or method;

(4) FIG. 3A shows a comparison of data reduction rate (DRR) of naive ZSTD coding and latent-based ZSTD coding for synthetically generated data, in accordance with some embodiments. ZSTD generally refers to a Zstandard fast compression algorithm or method;

(5) FIG. 3B shows comparison of data reduction rate (DRR) of naive ANS coding and latent-based asymmetric numeral systems (ANS) coding for synthetically generated data. Contour lines correspond to the information-theoretically optimal compression rate, in accordance with some embodiments;

(6) FIG. 4 shows an example of Lempel-Ziv algorithm, in accordance with some embodiments;

(7) FIG. 5 shows a computer system that is programmed or otherwise configured to implement methods and algorithms provided herein, in accordance with some embodiments; and

(8) FIGS. 6-7 show an example of partitioning a table into blocks according to the latent variables, in accordance with some embodiments.

DETAILED DESCRIPTION

(9) The present disclosure provides improved methods for compressing structured data or semi-structured data. In some embodiments, the method comprises (a) estimating latent variables associated with rows or columns of the structured data or semi-structured data. In some embodiments, the method comprises (b) partitioning the structured data or the semi-structured data into one or more blocks according to the latent variables. In some embodiments, the method comprises (c) applying a sequential encoding algorithm to each of the one or more blocks. In some embodiments, the method comprises (d) appending a compressed encoding of the latent variables to the compressed encoding of each of the one or more blocks.

(10) Overview

(11) Data in structured or semi-structured format, which can be used for analytics and machine learning, may take the form of tables with, e.g., categorical or numerical entries. An unmet need exists for an improved lossless compression algorithm particularly for structured data or semi-structured data. The present disclosure provides systems and methods, which can improve the lossless compression performance over other methods or algorithms.

(12) For example, the present disclosure provides a probabilistic model to identify optimal compression for data, e.g., structured or tabular data. In some cases, latent values can be independent and table entries can be conditionally independent given the latent values. The probabilistic model can be characterized with a well-defined entropy rate to determine the ideal compression rate and to satisfy an asymptotic equipartition property. By applying the probabilistic model to different datasets, the latent estimation approach disclosed herein can achieve the optimal rate. In contrast, other compression methods, e.g., Lempel-Ziv or finite-state encoders, may not be able to achieve the optimal rate.

(13) In some cases, latent variables can be used in data compression methods based on machine learning and probabilistic modeling. Generally, latent variables in statistical models can include random variables that are unmeasured but may be unmeasurable. Latent variables can be included in statistical models for, in some cases, (1) including in the model features of interest that may not be directly measurable or were not measured; (2) constructing estimators that may be more efficient than those constructed from nonlatent variables models; and (3) constructing estimators of manipulation statistics that are unbiased.

(14) For example, stochastically generated codewords (e.g., random latents) can lead to minimum description lengths via bits back coding. This method can be explicitly applied to lossless data compression using arithmetic coding or ANS coding. For example, data compression via low-rank approximation or latents-based approaches can be applied to numerical analysis applications, hyperspectral imaging, image processing (2D or 3D), quantum chemistry, large language or machine learning models, artificial intelligence (AI) models, audio processing, cryptography, genetics or genome data, and the like. However, some latents-based approaches may mainly center on lossy compression and do not precisely quantify compression rate, e.g., they do not count bits.

(15) The present disclosure can provide an improvement in lossless compression rate over other methods. For example, the present disclosure provides a family of lossless compression algorithms for data, e.g., structured or semi-structured data. In some embodiments, the methods herein may comprise: (i) estimating latent variables associated to rows and columns of the table; (ii) partitioning the table in blocks according to the row or column latents; (iii) applyig a sequential encoding algorithm (e.g., Lempel-Ziv compression or entropy coding) to each of the blocks; and (iv) appending a compressed encoding of the latent. Evaluation of the methods on several bench-mark datasets show that latent estimation and row or column reordering can improve compression rate.

(16) In some cases, methods disclosed herein can improve upon mathematical algorithms, e.g., in compressing tabular data, by providing an asymptotically optimal algorithm that overcomes technical problems of other methods or algorithms. The lossless compression algorithms disclosed herein may be applied to various types of documents or data such as documents or data having comma-separated values (CSV) data, tab-separated values (TSV) data, Apache Parquet data, Apache optimized row columnar (ORC) data, Apache Feather data, Microsoft Excel (XLS) data, and the like. In some cases, the lossless compression algorithms disclosed herein may be applied to a document comprising semi-structured data (e.g., XML documents, JSON files, NoSQL databases, HTML code, graphs and tables, emails, etc.) or structured data (e.g., tabular data).

(17) 1 Introduction

(18) Some methods of lossless compression may assume that data takes the form of a random vector X.sup.N=(X.sub.1, X.sub.2, . . . , X.sub.N) of length N with entries in a finite alphabet X. Under suitable ergodicity assumptions and using the Shannon-McMillan-Breiman theorem, the entropy per letter may converge to a limit as h:=lim.sub.N.fwdarw.(X.sup.N)/N. Universal coding schemes (e.g., Lempel-Ziv coding) may not require knowledge of the distribution of X.sup.N and can encode such a sequence without information loss using (e.g., asymptotically) h bits per symbol. While this theory is mathematically useful, its modeling assumptions (e.g., stationarity, ergodicity, asymptotia, and the like) may not be satisfied by actual data in many applications.

(19) For example, consider a data table with m rows and n columns and entries in custom character, custom charactercustom charactercustom character:=custom character. An approach to such data can include: (i) serializing, e.g., in row-first order, to form a vector of length N=custom character, X.sup.N=(X.sub.11, X.sub.12, . . . , X.sub.in, X.sub.21, . . . , custom character) and (ii) applying a standard compressor (e.g., Lempel-Ziv) to this vector.

(20) It can be shown, both empirically and mathematically, that such an approach can be suboptimal in the sense of not achieving the optimal compression rate, e.g., data reduction rate (DRR). This can happen even in the limit of large tables, as long as the number of columns and rows are polynomially related (e.g., custom charactercustom charactercustom character) for some small constant & and large constant M).

(21) The present disclosure provides improved methods for compressing structured data or semi-structured data. In some cases, the method may use the following general scheme of operations 1, 2, and 3:

(22) 1. Estimating row latents custom character=(u.sub.1, . . . , u.sub.m) custom character and column latents custom character=(v.sub.1, . . . , v.sub.n) custom character, with custom character, a finite alphabet. For example, FIGS. 6-7 illustrate an example of applying the method to structured data in, e.g., a table. As illustrated in FIG. 6, latents 620, including the row latents and column latents, are computed 611 for the structured data, e.g., table 610. In some cases, the method may implement latents estimation using a spectral clustering algorithm or using side information, described herein elsewhere. Side information can include: columns datatype, column names, row names, and the like.

(23) 2. Partitioning the table in blocks according to the row or column latents. For example, for each pair of latents values custom character, custom charactercustom character, let R(u) be the subset of rows with latent value custom character=u and C(v) be the subset of columns with latent value custom character=v. Construct the table X_M (u, v) comprising the rows R (u) and columns C (v), in the same order as they appear in the original table. Then construct the vector or sequence X (u, v) by serializing X_M (u, v). In some cases, serializing the table may comprise scanning the entries of X_M (u, v) in row-first order or in column-first order. This operation can be performed by:

(24) X ( u , v ) = vec ( X i j : u i = u , v j = v ) ( Eq . 1.1 )
where vec (M) denote the serialization of matrix M (either row-wise or column-wise).

(25) As illustrated in FIG. 6, constructing the table X_M (u, v) may include reordering rows 621 and columns 621 of the table 620 based on the latents to obtain a reordered table 630. Then, the reordered table 630 can be partitioned into blocks 631 based on the latents. For example, as illustrated in FIG. 7, the blocks may be partitioned based on the latent values. In some cases, the blocks may have variable sizes based on the reordered values of the latent variables. Next, the partitioned blocks in the table 640 may be serialized 641 to generate a plurality of vectors 650. Each vector may correspond to a block or be referred to as a serialized block vector X (u, v).

(26) 3. Applying a base compressor, which can be generically denoted by Zx: custom character.fwdarw.{0, 1}*, to each block X (u, v):

(27) z ( u , v ) = Z ( X ( u , v ) ) , u , v ( Eq . 1.2 )

(28) 4. Encoding the row latents and column latents using a possibly different compressor custom character: custom character*.fwdarw.{0,1} *, to get z.sub.row=Z.sub.L(custom character), Z.sub.col=custom character(custom character). For example, as illustrated in FIG. 7, in the sequence compression 651, a base compressor such as sequence compression can be applied to the block vectors 651, and a compressor, which can be different than the base compressor, can be applied to the latents to obtain a plurality of compressed vectors 660. Considerations for selecting the base compressors are described herein elsewhere. Then, output the concatenation of all the above as:

(29) E n c ( X m , n ) = header z r o w z col u , v z ( u , v ) ( Eq . 1.3 )
where denotes concatenation, and header is a header that contains encodings of the lengths of subsequent segments (e.g., |custom character|.sup.2+2 integers). The compressed vectors 660 may then be serialized 661 or concatenated to form a final vector 670.

(30) In some cases, encoding the latents can lead to a suboptimal compression rate. For example, techniques such as bits-back coding can merely yield limited improvement towards obtaining an optimal compression rate. It can be shown that the compression rate improvement achieved by such bits-back coding may only significant in certain special regimes, which is described herein elsewhere.

(31) In some cases, methods described herein can leave several design choices undefined. For example, design choices can include: (1) the latents estimation procedure; (2) the base compressor Z.sub.x for the blocks X(custom character, custom character); or (3) the base compressor custom character, for the latents. Implementation alongside empirical evaluation is described herein elsewhere.

(32) 2 Implementation

(33) 2.1 Base compressors

(34) Dictionary-based compression (LZ). As an example, Zstandard (ZSTD) can be used in its Python implementation. ZSTD can implement a Lempel-Ziv style algorithm.

(35) Frequency-based entropy coding (ANS). For each data portion (e.g., each block X(custom character, custom character) and each of the row latents custom character and column latents custom character), compute empirical frequencies of the corresponding symbols. For example, for all custom character, custom charactercustom character, custom charactercustom character, compute:

(36) Q ( x | u , v ) := 1 N ( u , v ) .Math. i : u i = u .Math. j : v j = v 1 x i j = x r ( u ) := 1 m .Math. i = 1 m 1 u i = u , and
where N(custom character, custom character) is the number of im, jn such that custom character=u, custom character=v. Apply ANS coding to each block X (u, v), modeling its entries as independent with distribution {circumflex over (Q)}(.Math.|u, v), to the row latents custom character using the distribution {circumflex over (r)} (.Math.), and to the column latents custom character using the distribution (.Math.). Separately encode these counts as long integers and prepend them to the file. In some cases, they can be a negligible fraction of the file size.
2.2 Latent Estimation

(37) In some cases, the method implements latents estimation using a spectral clustering algorithm. In some cases, the latents may be estimated using side information. Side information can include columns datatype, column names, row names, and the like. FIG. 1 shows an example of a spectral clustering algorithm in the pseudo-code.

(38) In some cases, the algorithm may encode the data matrix custom character as an custom charactercustom character real-valued matrix custom charactercustom character using a map : custom character.fwdarw.custom character. In some cases, this map may not be optimized. In some cases, the elements of custom character can be arbitrarily encoded as 0, 1, . . . |custom character|1.

(39) In some cases, the singular vector calculation can be the most time consuming part of the algorithm. Computing approximate singular vectors via power iteration can require at least log (m{circumflex over ()}n) matrix vector multiplications for each of k vectors. This can amount to mnk log (m{circumflex over ()}n) operations, which can be larger than the time needed to compress the blocks or to run KMeans. The methods disclosed herein can improve this to (mVn) klog (mVn) n) via subsampling operations, which are described herein elsewhere.

(40) In some cases, for the spectral clustering operations, the method may use KMeans with k clusters, initialized randomly. For example, the algorithm may use the scikit-learn implementation via sklearn.cluster.KMeans. In some cases, the overall latent estimation approach may not estimate or make use of the model Q(.Math.|u, v). In some cases, an alternative approach based on an expectation-maximization (EM) algorithm may use such an estimation.

(41) 3 Empirical Evaluation

(42) Methods disclosed herein were evaluated on tabular datasets with different origins described below. The evaluation can be used to assess the impact of using latents in reordering columns and rows. In some cases, the evaluation may not attempt to achieve the best possible data reduction rate (DRR) on each dataset but rather to compare compression with latents and without latents. In some cases, the evaluation processed categorical variables by preprocessing the data to fit in this setting as described herein elsewhere. In some cases, the preprocessing included dropping some of the columns of the original table. The number of columns before preprocessing is denoted by custom character, and after by custom character. Differences between the implementation used in the evaluation and the methods described herein elsewhere are conceptually minor but can be practically important. Differences included: using different sizes for rows latent alphabet and column latent alphabet |custom character||custom character| and choosing |custom character|, |custom character| by optimizing compression size.

(43) 3.1 Datasets

(44) The following datasets were utilized in the evaluation: taxicab, network, card transactions, business price index, forest, US census, and jokes.

(45) Taxicab. This table has custom character=62, 495 rows, custom character=20 columns comprising data for taxi rides in New York City during January 2022. After preprocessing, this table had custom character=18 columns. For the LZ (ZSTD) compressor, 9 row latents were used. For the ANS compressor, 8 row latents were used. Both methods used custom character column latents with each column compressed separately.

(46) Network. Four social networks from Stanford Network Analysis Platform (SNAP) Datasets, representing either friends as undirected edges for Facebook (FB) or directed following relationships on Google Plus (GP). It regards these as four distinct tables with 0-1 entries, with dimensions, respectively custom character=custom character{333, 747, 786, 1187}. For each table, the evaluation used 5 row latents and 5 column latents.

(47) Card transactions. A table of simulated credit card transactions containing information like card ID, merchant city, zip code, etc. This table has custom character=24,386,900 rows and custom character=15 columns. After preprocessing, the table had custom character=12 columns. For this table, the evaluation used 3 row latents and n column latents.

(48) Business price index. A table of the values of the consumer price index of various goods in New Zealand between 1996 and 2022. This table has custom character=72,750 rows and custom character=12 columns from the Business price indexes: March 2022 quarter-CSV file. After preprocessing, this table had n=10 columns. Due to the highly correlated nature of consecutive rows, the data was shuffled before compressing. For the LZ method, the evaluation used 4 row latents. For the ANS method, the evaluation used 7 row latents. Both methods used custom character column latents with each column compressed separately.

(49) Forest. This table from the UC Irvine (UCI) Machine Learning Repository has custom character=581,011 cartographic measurements with custom character=55 attributes, to predict forest cover type based on information gathered from US Geological Survey. The data contained binary qualitative variables and some continuous values like elevation and slope. After preprocessing, this data had custom character=55 columns. For the LZ method, the evaluation used 9 row latents. For the ANS method, the evaluation used 8 row latents. Both methods used n column latents with each column compressed separately

(50) US Census. This table from the UCI Machine Learning Repository has custom character=2,458,285 and custom character=68 categorical attributes related to demographic information, income, and occupation information. After preprocessing, this data had custom character=68 columns. For this data, the evaluation used 9 row latents and n column latents.

(51) Jokes. A table containing ratings of a series of jokes by 24,983 users collected between April 1999-May 2003. These ratings are real numbers on a scale from 10 to 10, and a value of 99 is given to jokes that were not rated. This table has custom character=23,983 rows and custom character=101. The first column identifies how many jokes were rated by a user, and the rest of the columns contain the ratings. After preprocessing, this data had custom character=101 columns, all quantized. For the LZ method, the evaluation used 2 row latents. For the ANS method, the evaluation used 5 row latents. Both methods used n column latents.

(52) 3.2 Preprocessing

(53) Methods disclosed herein may preprocess different columns as follows: if a column comprises K256 unique values, then it maps the values to {0, . . . ,K1}; if a column is numerical and comprises more than 256 unique values, the method may calculate the quartiles for the data and map each entry to its quartile membership (e.g., 0 for the lowest quartile, 1 for the next largest, 2 for the next, and 3 for the largest); and if a column does not meet either of the above criteria, it may be discarded.

(54) In some evaluations, the data was randomly permuted before compression because some of the above datasets had rows already ordered in a way that can make nearby rows highly correlated.

(55) 3.3 Results

(56) Given a lossless encoder : custom character.fwdarw.{0,1} *, its compression rate and data reduction rate (DRR) can be defined as:

(57) R ( X m , n ) := len ( ( X m , n ) ) mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" , D R R ( X m , n ) := 1 - R ( X m , n ) ( Eq . 3.1 )
where larger DRR generally means better compression.

(58) The DRR of each algorithm is illustrated in FIG. 2. Datasets included datasets described herein elsewhere, e.g., taxicab, network, card transactions, business price index, forest, US census, and jokes. For the table of results in FIG. 2, LZ refers to row-major order ZSTD, LZ (c) refers to column-major order ZSTD. KMeans was run on the data 5 times, with random initializations finding the DRR each time, and reporting the average. Data marked with (s) had rows randomly permuted (e.g., shuffled) before compressing. ZSTD generally refers to a Zstandard fast compression algorithm or method.

(59) The results in FIG. 2 show that: (1) Latent+ANS encoders can achieve systematically the best DRR; (2) the use of latents in several cases can yield a DRR improvement of at least about 5% of the uncompressed size; and (3) this improvement is larger for data with a large number of columns, e.g., the network data of FB Network 1, FB Network 2, FB Network 3, and GP Network 1.

(60) 4 a Probabilistic Model

(61) In order to better understand the technical problems of other approaches and the improved optimality of latent-based compression, the presented disclosure provides a probabilistic model for the table custom charactercustom character. The model assumes the true latents (custom character).sub.im, custom character to be independent random variables with:

(62) ( u i = u ) = r ( u ) , ( v i = v ) = c ( v ) ( Eq . 4.1 )

(63) Also, the model assumes that the entries custom character, are conditionally independent given custom character=(custom character).sub.im, custom character=(custom character).sub.jn, with:

(64) ( X i j = x | u m , v n ) = Q ( x | u i , v j ) ( Eq . 4.2 )

(65) The distributions r, c, and conditional distribution Q are parameters of the model with a total of 2(|custom character|1)+|custom character|.sup.2(|custom character|1) real parameters. In some cases, (X.sup.m,n, custom character, custom character)custom character(Q, r, c; custom character, custom character) can indicate that the triple (custom character, custom character, custom character) is distributed according to the probabilistic model, occasionally omits a subset of the variables, and thus results as (custom character)custom character(Q,r,c; custom character,custom character). In some cases, the statements may be non-asymptotic, in which case custom character, custom character, custom character, custom character, Q, r, c can be fixed. In some cases, the statements may be asymptotic, in which case a sequence of problems can be indexed by custom character.

(66) FIG. 3A shows a comparison of data reduction rate (DRR) of naive ZSTD coding and latent-based ZSTD coding for synthetically generated data. Contour lines correspond to the information-theoretically optimal compression rate.

(67) As an example of Symmetric Binary Model (SBM), the following SBM can be used, which parallels the symmetric stochastic block model for community detection. For example, take custom character=[k]: ={1, . . . , k}, custom character={0,1}, r=c=Unif ([k]), the uniform distribution over [k], and

(68) Q ( 1 | u , v ) = { p 1 if u = v p 0 if u v ( Eq . 4.3 ) where (X.sup.m,n, custom character, custom character)custom character(custom character, custom character, k; custom character, custom character) when this distribution is used.

(69) FIG. 3A and FIG. 3B show the results of simulations within this model, respectively for ZSTD-based. In this case custom character=custom character=1000, k=3, and DRR values are averaged over 4 realizations. In some cases, the use of latents can be irrelevant along the line p.sub.1p.sub.0, which may not impact the distribution of X.sub.ij. In some cases, the use of latents can become important when p.sub.1 and p.sub.0 are significantly different. FIG. 3B shows comparison of data reduction rate (DRR) of naive ANS coding and latent-based ANS coding for synthetically generated data. Contour lines correspond to the information-theoretically optimal compression rate.

(70) 5 Theoretical analysis

(71) 5.1 Ideal Compression

(72) Lemma 5.1. A first theorem or lemma can provide upper and lower bounds on the entropy per symbol H (custom character)/custom character. The first lemma 5.1 can be shown as:

(73) ( Eq . 5.1 ) H ( X | U , V ) 1 m n H ( X m , n ) H ( X | U , V ) + 1 n H ( U ) + 1 m H ( V )

(74) Further, for any estimators custom character: custom character.fwdarw.custom character, custom character: custom character.fwdarw.custom characterlet

(75) 0 A ^ U := min .Math. i = 1 m 1 u ^ i ( u i ) / m , A ^ V := min .Math. i = 1 n 1 v ^ i = ( v i ) / n
(the minimum is over permutations of the letters in custom character). Letting .sub.U: =custom character.sub.U, .sub.V:=custom character.sub.V, the formula becomes:

(76) H ( X | U , V ) + 1 n H ( U ) + 1 m H ( V ) - m , n 1 m n H ( X m , n ) H ( X | U , V ) + 1 n H ( U ) + 1 m H ( V ) m , n := 1 n [ h ( U ) + u log ( .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" - 1 ) ] + 1 m [ h ( V ) + V log ( .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" - 1 ) ] ( Eq . 5.2 )

(77) Corollary 5.2. Recall the definition of compression rate from Eq. 3.1. Then, there may exist a lossless compressor such that:

(78) ( Eq . 5.3 ) R ( X m , n ) 1 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" { H ( X | U , V ) + 1 n H ( U ) + 1 m H ( V ) + 1 m n }

(79) Further, for any lossless compressor , custom characterR.sub.(custom character)H(X|U,V)+H(U)/custom character)+H(custom character)/m.sub.m,n2 log.sub.2(custom character)/custom character.

(80) The simpler bound of Eq. 5.1 may imply that the entropy per entry is H(X|U, V)+0(1/custom charactercustom character)). The operational interpretation of this result can be that it should be able to achieve the same compression rate per symbol as if the latents were given.

(81) The additional terms

(82) 1 n H ( U ) + 1 m H ( V )
in Eq. 5.2 can account for the additional memory required for the latents. The lower bound in Eq. 5.2 may imply that, if the latents can be accurately estimated from the data custom character(e.g., if .sub.U, .sub.v are small), then this overhead can be essentially or substantially unavoidable.

(83) The nearly ideal compression rate in Eq. 5.3 can be achieved by Huffmann or arithmetic coding, which may require knowledge of the probability distribution of custom character. Under these schemes, the length of the codeword associated to custom character is within a constant number of bits from log.sub.2P(custom character), where P(X.sub.0):=custom character(custom character=X.sub.0) is the probability mass function of the random table custom character. The next lemma 5.3 may imply that the length concentrates tightly around the entropy.

(84) Lemma 5.3. Asymptotic Equipartition Property. For X.sub.0custom character, let P(X.sub.0)=custom character(X.sub.0) the probability of X.sup.m,n=X, under model X.sup.m,ncustom character(Q,r, c; custom character, custom character). Assume there exists a constant c>0 such that Q (x|u, v)c. Then, there can exist a constant C, which can depend on c, such that the following can happen: for custom charactercustom character(Q,r, c; custom character, custom character) and any t0 with probability at least 12e.sup.t:

(85) .Math. "\[LeftBracketingBar]" - log P ( X m , n ) .Math. "\[RightBracketingBar]" C m n ( m + n ) t ( Eq . 5.4 )

(86) For simplicity, in the last statement, assumptions can be made that are appropriate to the case, in which Q, r, c may be independent of custom character,custom character. A more general statement with stronger, e.g., more complicate, bounds is described herein elsewhere.

(87) 5.2 Failure of Classical Compression Schemes

(88) Two types of codes are analyzed herein: finite-state encoders and Lempel-Ziv codes. Both can operate on the serialized data X.sup.N=vec(X.sup.m,n), N=custom character, which can be obtained by scanning the table in row-first order where column-first can yield symmetric results.

(89) 5.2.1 Finite state encoders. A finite state (FS) encoder can take the form of a triple (, f, g) with a finite set of cardinality M=|| and

(90) f : .Math. .fwdarw. { 0 , 1 } * , g : .Math. .fwdarw. .Math. ( Eq . 5.5 )

(91) Assume that contains a special initialization symbol s.sub.init. Starting from state s.sub.0=s.sub.init, the encoder can scan the input X.sup.N sequentially. Assume after the first custom character input symbols, the state is in state custom character and produced encoding custom character. Given input symbol custom character, the encoder appends f(custom character(custom character) to the codeword and updates its state to custom character=g(custom character, custom character).

(92) Denote custom character(custom character, s.sub.init){0,1} *, the binary sequence obtained by applying the finite state encoder to the vector custom character=(X.sub.1, . . . , custom character). The FS encoder can be defined as information lossless if for any custom charactercustom character, custom charactercustom charactercustom character(custom character, s.sub.init) is injective.

(93) Theorem 1. Let custom charactercustom character(Q, r, c; custom character, custom character) and (, f, g) be an information lossless finite state encoder. Define the corresponding compression rate R.sub.,f,g(custom character), as per Eq. 3.1. Assuming custom character>10, ||custom character|, and log.sub.2||custom character|X |/9, then,

(94) R , f , g ( X m , n ) H ( X | U ) log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" - 1 0 log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" n log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" log ( n log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) ( Eq . 5.6 )
where the leading term of the above lower bound is H(X|U)/log.sub.2|X|.

(95) Since conditioning can reduce entropy, this is strictly larger than the ideal rate which is roughly H(X|U,V)/log.sub.2|X|, e.g., Eq. 5.3. The next term can be negligible provided log||<<n log|X|, e.g., modulo logarithmic factors which may be a proof artifact. This condition can be easy to interpret. For example, the finite state machine may not have enough states to memorize a row.

(96) 5.2.2 Lempel-Ziv

(97) The pseudocode of the Lempel-Ziv algorithm is shown in FIG. 4. FIG. 4 shows that, after the first k characters of the input have been parsed, the encoder can find the longest string

(98) X k k + - 1 ,
which may appear in the past. The encoder can then encode a pointer to the position of the earlier k appearance of the string T.sub.k and its length L.sub.k.

(99) The method can then encode the pointer T.sub.k in plain binary using [log.sub.2 (N+|x|)]bite. In some cases, T.sub.k {|X|+1, . . . , 1, . . . , N}), and Ly can use an instantaneous prefix-free code, e.g., Elias -code, taking 2 [log.sub.2L.sub.k]+1. This can be sub-optimal, but the space taken by the encoding of L.sub.k can be of lower order with respect to the one of T.sub.k

(100) Assumption 1. The following can hold:

(101) 1. There exist a constant c.sub.o>0 such that:

(102) max x max u , v Q ( x .Math. "\[LeftBracketingBar]" u , v ) 1 - c 0 ( Eq . 5.7 )

(103) 2. Consider sequences of instances with Q r, c, X, custom character fixed and m, n=.fwdarw. so that:

(104) lim n .fwdarw. log m log n = ( 0 , ) ( Eq . 5.8 )
equivalently custom character=custom character

(105) As mentioned herein, consider sequences of instances with custom character,custom character.fwdarw., which can mean the sequence to be indexed by custom character, and let custom character=custom character, which can depend on custom character such that Eq. 5.8 holds.

(106) Theorem 2. Define the asymptotic Lempel-Ziv rate as:

(107) 0 R L Z := 1 log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" .Math. u r ( u ) [ H ( X .Math. "\[LeftBracketingBar]" U = u ) ( 1 + ) H ( X .Math. "\[LeftBracketingBar]" U = u , .Math. "\[LeftBracketingBar]" V ) ] ( Eq . 5.9 ) Then, under Assumption 1,

(108) lim m , n .fwdarw. R L Z ( X m , n ) = R L Z ( Eq . 5.1 )

(109) The asymptotics of the Lempel-Ziv rate can be given by the minimum of two expressions, which can correspond to different behaviors of the encoder. For example, for custom charactercustom character, define (custom character): =H(X|U=custom character, V)/(H(X|U=custom character)H(X|U=custom character, V)) with (custom character)= if H(X|U=custom character)=H(X|U=custom character,V)).

(110) Then, if <.sub.*(custom character), then it may be a skinny table regime. For example, the algorithm may mostly deduplicate segments in rows with latent u by using strings in different rows but aligned in the same columns. If <(custom character), then it may be a fat table regime. For example, the algorithm may mostly deduplicate segments on rows with latent u by using rows and columns that are not the same as the current segment.

(111) Example. Symmetric Binary Model (SBM), dense regime. Under the SBM, custom character(custom character,custom character,k;custom character,custom character) example, the optimal compression rate of Corollary 5.2, the finite state compression rate of Theorem 1, the Lempel-Ziv rate of Theorem 2 can be computed.

(112) Assume custom character, custom character of order one, and custom character=custom character as custom character, custom character.fwdarw.. In some cases, the resulting tales can be dense in the sense of containing a constant fraction of non-zeros. Then,

(113) R opt ( X m , n ) = ( 1 - 1 k ) h ( p 0 ) + 1 k h ( p 1 ) + o n ( 1 ) ( Eq . 5.11 ) R , f , g ( X m , n ) h ( p ) + o n ( 1 ) , p := ( 1 - 1 _ k ) p 0 + 1 k p 1 ( Eq . 5.12 ) R L Z ( X m , n ) = h ( p ) ( 1 + ) ( ( 1 - 1 k ) h ( p 0 ) + 1 k h ( p 1 ) ) + o n ( 1 ) ( Eq . 5.13 )
where the right hand sides correspond to the contour lines in FIG. 3A and FIG. 3B and where ANS is a finite-state encoder.
5.3 Practical Latent-Based Compression

(114) Achieving the ideal compression rate of Corollary 5.2 via arithmetic or Huffmann coding may require, a priori, computing the probability P (custom character) of the table custom character. The method herein can achieve a compression rate that is close to the ideal rate via latents estimation. For example, consider general latents estimators custom character:custom character.fwdarw.custom character, custom character: custom character.fwdarw.custom character. Accuracy can be measured by the overlaps as:

(115) U ( X ; u ^ ) := 1 m min .Math. i = 1 m 1 u ^ i ( X ) ( u i ) V ( X ) : v ) : = 1 n min .Math. i = 1 n 1 v ^ i ( X ) ( v i )
where the minimization is over the set custom character of permutations of the latents alphabet custom character.

(116) Any estimators custom character, custom character can be used to reorder rows and columns and compress the table custom character according to the methods described herein. Denote by R.sub.lat (custom character), the compression rate achieved by such a procedure. From Eq. 1.3, the following can be obtained:

(117) R l a t ( X m , n ) = 1 mn log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" { len ( header ) + len ( Z ( u ^ ) ) + len ( Z ( v ) ) + .Math. u , len ( Z .Math. "\[LeftBracketingBar]" X ( u , v ) ) ) } ( Eq . 5.14 )
where {circumflex over (X)}(custom character, custom character)=)=vec(X.sub.ij: custom character(X)=custom charactercustom character(X)=v are the estimated blocks of X. This rate can depend on the base compressors custom character, custom character but can be omitted these from notations. The first result can imply that, if the latent estimators are consistent, e.g., they recover the true latents with high probability up to permutations, then the resulting rate may be close to the ideal one.

(118) Lemma 5.4. Assume data distributed according to model custom charactercustom character(Q, r, c; custom character, custom character), with custom character, custom characterlog.sub.2|custom character|. Further, assume r(custom character), c(custom character)>c for all custom character, custom charactercustom character. Let R.sub.lat (custom character) be the rate achieved by the latent-based scheme with latents estimators custom character, custom character and base encoders custom character=custom character=Z. Then,

(119) R l a t ( X m , n ) H ( X m , n ) mn log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" + 2 ( A ^ U ( X m , n ; u ^ ) < 1 ) + 2 ( A ^ V ( X m , n ; v ) < 1 ) + 4 log ( m n ) m n + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" 2 Z ( c .Math. mn ; { Q ( .Math. .Math. "\[LeftBracketingBar]" u , v ) } u , v + 2 Z ( m n ; { r , c } ) ( Eq . 5.15 )
where .sub.z (N; custom character*) can be the worst case overhead of encoder Z over sources with distributions in custom character*.

(120) For example, the overheads of Lempel-Ziv, frequency-based arithmetic coding, and frequency-based ANS coding can be upper bounded respectively as (e.g., where the last bound requires Q,r,c to be independent of N):

(121) LZ ( N ; *) C ( log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" 2 ) log N ( Eq . 5.16 ) AC ( N ; *) 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( log N ) N ( Eq . 5.17 ) ANS ( N ; *) 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( log N + C | | N ( Eq . 5.18 )

(122) The proof of this lemma and the main content of the lemma is in the general bound of Eq. 5.15. More explicitly, .sub.z (N; custom character*) can be defined by:

(123) Z ( N ; *) := 1 N log 2 k , max p * { p len ( Z ( Y N ) ) - H ( Y N ) } ( Eq . 5.19 )
where custom character([k]): ={(custom character).sub.ik custom character:custom character0i.sub.ik custom character=1} is the set of probability distributions over [k], and Y.sup.N is a vector with entries Y.sub.icustom character. The upper bound (5.16) may be closely related to classical results.
A. Notations, Definition, and Basic Facts

(124) The data take form the form

(125) X 1 n X n ,
Where X is a finite alphabet. Consider lossless encoders E: X.sup.n.fwdarw.{0,1}.sup.*, and denote by

(126) k ( x 1 n ; E ) = len ( E ( x 1 n ) )
the length of the encoded sequence on input custom character.

(127) For ab, it uses

(128) 0 x a b = ( x a , .Math. , x b )
to denote the substring of x. Given a sequence custom character, it denotes by

(129) p k ( .Math. ; x 1 n )
the empirical distribution of sequences of length k. Namely, for wcX.sup.k, let,

(130) p k ( w ; x 1 n ) := 1 n - k + 1 .Math. i = 1 n - k + 1 1 x i i + k - 1 = w

(131) The Shannon entropy of a probability distribution p over a finite or countable set Z is given by,

(132) H ( p ) = - .Math. z p ( z ) log 2 p ( z )

(133) Denote by h() the entropy of a Bernoulli random variable Z with custom character(Z=1)=1custom character(Z=0)= by,

(134) h (  ) = - log 2 - ( 1 - ) log 2 ( 1 - )

(135) Lemma Let A be a finite set and F: A.fwdarw.{0, 1} * be an injective map. Then, for any probability distribution p over A

(136) .Math. a A p ( a ) len ( F ( a ) ) H ( p ) - log 2 log 2 ( .Math. "\[LeftBracketingBar]" A .Math. "\[RightBracketingBar]" + 2 )

(137) Proof. Assume without loss of generality that A={1, . . . , M}, with |A|=K, and that the elements of A have all non-vanishing probability and are ordered by decreasing probability p.sub.1p.sub.2 . . . p.sub.k>0. Let custom character: =2+4+ . . . +custom character=custom character+1-2. Then the expected length is minimized any map F such that len(F())=custom characterfor custom character.sub.1acustom character with the maximum length custom character being defined by custom character.sub.1<Kcustom character. For Acustom character, L: =len(F(A)), then:

(138) H ( p ) := H ( A ) ( a ) H ( L ) + H ( A | L ) log 2 k + .Math. = 1 k ( L = ) H ( A | L = ) ( b ) log 2 k + .Math. = 1 M ( L = ) log 2 log 2 ( K + 2 ) + .Math. a A p ( a ) len ( F ( a ) )
where (a) is the chain rule of entropy and (b) follows because by injectivity, given len(F(A))=custom character, A can take at most custom character values.
B Proofs of results on ideal compression
Proof of Lemma 5.1

(139) Claiming that:

(140) 1 m n H ( X m , n ) = H ( X | U , V ) + 1 m n I ( X m , n , U m , V n ) ( B .1 )
by the definition of mutual information, obtain H(custom character)=H(custom character|custom character, custom character)+I(custom character|custom character, custom character). Equation B.1 follows by noting that:

(141) H ( X m , n | U m , V n ) .Math. u m .Math. v n ( U m = u , V n = v ) H ( X m , n | U m = u , V n = v ) = ( a ) .Math. i = 1 m .Math. j = 1 n .Math. u .Math. v n ( U m = , V n = v ) H ( X i , j | U i = u , V j = v ) = .Math. i = 1 m .Math. j = 1 n .Math. u .Math. v ( U i = u i , V j = v j ) H ( X i , j | U i = u i , V j = v j ) = .Math. i = 1 m .Math. j = 1 n H ( X i , j | U i , V j ) = ( b ) mnH ( X 1 , 1 | U 1 , V 1 )
where (a) follows from the fact that the (X.sub.i,j) are conditionally independent given U.sup.m, V.sup.n, ad since the conditional distribution of X.sub.i,j only depends on U.sup.m, V.sup.n via U.sub.i, V.sub.j; (b) holds because the triples (X.sub.i,j, U.sub.i, V.sub.j) are identically distributed.

(142) The lower bound in Eq. 5.1 holds because mutual information is non-negative, and the upper bound because I (custom character, custom character, custom character)H (custom character, custom character)=custom character+custom character.

(143) Finally, Eq. 5.2 holds because

(144) I ( X m , n ; U m , V n ) = H ( U m , V n ) - H ( U m , V n | X m , n ) m H ( U 1 ) + n H ( V 1 ) - .Math. i = 1 m H ( U i | X m , n ) - .Math. j = 1 n H ( V j | X m , n ) = m H ( U 1 ) + n H ( V 1 ) - m H ( U 1 | X m , n ) - n H ( V 1 | X m , n )
Proof of Lemma 5.3

(145) Lemma B.1. Let =custom character, =custom character=custom character be collections of mutually independent random variables taking values in a measurable space Z.x.Z.sup.3.fwdarw.Z, F: custom character.fwdarw.custom character. Define x(, , )custom charactervia x(, , ).sub.ij=x (.sub.ij, .sub.i, .sub.j).

(146) Given a vector of independent random variables z, let Var.sub.zj(f(z)):=custom character[(f(z)custom characterf(z)).sup.2]Define the quantities:

(147) 0 B * := max .Math. "\[LeftBracketingBar]" F ( x ) - F ( x ) .Math. "\[RightBracketingBar]" ( Eq . B .2 ) x , x m n d ( x , x ) 1 B 1 := max max | F ( x ( , , ) ) - F ( x ( , , ) ) | , m n ( Eq . B .3 ) d ( , ) 1 B 2 := max max | F ( x ( , , ) ) - F ( x ( , , ) ) | ( Eq . B .4 ) m , n d ( , ) 1 V * := sup , , .Math. i m , j n Var i j { F ( x ( , , T ) ) } ( Eq . B .5 ) V 1 := sup , .Math. i m Var i { F ( x ( , , ) ) } , ( Eq . B .6 ) V 2 := sup , .Math. j n Var j { F ( x ( , , ) ) } ( Eq . B .7 )

(148) Then, for any t0, the following holds with probability at least 18e.sup.t:
|F(x(,,)custom characterF(x(,,)2 max(2V.sub.*t+2V.sub.1t+2V.sub.2t;(B.sub.*+B.sub.1+B.sub.2)t). (Eq. B.8)

(149) Proof. Let zZ.sup.N be a vector of independent random variables and f: Z.sup.N.fwdarw.custom character. Define the Martingale X.sub.k: =custom character[f(z)|custom character] (where custom character:=(Z.sub.1, . . . , Z.sub.k)). Then it follows:

(150) ess sup .Math. "\[LeftBracketingBar]" X k - X k - 1 .Math. "\[RightBracketingBar]" B 0 := sup d ( x , z ) 1 .Math. "\[LeftBracketingBar]" f ( z ) - f ( z ) .Math. "\[RightBracketingBar]" , ( Eq . B .9 ) .Math. k = 1 N [ ( X k - X k - 1 ) 2 | k - 1 ] = ( Eq . B .10 ) .Math. k = 1 N [ ( E [ f | z < k , z k ] - z k [ f | z < k , z k ] ) 2 | z < k ] V 0 : = sup z N .Math. k = 1 N Var z k ( f ( z ) ) ( Eq . B .11 )

(151) By Freedman's inequality, with probability at least 1-2e.sup.t, it follows:

(152) .Math. "\[LeftBracketingBar]" f ( z ) - f ( z ) .Math. "\[RightBracketingBar]" max ( 2 V 0 t : 2 B 0 t 3 ) ( Eq . B .12 )

(153) Define E(,):=custom characterF(x(, , )), L():=custom character(x(, , )). Applying the above inequality, each of the following holds with probability at least 1-2e.sup.t:

(154) .Math. "\[LeftBracketingBar]" F ( x ( , , ) ) - E ( , ) .Math. "\[RightBracketingBar]" max ( 2 V * t : 2 B * t 3 ) ( Eq . B .13 ) .Math. "\[LeftBracketingBar]" E ( , ) - L ( ) .Math. "\[RightBracketingBar]" max ( 2 V 1 t : 2 B 1 t 3 ) ( Eq . B .14 ) .Math. "\[LeftBracketingBar]" L ( ) - F ( x ) .Math. "\[RightBracketingBar]" max ( 2 V 2 t : 2 B 2 t 3 ) ( Eq . B .15 )
and the claim follows by union bound.

(155) Following proves a more stronger version of Lemma 5.3.

(156) Lemma B.2. For Xcustom character, let P(X)=custom character(X) the probability applied by the model custom character(Q, r, c; custom character, custom character) to matrix X, i.e.,
P(X)=custom charactercustom character.sub.(i,j)[m][n]Q(X.sub.ijcustom character,custom character)custom characterr(custom character).sub.j[n]c(custom character.sub.)(Eq. B.16)

(157) Define the following quantities:

(158) M * := max x , x X max u , v .Math. "\[LeftBracketingBar]" log Q ( x | u , v ) Q ( x | u , v ) .Math. "\[RightBracketingBar]" ( Eq . B .17 ) M 1 := max , , .Math. Q ( .Math. | , ) - Q ( .Math. | , ) .Math. T V max u , v , x , x .Math. "\[LeftBracketingBar]" log Q ( x | u , v ) Q ( x | u , v ) .Math. "\[RightBracketingBar]" ( Eq . B .18 ) M 2 := max , . .Math. Q ( .Math. | , ) - Q ( .Math. | , ) .Math. T V max u , v , x , x .Math. "\[LeftBracketingBar]" log Q ( x | u , v ) Q ( x | u , v ) .Math. "\[RightBracketingBar]" ( Eq . B .19 ) ( Eq . B .20 ) s * := 1 2 max u 0 , v 0 .Math. x , x X Q ( x | u 0 v 0 ) Q ( x | u 0 v 0 ) max u , v ( log Q ( x | u , v ) Q ( x | u , v ) ) 2 ( Eq . B .21 ) s 1 := 1 2 max u 0 , u 0 v 0 .Math. Q ( .Math. | u 0 , v 0 ) - Q ( .Math. | u 0 , v 0 ) .Math. T V max x , x max u , v ( log Q ( x | u , v ) Q ( x | u , v ) ) 2 ( Eq . B .22 ) s 2 := 1 2 max u 0 , v 0 , v 0 .Math. Q ( .Math. | u 0 , v 0 ) - Q ( .Math. | u 0 , v 0 ) .Math. TV max x , x max u , v ( log Q ( x | u , v ) Q ( x | u , v ) ) 2

(159) Then, for Xcustom character(Q, r, c; m, n) and any t0 the following bound holds with probability at least 2e.sup.t:

(160) .Math. "\[LeftBracketingBar]" - log P ( X ) - H ( X ) .Math. "\[RightBracketingBar]" 3 max ( s * m n t + s 1 m n 2 t + s 2 m 2 n t , M * + M 1 n + M 2 m ) ( Eq . B .23 )

(161) Proof. Let

(162) = ( i ) i m i i d r , = ( i ) i n i i d c , = ( i j ) i m , j n i i d Unif ( [ 0 , 1 ] ) , and x : [ 0 , 1 ] .fwdarw.
be such that x(.sub.ij, .sub.i, .sub.i)|.sub.i, .sub.iQ (.Math.|.sub.i; .sub.i). It defines F(x)=log P(x), and will apply Lemma B.1 to this function. Using the notation from that lemma, it claims that B.sub.*M.sub.*, B.sub.1M.sub.1custom character, B.sub.2M.sub.2custom character, and V custom character, V.sub.1custom characters.sub.1, V.sub.2custom characters.sub.2.

(163) Note that, if (x.sub.ij), (x.sub.ij) differ only for entry i, j, then:

(164) F ( x ) - F ( x ) = - log E u , v | x { Q ( x i j | u i , v j ) Q ( x i j | u i , v j ) } ( Eq . B .24 )
where custom character denotes expectation with respect to the posterior measure P(custom character, custom character|X=x). This immediately implies BM.

(165) Next consider the constant B.sub.1 defined in Eq. (B.3). Using the exchangeability of the (.sub.i,., .sub.i), it gets:

(166) B 1 = max .Math. "\[LeftBracketingBar]" log u , v | x { .Math. j = 1 n Q ( x ( 1 , j , 1 , j ) | u 1 , v j ) Q ( x ( 1 , j , 1 , j ( | u 1 , v j ) } .Math. "\[RightBracketingBar]" max max u , v .Math. "\[LeftBracketingBar]" log { .Math. j = 1 n Q ( x ( 1 , j , 1 , j ) | u 1 , v j ) Q ( x ( 1 , j , 1 , j ) | u 1 , v j ) } .Math. "\[RightBracketingBar]" max .Math. j = 1 n max u , v .Math. "\[LeftBracketingBar]" log { Q ( x ( 1 , j , 1 , j ) | u 1 , v j ) Q ( x ( 1 , j , 1 , j ) | u 1 , v j ) } .Math. "\[RightBracketingBar]" n max , max u , v .Math. "\[LeftBracketingBar]" log Q ( x ( 1 , 1 , j ) | u 1 , v j ) Q ( x ( 1 , 1 , j ) | u 1 , v j ) .Math. "\[RightBracketingBar]" n max , .Math. Q ( .Math. | , ) - Q ( .Math. | , ) .Math. TV max u , v , x , x .Math. "\[LeftBracketingBar]" log Q ( x | u , v ) Q ( x | u , v ) .Math. "\[RightBracketingBar]" = M 1
where the bound B.sub.2M.sub.2m is proved analogously.

(167) Consider now the quantity Va of Eq. (B.5). Denote by .sub.(ij)(t) the array obtained by replacing entry (i, j) in {by t, and by x (t)=x (.sub.(ij)(t), , ). Then it follows:

(168) Var i j ( F ( x ) ) = 1 2 , { ( F ( x ( ( i j ) ( ) , , ) ) - F ( x ( ( i j ) ( ) , , ) ) ) 2 } = 1 2 , { ( log E u , v | x ( ) { Q ( x ( , i , j ) | u i , v j ) Q ( x ( , i , j ) | u i , v j ) } ) 2 } 1 2 , max u , v ( log { Q ( x ( , i , j ) | u i , v j ) Q ( x ( , i , j ) | u i , v j ) } ) 2 = 1 2 .Math. x , x Q ( x | , ) Q ( x | , ) max u , v ( log { Q ( x | u , v ) Q ( x | u , v ) } ) 2

(169) Next, as claimed:

(170) 0 V * max , , .Math. i m , j n Var ij { F ( x ) } mn max , , Var ij { F ( x ) } mns *

(171) Finally, consider the quantity V.sub.1 of Eq. (B.6) (the argument is similar for V.sub.2). Denote by .sub.(i)(t) the vector obtained by replacing entry i in by t. Proceeding as above, it follows:

(172) Var i ( F ( x ) ) = 1 2 , { ( F ( x ( , ( i ) ( ) , ) ) - F ( x ( , ( i ) , ) ) ) 2 } = 1 2 , { ( log E u , v | x ( ) { .Math. j = 1 n Q ( x ( ij , , j ) | u i , v j ) Q ( x ( ij , , j ) | u i , v j ) } ) 2 } 1 2 , { ( log { .Math. j = 1 n max u , v Q ( x ( ij , , j ) | u i , v j ) Q ( x ( ij , , j ) | u i , v j ) } ) 2 } 1 2 , { ( .Math. j = 1 n log { max u , v Q ( x ( , , j ) | u , v ) Q ( x ( , , j ) | u , v ) } ) 2 } n 2 2 max , { ( log { max u , v Q ( x ( , , j ) | u , v ) Q ( x ( , , j ) | u , v ) } ) 2 } n 2 2 max , .Math. Q ( .Math. | , ) - Q ( .Math. | , ) .Math. TV max x , x 1 ( log { max u , v Q ( x | u , v ) Q ( x | u , v ) } ) 2 = n 2 s 1

(173) Therefore,

(174) V 1 = max , .Math. i = 1 m Var i ( F ( x ) ) m n 2 s 1
C Proofs for Finite State Encoders

(175) It shows above that a finite-state encoder is defined by a triple (, f, g). Formally, it can define the action of f, g on

(176) x 1 n n
recursively via

(177) f m + 1 ( x 1 m + 1 , s 0 ) = f m ( x 1 m , s 0 ) f ( x m + 1 , g ( x 1 m , s 0 ) ) ( Eq . C .1 ) g m + 1 ( x 1 m + 1 , s 0 ) = g m ( x m + 1 , g ( x 1 m , s 0 ) ) ( Eq . C .2 )
and the encoder is thus given by

(178) E ( x 1 n ) = f n ( x 1 n , s i n i t ) .

(179) The state space is non-degenerate if, for each s.sub.1 there exists

(180) m , x 1 m m
such that

(181) g m ( x 1 m , s i n i t ) = s 1 .
Notice, that if state space is degenerate, it can remove one or more symbols from without changing the encoder and making the state-space non-degenerate. The method may assume non-degeneracy without mentioning it.

(182) The FS encoder is information lossless (IL) if for any

(183) n , x 1 n f n ( x 1 n , s i n i t )
is injective.

(184) Remark C.1. An information-lossless encoder satisfies a stronger condition: for any mcustom character and any s, , the map

(185) x 1 m f m ( x 1 m , s * )
is injective

(186) Assume this were not the case, then there may exist two distinct inputs

(187) 0 x 1 m , x ~ 1 m m
and a state s, such that

(188) f m ( x 1 m , s * ) = f m ( x 1 m , s * ) .
By non-degeneracy, there exists

(189) a 1
such that

(190) s * = g ( a 1 , s i n i t ) ,
Defining

(191) n = + m , y 1 n = a 1 x 1 m , y 1 n = a 1 x 1 m ,
is not easy to check that these inputs are distinct but

(192) f n ( y 1 n , s i n i t ) = f n ( x 1 n , s i n i t ) .

(193) Proposition C.1. Define the compression rate on input

(194) x 1 n as R ( x 1 n ) = len ( f n ( x 1 n , S i n i t ) ) / ( n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) .
Then for any custom character1, the following holds (where n:=n2custom character and recall that M:=||):

(195) R ( x 1 n ) n - 2 n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" H ( p x 1 n ) - 1 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( log 2 ( .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" ) + log 2 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) ( Eq . C .3 )

(196) Proof. The method denotes by L(x.sub.1.sup.m; s.sub.*) the length of the encoding of x.sub.1.sup.m when starting in state s.sub.*:

(197) L ( x 1 n ; s * ) ; = len ( f n ( x 1 m , s * ) ) ( Eq . C .4 )

(198) It then follows, for any b {0, . . . , custom character1}, and setting by convention s.sub.0=S.sub.init, it may get:

(199) R ( x 1 n ) 1 n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. k = 0 .Math. n / .Math. - 2 L ( x k + b + 1 ( k + 1 ) + b ; s k + b ) ( Eq . C .5 )

(200) By averaging over b, and introducing the shorthand custom character: =custom character2custom character, it gets:

(201) 0 R ( x 1 n ) 1 n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. m = 1 ( .Math. n / .Math. - 1 ) L ( x m m + - 1 ; s m - 1 ) ( Eq . C .6 ) n - 2 n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. s .Math. u 1 { p x 1 n ( u 1 , s ) L ( u 1 ; s ) } ( Eq . C .7 ) ( a ) n - 2 n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. s { p x 1 n ( s ) H ( p x 1 n ( . .Math. "\[LeftBracketingBar]" s ) ) - log 2 log 2 ( .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) } ( Eq . C .8 )
where (a) holds by Lemma A.1. By the chain rule of entropy (recalling that M:=[]), it follows:

(202) .Math. s p x 1 n , ( s ) H ( p x 1 n ( . .Math. "\[LeftBracketingBar]" s ) ) = H ( X 1 .Math. "\[LeftBracketingBar]" S ) = H ( X 1 ) + H ( S .Math. "\[LeftBracketingBar]" X 1 ) - H ( S ) H ( X 1 ) - log 2 M = H ( p x 1 n ) - log 2 M ( Eq . C .3 )
where the claim (C.3) follows by using the last inequality in Eq. C.8.

(203) Theorem 3. Let custom charactercustom character(Q, r, c, custom character, custom character) and (, f, g) be an information lossless finite state encoder. With an abuse of notation, denote f.sub.mn (X.sup.mn, S.sub.init){0,1} * the binary sequence obtained by applying the finite state encoder to the vector vec (X.sup.mn) custom characterobtained by scanning X.sup.mn in row-first order. Define the compression rate by:

(204) R ( X m , n ) : = len ( f m n ( X m n , s i n i t ) ) mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( Eq . C .9 )

(205) Assuming n>10, |||custom character|, and log .sub.2<nlog.sub.2|custom character|/9, the expected compression rate is lower bounded as follows:

(206) R ( X m , n ) ( H ( X .Math. "\[LeftBracketingBar]" U ) log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ) - 1 0 log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" n log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. log ( n log .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" ) ( Eq . C .10 )

(207) Proof. Let N:=custom character, N:=custom character2 custom characterwhere custom charactercustom character/3 will be selected later. Let X.sup.N:=vec (custom character) for the vectorization custom character, X.sup.N, for the vector comprising its first N entries. Recall the definition of empirical distribution. For any fixed custom charactercustom character:

(208) p X N ( ) := 1 N - + 1 .Math. i = 1 N - + 1 1 x i i + - 1 =

(209) Let S:={i[Ncustom character+1]: [i, i+custom character2] ncustom charactercustom character=0}. These are the subset of blocks of length custom character that do not cross the end of a line in the table. Since for each line break there are at most custom character1 such blocks, it follows |S|Ncustom character+1(custom character1)(custom character1). Consider the following modified empirical distribution:

(210) p X N ( ) := 1 .Math. "\[LeftBracketingBar]" S .Math. "\[RightBracketingBar]" .Math. i s 1 X i i + - 1 =

(211) Then, by construction:

(212) p X N ( ) := ( 1 - ) p X N ( ) + q X N ( ) : = 1 - .Math. "\[LeftBracketingBar]" S .Math. "\[RightBracketingBar]" N - + 1 = ( m - 1 ) ( - 1 ) N - + 1
where custom character is the empirical distribution of blocks that do cross the line. By concavity of the entropy, it follows:

(213) H ( p X N ) ( 1 - ) H ( p X N ) + H ( q X N ) ( 1 - ) H ( p X N ) ( Eq . C .11 )

(214) Further, since custom charactercustom character/3:

(215) = ( m - 1 ) ( - 1 ) ( m n - 3 + 1 ) ( m - 1 ) ( - 1 ) ( m n - 3 + 1 ) ( m - 1 ) ( m - 1 ) n n ( Eq . C .12 )

(216) Now, let the row latents custom character: =(custom character).sub.im be fixed, and denote by custom character their weighted empirical distribution, defined as follows:

(217) r u s ( s ) := .Math. i = 1 m .Math. "\[LeftBracketingBar]" S [ ( i - 1 ) n + 1 , in ] .Math. "\[RightBracketingBar]" .Math. "\[LeftBracketingBar]" S .Math. "\[RightBracketingBar]" 1 u i = s
where custom character is the empirical distribution of the latents (custom character).sub.im where row i is weighted by its contribution to S. Note that all the weights are equal to (n2(custom character1))/|S| except, potentially, for the last one.

(218) It follows:

(219) 0 p * ( ) := [ p _ X N ( ) ] = .Math. u r u S ( u ) .Math. i = 1 Q x | u ( i | u ) , Q x | u ( | u ) := .Math. u Q ( | u , v ) c ( v )

(220) Using Eq. (C.11), (C.12), and concavity of the entropy, it gets:

(221) [ H ( p X N ) | u ] ( 1 - n ) H ( p * ) ( Eq . C .13 )

(222) By Proposition C.1, it gets:

(223) [ R ( X m , n ) | u ] m n - 2 mn log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ( 1 - n ) H ( p * ) - 1 log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ( log 2 ( .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" ) + log 2 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) 1 log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" H ( p * ) - 2 n - 1 log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ( log 2 ( .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" ) + log 2 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" )
where in the last inequality it used the fact that H(custom character)custom characterlog.sub.2|X|. It is chosen:

(224) = n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" n 3 ( Eq . C .14 )

(225) Substituting and simplifying, it gets:

(226) [ R ( X m , n ) | u ] H ( p * ) log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" - 1 0 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. log .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" log .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. log ( n log .Math. "\[LeftBracketingBar]" .Math. .Math. "\[RightBracketingBar]" ) ( Eq . C . 15 )

(227) Finally, letting (W.sub.1, . . . , custom character, U) custom charactercustom character be random variables with joint distribution

(228) r u S ( u ) .Math. i = 1 Q x | u ( i | u ) .
Then,

(229) H ( p * ) .Math. u r u S ( u ) H ( Q x | u .Math. ( .Math. | u ) ) ( Eq . C .16 ) .Math. u r u S ( u ) H ( X | U = u ) ( Eq . C . 17 )
and therefore

(230) H ( p * ) H ( X | U ) ,
finishing the proof.
D Proofs for Lempel-Ziv coding

(231) It is useful to define for each kN,

(232) L k ( X N ) : = max { 1 : j { 1 , .Math. , k - 1 } s . t . j j + - 1 = X k k + - 1 } ( Eq . D .1 ) T k ( X N ) := max { j { 1 , .Math. , k - 1 } s . t . j j + L K - 1 = X k k + L k - 1 ( Eq . D .2 )
Proof of Theorem 2

(233) Lemma D.1. Under Assumption 1, there exists a constant C such that the following holds with probability at least 1N.sup.10:

(234) max k N L k ( X N ) C log N ( Eq . D .3 )

(235) Proof. Consider a slightly different setting, and it then shows that the question reduces to this setting. Let (Z.sub.i).sub.i1 be independent random variables with Z.sub.iq.sub.i a probability distribution over custom character. Further assume max.sub.xXqi(x)1c for all i1. Then it claims that, for any t, custom character1, it follows:

(236) 0 ( Z 1 l = Z t + 1 t + ) ( 1 - c ) ( Eq . D .4 )

(237) Condition on the event

(238) Z 1 t = x 1 t
for some x.sub.1, . . . , x.sub.t custom character, then the event

(239) Z 1 = Z t + 1 t +
implies that, for i {t+1, . . . , t+1}, Z.sub.i=xp (i) where It (i)=i mod t, n (i) [1, t]. Then,

(240) ( Z 1 = Z t + 1 t + ) max x 1 t t ( Z 1 = Z t + 1 t + | Z 1 t = x 1 t ) max x 1 t t ( Z i = x ( i ) i { t + 1 , .Math. , t + | Z 1 t = x 1 t ) max x 1 t t .Math. i = t + 1 t + ( Z i = x ( i ) ) ( 1 - c )
proving claim (D.4).

(241) Reconsider the original setting:

(242) ( max k N L k ( X N ) ) = ( i < j N : X i i + - 1 = X j j + - 1 ) N 2 max i < j N ( X i i + - 1 = X j j + - 1 ) N 2 max u m m , v n n max i < j N ( X i i + - 1 = X j j + - 1 | u m , v n ) N 2 ( 1 - c )
where the last inequality follows from claim (D.4), since the (X.sub.i).sub.iN are conditionally independent given the latents custom character, custom character, with probability mass function upper bounded by 1c. The thesis follows by taking custom character=12 log N/log (1/(1c)).

(243) For i [custom character], j[custom character], it defines custom characterijcustom character: =(i1)n+j. In words, k=custom characterijcustom character is the of entry at row i column j when the table custom character is scanned in row first order. For custom character1, define the events:

(244) i , j ( ) := { i [ m ] , j [ n ] : .Math. i j .Math. < .Math. ij .Math. , .Math. "\[LeftBracketingBar]" j - j .Math. "\[RightBracketingBar]" , X .Math. i j .Math. .Math. i j .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 } ( Eq . D .5 ) i , j ( ) := { i [ m ] , j [ n ] : .Math. i j .Math. < .Math. ij .Math. , .Math. "\[LeftBracketingBar]" j - j .Math. "\[RightBracketingBar]" , X .Math. i j .Math. .Math. i j .Math. + - 1 = X .Math. ij .Math. .Math. ij .Math. + - 1 } ( Eq . D .6 )

(245) Then, it follows:

(246) ( L .Math. ij .Math. ( X N ) ) ( i , j ( ) ) + ( i , j ( ) ) ( Eq . D .7 )

(247) The next two lemmas control the probabilities of these events.

(248) Lemma D.2. Let custom character(, u):=[(1+)(log N)/H(X|U=u)], n=ncustom character(, u), and m.sub.0=m.sup.1-on(1). Under Assumption 1, for any >0, there exist constants C, >0 independent of ucustom character, such that the following hold:

(249) max i m , , j n ( i , j ( ( , u i ) ) ) C N - ( Eq . D .8 ) min m 0 i m , j n ( i , j ( ( - , u i ) ) ) 1 - C N - ( Eq . D .9 )

(250) Lemma D.3. Let custom character(, u)=[(1+)(log m)/H(X|U=u, V)], n=ncustom character(, u), and m.sub.0=m.sup.1-on(1). Under Assumption 1, for any >0, there exist constants C, >0 independent of ucustom character, such that the following hold:

(251) max i m , j n c ( i , j ( c ( - , u i ) ) ) Cm - ( Eq . D .10 ) min m 0 i m , j n c ( i , j ( c ( - , u i ) ) ) 1 - Cm - ( Eq . D .11 )
and is ready to prove Theorem 2.

(252) Proof of Theorem 2. It denotes by (k(1), . . . , k(M)) the values taken by k in the while loop of the Lempel-Ziv pseudocode. In particular,

(253) k ( 1 ) = 1 ( Eq . D .12 ) k ( + 1 ) = K ( ) + L k ( ) ( X N ) ( Eq . D .13 ) k ( M ) = N ( Eq . D .14 )

(254) Therefore, the total length of the code is:

(255) 00 len ( L Z ( X m , n ) ) = M .Math. log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) .Math. + .Math. = 1 M l e n ( e l i a s ( L k ( ) ) ) ( Eq . D .15 )

(256) By Lemma D.1 (and recalling that len(elias(L))2 log.sub.2L+1), it has, with high probability, custom characterlen(elias(custom character))2 log.sub.2 (C log N). Letting G denote the good event that this bound holds, it has on G:

(257) 01 M log 2 N len ( L Z ( X m , n ) ) M .Math. log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) .Math. + 2 M log 2 ( C log N ) ( Eq . D .16 )

(258) Since |custom character| is a constant, this means that for any >0, there exists N.sub.0() such that, for all NN.sub.0(), with probability at least 1:

(259) 02 M .Math. 1 log 2 N len ( L Z ( X m , n ) ) ( 1 + ) M .Math. 1 log 2 N + N .Math. 1 c log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ( Eq . D .17 )
where on the right len(LZcustom character))N log .sub.2|custom character| by construction. It follows:

(260) 03 { M .Math. 1 } log 2 N N log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" R L Z ( X m , n ) ( 1 + ) { M .Math. 1 } log 2 N N log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" + ( Eq . D .18 )
that is,

(261) 04 lim inf m , n .fwdarw. R L Z ( X m , n ) lim inf m , n .fwdarw. { M . 1 } .Math. log 2 N N log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( Eq . D .19 ) lim sup m , n .fwdarw. R L Z ( X m , n ) lim sup m , n .fwdarw. { M .Math. 1 } .Math. log 2 N N log 2 .Math. "\[LeftBracketingBar]" X .Math. "\[RightBracketingBar]" ( Eq . D .20 )

(262) It is left with the task of bounding custom character{M.Math.1.sub.G}.

(263) Begin by the lower bound. Define the set of bad indices B(custom character, )[custom character][custom character],

(264) 05 B ( X m , n , ) := { ( i , j ) [ m ] [ n ] : i j ( ( , u i ) ) or i , j ( ( , u i ) ) } ( Eq . D .21 )

(265) The method drops the arguments custom character, for economy of notation and writes B:=B(custom character, ). It further defines:

(266) 06 S ( u ) = S ( u ; X m , n ) := { ( i , j ) [ m ] [ n ] : u i = u and M : .Math. i j .Math. = k ( ) } ( Eq . D .22 )
where S(custom character) is the set of positions (i, j) of the table custom character where words in the LZ parsing begin.

(267) It also writes N(custom character)=custom character. |{i[custom character]: custom character=custom character}| for the total number of rows in custom characterwith row latent equal to custom character and L.sub.i.sup. for the length of the first segment in row i initiated in row i1:

(268) 07 N ( u ) .Math. ( i , j ) S ( u ) L .Math. i j .Math. + .Math. i m : u i = u L i - .Math. ( i , j ) S ( u ) B c L .Math. i j .Math. + .Math. ( i , j ) L .Math. i j .Math. + .Math. i m : u i = u L i - .Math. ( i , j ) S ( u ) ( u ; ) c ( u ; ) + ( .Math. "\[LeftBracketingBar]" B .Math. "\[RightBracketingBar]" + m ) .Math. C log N .Math. "\[LeftBracketingBar]" S ( u ) .Math. "\[RightBracketingBar]" ( u ; ) c ( u ; ) + ( .Math. "\[LeftBracketingBar]" B .Math. "\[RightBracketingBar]" + m ) .Math. C log N ,
where the last inequality holds on event G. By taking expectation on this event, it gets:

(269) 08 { N ( u ) .Math. 1 } { .Math. "\[LeftBracketingBar]" S ( u ) .Math. "\[RightBracketingBar]" .Math. 1 } } .Math. ( u ; ) c ( u ; ) + ( .Math. "\[LeftBracketingBar]" B .Math. "\[RightBracketingBar]" + m ) .Math. C log N
by Lemmas D.2 and D.2,

(270) 09 ( .Math. "\[LeftBracketingBar]" B .Math. "\[RightBracketingBar]" ) m 0 n + .Math. m 0 i m , j n ( i , j ( ( , u i ) ) i , j ( c ( ( , u i ) ) ) + C m log N m o n + C m 1 - n + Cm log N C N ( log N ) 2 ( .Math. "\[LeftBracketingBar]" B .Math. "\[RightBracketingBar]" ) Cm 1 - n + Cm log n . ( Eq . D . 23 ) Further { N ( u ) } = N r ( u ) and { N ( u ) .Math. 1 } { N ( u ) } - N ( C ) , whence lim inf m , n .fwdarw. 1 N { .Math. "\[LeftBracketingBar]" S ( u ) .Math. "\[RightBracketingBar]" .Math. 1 } .Math. ( u ; ) c ( u ; ) r ( u )

(271) Recalling the definition of custom character(custom character; ), custom character(custom character; ) and the fact that is arbitrary, n the last inequality yields:

(272) 0 lim inf m , n .fwdarw. { .Math. "\[LeftBracketingBar]" S ( u ) .Math. 1 } log 2 N N r ( u ) [ H ( X .Math. "\[LeftBracketingBar]" U = u ) ( 1 + ) H ( X .Math. "\[RightBracketingBar]" U = u , V ) ] ( Eq . D .24 )
where summing over custom character, noting that custom character|S(custom character)|=M, and substituting in Eq. (D.19) yields the lower bound on the rate in Eq. (5.10).

(273) Finally, the upper bound is proved by a similar strategy as for the lower bound. Define the set of bad indices B_=B_(custom character, )[custom character][custom character],

(274) B - ( X m , n , ) := { ( i , j ) [ m ] [ n ] : i , j c ( ( - , u i ) ) or i , j c ( c ( - , u i ) ) } ( Eq . D .25 )

(275) It also denotes by Lt the length of the last segment in row i. It then has:

(276) N ( u ) .Math. ( i , j ) S ( u ) L .Math. i j .Math. - .Math. i m : u i = ( u ) L i + .Math. ( i , j ) S ( u ) B c _ L .Math. i j .Math. - .Math. i m : u i = ( u ) L i + .Math. ( i , j ) S ( u ) B c _ ( u ; - ) c ( u ; - ) - .Math. i m : u i = ( u ) L i + .Math. "\[LeftBracketingBar]" S ( u ) .Math. "\[RightBracketingBar]" ( u ; ) c ( u ; ) - ( .Math. "\[LeftBracketingBar]" B - .Math. "\[RightBracketingBar]" + m ) .Math. C log N
where the last inequality holds on event G. By taking expectation on this event, it gets:

(277) { N ( u ) .Math. 1 } { .Math. "\[LeftBracketingBar]" S ( u ) .Math. "\[RightBracketingBar]" .Math. 1 } } .Math. ( - , u ) c ( - , u ) - ( .Math. "\[LeftBracketingBar]" B - .Math. "\[RightBracketingBar]" + m ) .Math. C log N

(278) By Lemmas D.2 and D.2,

(279) ( .Math. "\[LeftBracketingBar]" B - .Math. "\[RightBracketingBar]" ) m 0 n + .Math. m o i m , j n ( i , j c ( ( - , u i ) ) i , j c ( c ( - , u i ) ) ) + C m log N m 0 n + Cm 1 - n + C m log N C N ( log N ) 2

(280) The proof is completed exactly as for the lower bound.

(281) Proof of Lemma D.2

(282) The following standard lemmas are used.

(283) Lemma D.4. Let X be a centered random variable with custom character(Xx.sub.0)=1, x.sub.0>0. Then, lettings

(284) c ( x 0 ) = ( e x 0 - 1 - x 0 ) / x 0 2 ,
it has:

(285) ( e X ) 1 + c ( x 0 ) ( X 2 ) ( Eq . D .26 )

(286) Proof. This simply follows from exp(x)1+x+c(x.sub.0)x.sup.2 for xx.sub.0.

(287) Lemma D.5. Let (P.sub.i).sub.i1, (q.sub.i).sub.i1, be probability distributions on custom character with supi.sub.i1 max.sub.xx P.sub.i (x)1c, and sup.sub.i1 .sub.xXP.sub.i(x).sup.2 (logp; (x))C for constants c, C.

(288) Let be custom character be independent random variables with X.sub.ip.sub.i, and set X=(X.sub.1, . . . custom character). Let Y(j)custom character, j1 be a sequence of i. i. d. random vectors, with custom character independent and (Y.sub.i(j)q.sub.i. Finally, let T:=min {t1: Y(t)=X}.

(289) Then, for any >0, there exists =(, c, C)>0 such that (letting):

(290) H ( p ) := - 1 .Math. i = 1 H ( p i ) ) :

(291) ( T e [ H ( p ) - ] e - ( Eq . D .27 )

(292) Further, the same bound holds (with a different (, c, C))(Y(j)).sub.j1 are independent not identically distributed, if there exist a finite set

(293) ( q i a ) i 1 [ K ] , K C o ,
and a map b: custom character=.fwdarw.[K] such that

(294) 0 Y ( j ) q 1 b ( j ) .Math. .Math. .Math. q b ( j ) .

(295) Proof. It denotes by Y a vector distributed as Y (i). Conditional on X=custom character, T is a geometric random variables with mean 1/(1custom character(Y=x)). Hence, for the custom character(): =custom character,

(296) ( T t ( ) .Math. "\[LeftBracketingBar]" X = x ) = 1 - ( 1 - ( Y = x ) ) t ( ) t ( ) ( Y = x )

(297) Hence,

(298) ( T t ( ) ) e - / 2 + ( ( Y = X .Math. "\[LeftBracketingBar]" X ) t ( / 2 ) - 1 ) ( Eq . D .28 ) = e - / 2 + P ( / 2 ) ( Eq . D .29 ) P ( u ) := ( .Math. i = 1 log 1 q i ( X i ) < .Math. i = 1 H ( p i ) - ) ( Eq . D .30 )

(299) By Chernoff bound, for any 0, custom character(custom character)exp{l(,custom character)}, where:

(300) ( , u ) := u - 1 .Math. i = 1 [ H ( p i ) + log [ q i ( X i ) ] ( Eq . D .31 )

(301) By Holder inequality, for [0, 1] we have custom character[q.sub.i(X.sub.i).sup.](.sub.xp(x).sup.).sup.1/ where =1(1). Therefore,

(302) ( ; p ) := H ( p ) + ( 1 - ) log ( .Math. x p ( x ) 1 / ( 1 - ) ) = ( 1 - ) log X ~ p exp ( 1 - ( log p ( X ) + H ( p ) ) )

(303) Consider the random variable

(304) Z i := 1 - ( log p i ( X i ) + H ( p ) )
where X.sub.iP.sub.i. Under the assumptions of the lemma, for [0, 1/2] it has custom character(Z.sub.i)=0:

(305) Z i log ( 1 - c ) + H ( p ) log [ .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( 1 - c ) ] ( Eq . D .32 ) [ Z i 2 ] ( 1 - ) 2 .Math. x p i ( x ) ( log p i ( x ) ) 2 4 C 2 ( Eq . D .33 )

(306) Using Lemma D.4, it gets:

(307) ( ; p i ) = ( 1 - ) log e Z i ( Eq . D .34 ) ( 1 - ) log ( 1 + c 0 ( Z i 2 ) ) ( Eq . D .35 ) log ( 1 + c * 2 ) ( Eq . D .36 )
whence

(308) ( , u ) u - log ( 1 + c * 2 )

(309) By maximizing this expression over , we find that custom character(/2)exp(.sub.0()custom character) which completes the proof for the case of i.i.d. vectors Y(j).

(310) The case of non-identically distributed vectors follows by union bound over [K]

(311) Lemma D.6. Let (p.sub.i).sub.i1, be probability distributions on x, with sup.sub.i1max.sub.xXP.sub.i(x)1c, and sup.sub.i21 ExEx P.sub.i (x) (log pi (x))C for constants c, C.

(312) Let (X.sub.i).sub.il be independent random variables with X.sub.icustom character, X=(X.sub.1, . . . , custom character). Let Y(j)custom character, j1 be a sequence of i.i.d. copies of X. Finally, let T=min {t1: Y(t)=X}.

(313) Then, for any >0, there exists = (, c, C)>0, such that

(314) ( letting H _ ( p ) := - 1 .Math. i = 1 H ( p i ) ) : ( T e [ H _ ( p ) + ] ) e - ( Eq . D .37 )

(315) Proof. The proof follows the same argument as for Lemma D.5. Denote by Y a vector distributed as Y(i). and define t.sub.l():=custom character

(316) 0 ( T t ( ) .Math. "\[LeftBracketingBar]" X = x ) = ( 1 - ( Y = x ) ) t ( ) exp ( - t l ( ) ( Y = x ) )

(317) Hence,

(318) ( T t ( ) ) exp { e / 2 } + ( ( Y = X .Math. X ) t ( / 2 ) - 1 ) ( Eq . D .38 ) e / 2 + P ~ ( / 2 ) ( Eq . D .39 ) P ~ ( u ) := ( .Math. i = 1 log 1 p i ( X i ) .Math. i = 1 H ( p i ) + u ) ( Eq . D .40 )

(319) It claims that, for each custom character>0, custom character(u)custom characterfor some .sub.0(u)>0. Using again Chernoff's bound, it gets, for any >0, custom character(u)e.sup.l(,u), where:

(320) ~ ( , u ) := u - 1 .Math. i = 1 ~ ( ; p i ) ( Eq . D .41 ) ~ ( ; p i ) := log exp ( W i ) , W i := log 1 p i ( X i ) - H ( p i ) ( Eq . D .42 )
where in the last line X.sub.iP.sub.i. Under the assumptions of the lemma, W.sub.iC almost surely and applying again Lemma D.4, it gets {tilde over ()}(; p.sub.i)log(1+c,.sup.2) for 1. The proof is completed by selecting for each u>0, >0 so that ulog (1+c,.sup.2>0.

(321) It is ready to prove Lemma D.2.

(322) Proof of Lemma D.2. It begin by proving the bound (D.8).

(323) Fix icustom character, jcustom character, ucustom character, >0, and write custom character=custom character(, u.sub.i). Define R.sub.ij:={i,j): max(1, j1)jj1} and S.sub.ij={, j): {<i or i=i, j<jl}. Finally, for t{0, . . . , l1}, let S.sub.ij(t)=S.sub.ij n {i, j): {ij>=t mod l}.

(324) By union bound,

(325) ( i , j ( ) .Math. u ) A + .Math. t = 0 - 1 B ( t ) A := .Math. ( rs ) R ij ( X .Math. rs .Math. .Math. rs .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 .Math. u ) B ( t ) := ( ( r , s ) S ij ( t ) : X .Math. rs .Math. .Math. rs .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 .Math. u )

(326) Now, by the bound of Eq. (D.4),

(327) A . ( 1 - c ) C N - ( Eq . D .43 )
for suitable constants C,.sub..

(328) Next, for any t{0, . . . , l1}, the vectors

(329) { X .Math. rs .Math. .Math. rs .Math. + - 1 }
are mutually independent and independent of

(330) { X .Math. i j .Math. .Math. i j .Math. + - 1 } .
Conditional on u, the coordinates of

(331) X .Math. r s .Math. .Math. r s .Math. + - 1 = ( x .Math. rs .Math. , .Math. , X .Math. rs .Math. + - 1 )
are independent with marginal distributions custom charactercustom character(note that independence of the coordinates holds because l<m/2 and therefore

(332) X .Math. r s .Math. .Math. r s .Math. + - 1
does not include two entries in the same column). Note that the collection of marginal distributions custom character(.Math.|custom character), ucustom charactersatisfies the conditions of Lemma D.5 by assumption. Further, the vector

(333) X .Math. r s .Math. .Math. r s .Math. + - 1
can have at most one of K=|custom character|.sup.2(custom character+1) distributions (depending on the latents value and the occurrence of a line break in the block.)

(334) Applying Lemma D.5, it obtains:

(335) 0 B ( t ) e - 0 C N - ( Eq . D .44 )

(336) Summing over t{0, . . . , custom character1} and adjusting the constants yields the claim (D.8).

(337) Next consider the bound (D.9). Fix ucustom character, icustom character, jcustom character, and write custom character=custom character(, custom character) for brevity below:

(338) ( i , j C ( ) .Math. "\[RightBracketingBar]" u ) ( ( i , j ) S i j ( t ) s . t . u i = u i , j < n : X .Math. i j .Math. .Math. i j .Math. + - 1 X .Math. i j .Math. .Math. i j .Math. + - 1 .Math. "\[RightBracketingBar]" u ) ( Eq . D .45 )

(339) Here, t{0, . . . , custom character1} can be chosen arbitrarily. Let S.sub.ij (t;u)={i, j) S.sub.ij(t)s. t. custom character=custom character, j<n} Conditional on u, the vectors

(340) ( X .Math. i j .Math. .Math. i j .Math. + - 1 ) ( i , j ) S i j ( t ; u )
are i.i.d. and independent of

(341) X .Math. i j .Math. .Math. i j .Math. + - 1 .
Further, they are distributed as

(342) X .Math. i j .Math. .Math. i j .Math. + - 1
Finally,

(343) N i j ( u ) := .Math. "\[LeftBracketingBar]" S i j ( t ; u ) .Math. "\[RightBracketingBar]" n ( m i ( u ) - C log N m i ( u ) n C log N - C n
where custom character(u) is the number rows i<i such that custom character=u. Since ii and custom character(custom character=u)custom character(custom character)>0, by Chernoff bound there exist constants C, c.sub.0 such that, for all m, n large enough (since im.sub.0):

(344) ( N i j ( u ) c 0 m 0 n log N ) 1 - C e - m 0 / C ( Eq . D .46 )

(345) Further, for any >0 we can choose positive constants .sub.0, .sub.1>0 such that the following holds for all custom character, custom character, large enough:

(346) c 0 m 0 n log N N 1 - 1 e [ H ( X | U = u i ) + 0 ] ( Eq . D .47 )

(347) Let T.sub.ij be the rank of the first (i, j) in the set defined above such that

(348) X .Math. i j .Math. .Math. i j .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 ,
and T.sub.ij= if no such vector exists. It can continue from Eq. (D.45) to get:

(349) ( i , c ( ) ) ( T i j N i j ( u ) ) ( T i j N i j ( u ) ; N i j ( u ) e [ H ( X | U = u i ) + 0 ] ) + C e - m 0 / C ( a ) exp { - 0 min u ( ( - ; u ) ) } + C e - m 0 / C CN -
where in () it used Lemma D.6. This completes the proof of Eq. (D.9).
Proof of Lemma D.3

(350) It begins by considering the bound (D.10).

(351) Fix icustom character, jcustom character, custom charactercustom character, vcustom character, >0, and write custom character=custom character(, custom character), custom character. By union bound:

(352) 0 ( i , j ( ) | u , ) = ( .Math. s [ n ] , | j - s | < B ( s ) | u , ) B ( s ) := { r < i : X .Math. r s .Math. .Math. r s .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 }

(353) Note that for a fixed s, and conditional on u, v, the vectors

(354) ( X .Math. r s .Math. .Math. r s .Math. + - 1 ) 1 s i - 1
are mutually independent and independent of

(355) X .Math. i j .Math. .Math. i j .Math. + - 1 .
Further,

(356) X .Math. r s .Math. .Math. r s .Math. + - 1
has independent coordinates with marginals custom characterQx|custom character(.Math.|custom characterv.sub.s, (recall that we are conditioning both on custom character and v). In particular, the marginal distributions satisfy the assumption of Lemma D.5 and the law of

(357) X .Math. r s .Math. .Math. r s .Math. + - 1
can take one Of K=|custom character|.sup.2 (custom character+1) possible values. Letting i-T(s) the last row at which

(358) X .Math. r s .Math. .Math. r s .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1
(with T(s)if no such row exists), it has, for some constants C, c.sub.0>0,

(359) ( i , j ( ) .Math. "\[LeftBracketingBar]" u , v ) ( .Math. s [ n ] , | j - s | < { T ( s ) i - 1 } { i - 1 e [ H - E ] } u , v ) + 1 ( i - 1 e [ H - E ] ) ( a ) 2 e - + 1 ( m > e [ H - ] ) Cm - c 0 + 1 ( m > e [ H - ] )
where in (a) it used Lemma D.5, and it defined

(360) H := - 1 .Math. k = j j + - 1 H ( X | U = u i , V = v k .

(361) Taking expectation with respect to v, it gets:

(362) ( i , j ( ) | u ) C m - c 0 + ( 1 .Math. k = j j + - 1 H ( X | U = u i , V = v k ) < 1 1 + ( H ( X | U = u i , V ) + ) ) ( a ) Cm - c 0 + e - C m - c 0
where in () it used Chernoff bound. This completes the proof of Eq. (D.10).

(363) Finally, the proof Eq. (D.11) is similar to the one of Eq. (D.9). It fixes custom charactercustom character, icustom character, jcustom character, and writes custom character=custom character(, custom character).

(364) ( i , j c ( ) | u ) ( i < iu i = u i : X .Math. i j .Math. .Math. i j .Math. + - 1 X .Math. ij .Math. .Math. ij .Math. + - 1 | u ) ( Eq . D . 48 )

(365) Let

(366) 0 S i j c ( u ) := { ( i , j ) s . t . u i , = u i , i < i } .

(367) Conditional on custom character, v, the vectors

(368) ( X .Math. i j .Math. .Math. i j .Math. + - 1 ) ( i , j ) S ij c ( u )
are i.i.d. and independent copies of

(369) X .Math. ij .Math. .Math. ij .Math. + - 1 .
Finally,

(370) N i c ( u ) := .Math. "\[LeftBracketingBar]" S i j c ( u ) .Math. "\[RightBracketingBar]"

(371) is the number rows i<i such that custom character=custom character. By Chernoff bound there exist constants C, c0 such that, for all m, n large enough (recalling it needs only to consider im.sub.0):

(372) ( N i c ( u ) c 0 m 0 ) 1 - C e - m 0 / C ( Eq . D .49 )

(373) Since m.sub.0m.sup.1-on(1), for any >0 it can choose constants .sub.0, custom character.sub.1>0 so that:

(374) c 0 m 0 m 1 - 1 e [ H ( X | U = u i , V ) + 2 0 ] ( Eq . D .50 )

(375) Recall the definition

(376) H := - 1 .Math. k = j j + - 1 H ( X | U = u i , V = v k ) .
By an an application of Chernoff bound:

(377) ( N i c ( u ) e [ H ( X .Math. U = u i , V ) + 0 ] ) 1 - C m - - Ce - m 0 / C ( Eq . D .51 )

(378) Let T.sub.i be the rank of the first i in the set defined above such that

(379) X .Math. i j .Math. .Math. i j .Math. + - 1 = X .Math. i j .Math. .Math. i j .Math. + - 1 ,
and T.sub.i= if no such vector exists. From Eq. (D.48) it gets:

(380) ( ij c ( ) ) ( T i N i ( u ) ) ( T i N i ( u ) ; N i ( u ) e [ H ( X .Math. U = u i , V ) + 0 ] ) + C m - ( a ) exp { - u min ( c ( - ; u ) ) } + C m - 2 C m -
where in (a) it used Lemma D.6.
E Proofs for Latent-Based Encoders
Proof of Lemma 5.4

(381) General bound (5.15)

(382) Define the ideal expected compression rate (e.g., the rate achieved by a compressor that is given the latents):

(383) 0 R # := 1 mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" { [ len ( header ) ] + [ len ( Z ( u ) ) ] + [ len ( Z ( v ) ) ] + .Math. u , v [ len ( Z ( X ( u , v ) ) ) ] }

(384) Since R.sub.lat(X)1 by construction, it has:

(385) R lat ( X ) { R lat ( X ) 1 A ^ U ( X ; u ^ ) = 1 1 A ^ V ( X ; v ^ ) = 1 } + ( A ^ U ( X , u ^ ) < 1 ) + ( A V ( X ; v ) < 1 ) (* ) R # + ( A ^ V ( X ; v ) < 1 )
where in step (*) we bounded custom character[len(Z(custom character))custom character]=custom character[len(Z(custom character))custom character]custom character[len(Z(custom character))], because, on the event {.sub.U(X;custom character)=1}, custom character coincides with custom character up to relabelings, and the compressed length is invariant under relabelings. Similar arguments were applied to len(Z(v)) and len (Z(X(custom character, v))).

(386) It follows, by the definition of .sub.z(N; k) in Eq. (5.19),

(387) [ len ( Z ( u ) ) ] mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" H ( U ) n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" + + 1 n z ( m n ; { r , c } ) ( Eq . E .1 ) [ len ( Z ( v ) ) ] mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" H ( V ) n log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" + + 1 m z ( m n ; { r , c } ) ( Eq . E .2 ) [ len ( Z ( x ( u , v ) ) ) .Math. u , v ] mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" r ^ ( u ) c ^ ( v ) H ( X .Math. U = u , V = v ) log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" + z ( c .Math. mn ; { Q ( .Math. .Math. u , v ) } i , v ) ( Eq . E .3 )
where in the last line is the empirical distribution of the row latents and is the empirical distribution of the column latents. By taking expectation in the last expression, it gets:

(388) .Math. u , v [ len ( Z ( x ( u , v ) ) ) .Math. u , v ] mn log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" H ( X .Math. U , V ) log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" 2 2 ( c .Math. mn ; { Q ( .Math. u , v ) } u , v ) ( Eq . E .4 )

(389) Finally, the header contains |custom character|.sup.2+2 integers of maximum size custom character, whence len(header)4 log.sub.2(mn). It concludes that:

(390) R # 1 log 2 .Math. "\[LeftBracketingBar]" x .Math. "\[RightBracketingBar]" { H ( X .Math. U , V ) + 1 n H ( U ) + 1 n H ( V ) } + 2 log 2 ( mn ) mn + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" 2 Z ( c .Math. mn ; { Q ( .Math. .Math. u , v ) } u , v ) + 2 Z ( m n ; { r , c } )

(391) The claim (5.15) follows from the first bound in Eq. (5.2) noticing that, under the stated assumptions on custom character, custom character,

(392) 1 n [ h ( U ) + u log ( .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" - 1 ) ] U ( A ^ U ( X m , n ; u ^ ) < 1 ) ( Eq . E .5 )

(393) Overheads of specific encoders: Eqs. (5.16)-(5.5).

(394) LZ coding. Let X.sup.N=(X.sub.1, . . . , X.sub.N) be a vector with i.i.d. symbols X.sub.iq with q a probability distribution over custom character. There are two important differences with the analysis above: data are i.i.d. (not matrix structured) and it is desirable to derive a sharper estimate (not just the entropy term but bounding the overhead as well).

(395) It defines L.sub.k(X.sup.N), T.sub.k(X.sup.N), and lets (k(1), . . . , k(M)) be the values taken by k in the while loop of the Lempel-Ziv pseudocode. In particular,

(396) k ( 1 ) = 1 ( Eq . E .6 ) k ( + 1 ) = k ( ) + L k ( ) ( X N ) ( Eq . E .7 ) k ( M ) = N ( Eq . E .8 )

(397) Therefore, the total length of the code is:

(398) len ( LZ ( X N ) ) = M .Math. log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) .Math. + .Math. = 1 M len ( elias ( L k ( ) ) ) M .Math. log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) .Math. + 2 .Math. = 1 M log 2 ( L k ( ) ) ( Eq . E .9 ) M .Math. log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. + 2 M log 2 ( N / M ) ( Eq . E .10 )
where the last step follows by Jensen's inequality. By one more application of Jensen,

(399) R LZ ( X N ) 1 log 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" , M N , { log 2 ( N + .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ) + 2 log 2 ( N / M ) } ( Eq . E .11 )

(400) For custom charactercustom character, define the set of bad positions as:

(401) B ( ) := { k .Math. N .Math. : L k ( X N ) } ( Eq . E .12 )
whence,

(402) 0 N = .Math. j = 1 M L k ( j ) ( M - .Math. "\[LeftBracketingBar]" B ( ) .Math. "\[RightBracketingBar]" ) ( Eq . E .13 )
and therefore, for any c(0, 1):

(403) M N 1 + 1 N .Math. k = 1 N ( L k ( X N ) ) ( Eq . E .14 ) 1 + N - 1 + c + 1 N .Math. k = N c N ( L k ( X N ) ) ( Eq . E .15 )
Certain Definitions

(404) While various embodiments of the invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example. Numerous variations, changes, and substitutions may occur to those skilled in the art without departing from the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed.

(405) Whenever the term at least, greater than, or greater than or equal to precedes the first numerical value in a series of two or more numerical values, the term at least, greater than or greater than or equal to applies to each of the numerical values in that series of numerical values. For example, greater than or equal to 1, 2, or 3 is equivalent to greater than or equal to 1, greater than or equal to 2, or greater than or equal to 3.

(406) Whenever the term no more than, less than, or less than or equal to precedes the first numerical value in a series of two or more numerical values, the term no more than, less than, or less than or equal to applies to each of the numerical values in that series of numerical values. For example, less than or equal to 3, 2, or 1 is equivalent to less than or equal to 3, less than or equal to 2, or less than or equal to 1.

(407) The present disclosure uses boldface for vectors and uppercase boldface for matrices, without making any typographic distinction between numbers and random variables. The dimensions of a matrix or a vector is indicated by subscripts. For example, u.sup.m is a vector of length m, and X.sup.m,n is a matrix of dimensions mn.

(408) If X, Y are random variables on a common probability space (, F, P), their entropies are denoted by H(X), H(Y), H(X, Y) denotes their joint entropy, H(X|Y) denotes the conditional entropy of X given Y.

(409) Computer Systems

(410) The present disclosure provides computer systems that are programmed to implement methods of the disclosure. In some cases, the data objects to be processed may be stored in a cloud via services such as Amazon AWS or Google GCP. For instance, cloud compute instances obtained through the same providers may host the data reducers that process data according to the methods described herein. FIG. 5 shows a computer system 501 that is programmed or otherwise configured to implement the lossless compression algorithm as described herein. The computer system 501 can regulate various aspects of processing structured or semi-structured data. For example, the computer system may execute algorithms to: (i) estimate latent variables associated to rows and columns of the table; (ii) partition the table in blocks according to the row/column latents; (iii) apply a sequential (e.g., Lempel-Ziv compression or entropy coding) to each of the blocks; (iv) append a compressed encoding of the latent. The computer system 501 can be an electronic device of a user or a computer system that is remotely located with respect to the electronic device. The electronic device can be a mobile electronic device.

(411) The computer system 501 includes a central processing unit (CPU, also processor and computer processor herein) 505, which can be a single core or multi core processor, or a plurality of processors for parallel processing. The computer system 501 also includes memory or memory location 510 (e.g., random-access memory, read-only memory, flash memory), electronic storage unit 515 (e.g., hard disk), communication interface 520 (e.g., network adapter) for communicating with one or more other systems, and peripheral devices 525, such as cache, other memory, data storage and/or electronic display adapters. The memory 510, storage unit 515, interface 520 and peripheral devices 525 are in communication with the CPU 505 through a communication bus (solid lines), such as a motherboard. The storage unit 515 can be a data storage unit (or data repository) for storing data. The computer system 501 can be operatively coupled to a computer network (network) 530 with the aid of the communication interface 520. The network 530 can be the Internet, an internet and/or extranet, or an intranet and/or extranet that is in communication with the Internet. The network 530 in some cases is a telecommunication and/or data network. The network 530 can include one or more computer servers, which can enable distributed computing, such as cloud computing. The network 530, in some cases with the aid of the computer system 501, can implement a peer-to-peer network, which may enable devices coupled to the computer system 501 to behave as a client or a server.

(412) The CPU 505 can execute a sequence of machine-readable instructions, which can be embodied in a program or software. The instructions may be stored in a memory location, such as the memory 510. The instructions can be directed to the CPU 505, which can subsequently program or otherwise configure the CPU 505 to implement methods of the present disclosure. Examples of operations performed by the CPU 505 can include fetch, decode, execute, and writeback.

(413) The CPU 505 can be part of a circuit, such as an integrated circuit. One or more other components of the system 501 can be included in the circuit. In some cases, the circuit is an application specific integrated circuit (ASIC).

(414) The storage unit 515 can store files, such as drivers, libraries and saved programs. The storage unit 515 can store user data, e.g., user preferences and user programs. The computer system 501 in some cases can include one or more additional data storage units that are external to the computer system 501, such as located on a remote server that is in communication with the computer system 501 through an intranet or the Internet.

(415) The computer system 501 can communicate with one or more remote computer systems through the network 530. For instance, the computer system 501 can communicate with a remote computer system of a user (e.g., laptop). Examples of remote computer systems include personal computers (e.g., portable PC), slate or tablet PC's (e.g., Apple iPad, Samsung Galaxy Tab), telephones, Smart phones (e.g., Apple iphone, Android-enabled device, Blackberry), or personal digital assistants. The user can access the computer system 501 via the network 530.

(416) Methods as described herein can be implemented by way of machine (e.g., computer processor) executable code stored on an electronic storage location of the computer system 501, such as, for example, on the memory 510 or electronic storage unit 515. The machine executable or machine readable code can be provided in the form of software. During use, the code can be executed by the processor 505. In some cases, the code can be retrieved from the storage unit 515 and stored on the memory 510 for ready access by the processor 505. In some situations, the electronic storage unit 515 can be precluded, and machine-executable instructions are stored on memory 510.

(417) The code can be pre-compiled and configured for use with a machine having a processer adapted to execute the code, or can be compiled during runtime. The code can be supplied in a programming language that can be selected to enable the code to execute in a pre-compiled or as-compiled fashion.

(418) Aspects of the systems and methods provided herein, such as the computer system 501, can be embodied in programming. Various aspects of the technology may be thought of as products or articles of manufacture typically in the form of machine (or processor) executable code and/or associated data that is carried on or embodied in a type of machine readable medium. Machine-executable code can be stored on an electronic storage unit, such as memory (e.g., read-only memory, random-access memory, flash memory) or a hard disk. Storage type media can include any or all of the tangible memory of the computers, processors or the like, or associated modules thereof, such as various semiconductor memories, tape drives, disk drives and the like, which may provide non-transitory storage at any time for the software programming. All or portions of the software may at times be communicated through the Internet or various other telecommunication networks. Such communications, for example, may enable loading of the software from one computer or processor into another, for example, from a management server or host computer into the computer platform of an application server. Thus, another type of media that may bear the software elements includes optical, electrical and electromagnetic waves, such as used across physical interfaces between local devices, through wired and optical landline networks and over various air-links. The physical elements that carry such waves, such as wired or wireless links, optical links or the like, also may be considered as media bearing the software. As used herein, unless restricted to non-transitory, tangible storage media, terms such as computer or machine readable medium refer to any medium that participates in providing instructions to a processor for execution.

(419) Hence, a machine readable medium, such as computer-executable code, may take many forms, including but not limited to, a tangible storage medium, a carrier wave medium or physical transmission medium. Non-volatile storage media include, for example, optical or magnetic disks, such as any of the storage devices in any computer(s) or the like, such as may be used to implement the databases, etc. shown in the drawings. Volatile storage media include dynamic memory, such as main memory of such a computer platform. Tangible transmission media include coaxial cables; copper wire and fiber optics, including the wires that comprise a bus within a computer system. Carrier-wave transmission media may take the form of electric or electromagnetic signals, or acoustic or light waves such as those generated during radio frequency (RF) and infrared (IR) data communications. Common forms of computer-readable media therefore include for example: a floppy disk, a flexible disk, hard disk, magnetic tape, any other magnetic medium, a CD-ROM, DVD or DVD-ROM, any other optical medium, punch cards paper tape, any other physical storage medium with patterns of holes, a RAM, a ROM, a PROM and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave transporting data or instructions, cables or links transporting such a carrier wave, or any other medium from which a computer may read programming code and/or data. Many of these forms of computer readable media may be involved in carrying one or more sequences of one or more instructions to a processor for execution.

(420) The computer system 501 can include or be in communication with an electronic display 535 that comprises a user interface (UI) 540 for providing, for example, compression results and analytics. Examples of UI's include, without limitation, a graphical user interface (GUI) and web-based user interface.

(421) Methods and systems of the present disclosure can be implemented by way of one or more algorithms. An algorithm can be implemented by way of software upon execution by the central processing unit 505.

(422) While preferred embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. It is not intended that the invention be limited by the specific examples provided within the specification. While the invention has been described with reference to the aforementioned specification, the descriptions and illustrations of the embodiments herein are not meant to be construed in a limiting sense. Numerous variations, changes, and substitutions will now occur to those skilled in the art without departing from the invention. Furthermore, it shall be understood that all aspects of the invention are not limited to the specific depictions, configurations or relative proportions set forth herein which depend upon a variety of conditions and variables. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention. It is therefore contemplated that the invention shall also cover any such alternatives, modifications, variations or equivalents. It is intended that the following claims define the scope of the invention and that methods and structures within the scope of these claims and their equivalents be covered thereby.

(423) While preferred embodiments of the present subject matter have been shown and described herein, it can be understood that such embodiments are provided by way of example only. Numerous variations, changes, and substitutions will now without departing from the present subject matter. It can be understood that various alternatives to the embodiments of the present subject matter described herein may be employed in practicing the present subject matter.