Original: Text Ranking and Classiﬁcation using Data Compression
Revised: Text Ranking and Classiﬁcation using Data Compression

Original: Abstract
Revised: Abstract

Original: A well-known but rarely used approach to text categorization uses conditional entropy estimates computed using data compression tools.
Revised: A well-known but rarely used approach to text categorization uses conditional entropy estimates computed using data compression tools.

Original: Text afﬁnity scores derivedfrom compressed sizes can be used for classiﬁcation and ranking tasks, but theirsuccess depends on the compression tools used.
Revised: Text afﬁnity scores derived from compressed sizes can be used for classiﬁcation and ranking tasks but their success depends on the compression tools used.

Original: We use the Zstandard compressorand strengthen these ideas in several ways, calling the resulting language-agnostictechnique Zest .
Revised: We use the Zstandard compressor and strengthen these ideas in several ways, calling the resulting language-agnostic technique Zest .

Original: In applications, this approach simpliﬁes conﬁguration, avoidingcareful feature extraction and large ML models.
Revised: In applications, this approach simpliﬁes conﬁguration, avoiding careful feature extraction and large ML models.

Original: Our ablation studies conﬁrm thevalue of individual enhancements we introduce.
Revised: Our ablation studies conﬁrm the value of individual enhancements we introduce.

Original: We show that Zest complementsand can compete with language-speciﬁc multidimensional content embeddings inproduction, but cannot outperform other counting methods on public datasets
Revised: We show that Zest complements and can compete with language-speciﬁc multidimensional content embeddings in production but cannot outperform other counting methods on public datasets

Original:  Motivationand Overview
Revised:  Motivation

Original: The idea of comparing texts using off-the-shelf lossless data compression tools goes back to [1],which linked entropy estimation and using gzip on text with text similarity metrics.
Revised: The idea of comparing texts using off-the-shelf lossless data compression tools goes back to [1], which in 2002 linked entropy estimation and using gzip on text with text similarity metrics.

Original: Given two strings X and Y , one compresses each of them individually and also the string X + Y .
Revised: Given two strings X and Y , one compresses each of them individually and also the string X + Y .

Original: Similar stringscompress better after being concatenated.
Revised: Similar strings compress better after being concatenated.

Original: An afﬁnity score for X and Y is computed from the threeresulting bytesizes.
Revised: An afﬁnity score for X and Y is computed from the three resulting bytesizes.

Original: This computation is simple, requires little infrastructure, works for any language,and naturally handles similar words, word forms, typos, etc.
Revised: This computation is simple, requires little infrastructure, works for any language, and naturally handles similar words, word forms, typos, etc.

Original: It can be easily applied to multi-classclassiﬁcation (e.g., binning news articles by category) and ranking relative to known examples.
Revised: It can be easily applied to multi-class classiﬁcation (e.g., binning news articles by category) and ranking relative to known examples.

Original: On the ﬂip side, performance may be affected by deﬁciencies of speciﬁc compression tools, alongwith various logistical details of how data compression works in practice.
Revised: Following up on [1], the 2004 work in [2] showcased the versatility of compression-based estimators by demonstrating their practical advantages for (i) clustering time-series and text, (ii) anomaly detection, (iii) classiﬁcation for various non-text datasets. These techniques are attractive in practice because they can handle many data formats without the need to understand their structure, are easy to conﬁgure, and are reasonably efﬁcient in terms of computation. The authors of [2] also emphasize the “parameter-free” nature of compression-based estimators, in comparison with various ML techniques that may produce different results depending on parameter settings.

Original: Compression block size andword size (8/12/16 bits), level of effort, and other settings affect the results, whereas the compressionheaders and dictionaries embedded in each compressed ﬁle spoil entropy estimates, especially forsmall ﬁles.
Revised: In practice, some compression tools are better than others on certain kinds of inputs (making a choice of a compression tool is a type of ﬁtting to data), and hyperparameter settings affect compression performance: compression block size and word size (8/12/16 bits), level of effort, parallel execution, efﬁcient use of CPU instruction sets, etc. Moreover, compression headers and dictionaries embedded in each compressed ﬁle spoil entropy estimates, especially for small ﬁles.

Original: In fact, a controversy ensued after the publication of [1] becauseapparently Naive Bayesworked better than zipping for the  language afﬁnity application explored in the paper.
Revised: In fact, a controversy ensued after the publication of [1] because zipping could not outperform Naive Bayes [3]. Despite the past controversies and apparent lack of broad adoption, the idea to use data compression for text classiﬁcation has become so mainstream today that it appears in a key AI textbook [4, Chapter 23]. There, Russel and Norvig point out that "In effect, compression algorithms are creating a language model. The LZW algorithm in particular directly models a maximum-entropy probability distribution.

Original: We revisit compression-based text afﬁnity scores [1] because modern compressors are faster than toolsfrom 2002 and produce better entropy estimates.
Revised: " Presumably, compression ratio then estimates the probability that given input was generated by the language model. Motivated by this discussion, Halford offers [5] are a recent (2021) re-evaluation of the idea from [1], using a recent version of gzip compressor on the public News data set available with sklearn [12]. Indeed, Multinomial Naive Bayes from sklearn clearly outperforms gzip -based classiﬁcation by F1 score and "It’s also dramatically faster".

Revised: Halford evaluates several other modern compressions — zlib , bz2 , and lzma , which show wildly different results in terms of F1 and runtime.

Revised: All of these tools are much slower than Multinomial Naive Bayes, and only lzma shows performance on par with it but at the cost of being several times slower than other data compressors.

Revised: In contrast to these recent pessimistic results, we show how to signiﬁcantly improve the ML performance and runtime of compression-based text classiﬁcation.

Revised:  Insights and Overview

Revised: We revisit compression-based text afﬁnity scores [1] because modern compressors are faster than tools from 2002 and produce better entropy estimates.

Original: The  open-source zstandard lossless compressor[2, 3], developed by Yann Collet at Facebook around 2016, produces results not far from thoseof (slow) arithmetic coding that are considered close to the Shannon bound.
Revised: The lossless open-source zstandard compressor [6, 7, 8], developed by Yann Collet at Facebook around 2016, produces results not far from those of (slow) arithmetic coding that are considered close to the Shannon bound.

Original: The zstandardcompressor offers a dictionary interface , which allows us to improve the approach of [1] and make itmore practical, especially for small and medium-sized strings.
Revised: The zstandard compressor offers a dictionary interface , which allows us to improve the approach of [1] and make it more practical, especially for small and medium-sized strings.

Original: Zstandard can build a compressiondictionary and use it to compress many small ﬁles, to avoids the overhead ofa separate dictionaries.
Revised: Zstandard can build a compression dictionary and use it to compress many small ﬁles, to avoid the overhead of separate dictionaries.

Original: We use the dictionary interface to compress texts to be classiﬁed or ranked.
Revised: We use the dictionary interface to compress texts to be classiﬁed or ranked.

Original: This sharpens entropyestimates and improves speed versus compressing concatenated ﬁles (where the same ﬁle would beconcatenated with multiple other ﬁles).
Revised: This sharpens entropy estimates and improves speed versus compressing concatenated ﬁles (where the same ﬁle would be concatenated with multiple other ﬁles).

Original: The resulting text afﬁnity scores can be used as inputs to(multimodal) classiﬁers and rankers.
Revised: The resulting text afﬁnity scores can be used as inputs to multimodal classiﬁers and rankers.

Original: The simplicity of this language-agnostic method is attractivewhen building ML platforms, especially for product engineers without ML background.
Revised: The simplicity of this language-agnostic method is attractive when building ML platforms, especially for product engineers without ML background.

Original: Applications to text ranking and classiﬁcation

Original: We leverage text afﬁnity estimation in text ranking and classiﬁcation.
Revised: We leverage text afﬁnity estimation in text ranking and classiﬁcation.

Original: For example, given positiveand negative examples for 2-class classiﬁcation, we ﬁrst build compression dictionaries for eachclass.
Revised: For example, given positive and negative examples for 2-class classiﬁcation, we ﬁrst build compression dictionaries for each class.

Original: As an option, the texts can be normalized by removing punctuation within sentences (but notspaces) and lowercasing the remaining letters (for languages without upper/lower cases, this is ano-op).
Revised: As an option, the texts can be normalized by removing punctuation within sentences (but not spaces) and lowercasing the remaining letters (for languages without upper/lower cases, this is a no-op).

Original:  Zstandard can build dictionaries from a set of ﬁles without the need to concatenate them,which is useful when working with many small examples.
Revised: With Zstandard , there is no need to concatenate ﬁles as in [1], thanks to the dictionary interface.

Original: The original approach has several major weaknesses that we are able to address.
Revised: The original approach has several major weaknesses that we are able to address.

Original: To illustrate them,consider classifying news articles in topics — Politics, Celebrities, and Sports.
Revised: To illustrate them, consider classifying news articles in topics — Politics, Celebrities, and Sports.

Original: Some importantwords and phrases appear in multiple topics, but with different frequencies, for example, “Arnold
Revised: Some important words and phrases appear in multiple topics, but with different frequencies, for example, “Arnold

Original: Schwarzenegger”.
Revised: Schwarzenegger”.

Original: For a sufﬁciently large set of examples, such words compress equally well foreach class, and do not contribute useful information.
Revised: For a sufﬁciently large set of examples, such words compress equally well for each class, and do not contribute useful information.

Original: This is particularly detrimental when classifyingor ranking short texts.
Revised: This is particularly detrimental when classifying or ranking short texts.

Original: Downsampling the examples would help with common words and phrases, butundermine the handling of rare words and phrases (which would not be compressed for any class).
Revised: Downsampling the examples would help with common words and phrases, but undermine the handling of rare words and phrases (which would not be compressed for any class).

Original: Toaddress this challenge, we use a set of dictionaries of telescoping sizes — this way, common wordsare differentiated by smaller dictionaries and rare words are differentiated by larger dictionaries.
Revised: To address this challenge, we use a set of dictionaries of telescoping sizes — this way, common words are differentiated by smaller dictionaries and rare words are differentiated by larger dictionaries.

Original: Another challenge is the heavier impact of longer words on compression ratios.
Revised: Another challenge is the heavier impact of longer words on compression ratios.

Original: We address it by wordpadding to ﬁxed length, e.g., "hello" padded to 10 characters becomes "hellohello".
Revised: We address it by word padding to ﬁxed length, e.g., "hello" padded to 10 characters becomes "hellohello".

Original: We conﬁgurezstandard to minimize headers in compressed ﬁles and, furthermore, subtract the compressed sizeof an empty string from compressed sizes of evaluated pieces of text.
Revised: We conﬁgure zstandard to minimize headers in compressed ﬁles and, furthermore, subtract the compressed size of an empty string from compressed sizes of evaluated pieces of text.

Original: For each evaluated text, for eachclassiﬁcation class, we average the byte compression ratio over multiple dictionaries.
Revised: For each evaluated text, for each classiﬁcation class, we average the byte compression ratio over multiple dictionaries.

Original: Subtracting thisnumber from 1.0 produces an afﬁnity score, for which “greater is better”.
Revised: Subtracting this number from 1.0 produces an afﬁnity score, for which “greater is better”.

Original: In particular, a sentencethat was seen in some class examples may return a value close to 1.0, whereas a sentence in adifferent script (e.g., Greek vs Cyrillic) would not compress well, resulting in a value close to 0.0.
Revised: In particular, a sentence that was seen in some class examples may return a value close to 1.0, whereas a sentence in a different script (e.g., Greek vs Cyrillic) would not compress well, resulting in a value close to 0.0.

Original: Formulticlass classiﬁcation, we subtract the min class score from all scores.
Revised: For multiclass classiﬁcation, we subtract the min class score from all scores.

Original: This handles words presentin many classes.
Revised: This handles words present in many classes.

Original: For ranking applications, afﬁnity scores can be sortedon, to produce an ordering.
Revised: For ranking applications, afﬁnity scores can be sorted to produce an ordering.

Original:  Implementation and Empirical Evaluation
Revised:  Implementation and Empirical Evaluation

Original: Our PyTorch implementation is based on an untrained PyTorch transformer for Zest .
Revised: Our PyTorch implementation is based on an untrained Torchscript module for Zest .

Original: The Pythonzstandard library was notnot supported with TorchScript , so we implemented the Zstandardinterface in C++ as a TorchScript operator using the original C library.
Revised: The Python zstandard library was not supported with TorchScript , so we implemented the Zstandard interface in C++ as a TorchScript module using the original C library.

Original: For comparision withother linear models and public text datasets, we used the Python zstd library directly.
Revised: For comparision with other linear models and public text datasets, we used the Python zstd library directly.

Original: The Zesttransformer takes in lists of text containing the examples per class to train separate dictionaries, aswell as a list of text features for evaluation.
Revised: The Zest transformer takes in lists of text containing the examples per class to train separate dictionaries, as well as a list of text features for evaluation.

Original: It produces afﬁnity scores per class, which can be usedseparately or combined (e.g., by subtraction) into one score.
Revised: It produces afﬁnity scores per class, which can be used separately or combined (e.g., by subtraction) into one score.

Original:  Deployment in a production ML Platform.
Revised: 3.1 Deployment in a production ML Platform

Original: We onboarded Zest to a company-internal ML platform that hosts hundreds of ML models for prediction, classiﬁcation, etc.
Revised: We onboarded Zest to a company-internal ML platform that hosts hundreds of ML models for prediction, classiﬁcation, etc.

Original: Using production data,we evaluate the use of Zest text afﬁnity scores as additional features to these models, where wecan judge features by their importance values in the context of various other features.
Revised: Using production data, we evaluate the use of Zest text afﬁnity scores as additional features to these models, where we can judge features by their importance values in the context of various other features.

Original: The speciﬁcapplication discussed in this paper uses text features to rank search results in an internal tool (posts)produced for a givena search query.
Revised: The speciﬁc application discussed in this paper uses text features to rank search results in an internal tool (posts) produced for a given search query.

Original: Some model features provide context: user_id , group_id ,and post owner_id .
Revised: Some model features provide context: user_id , group_id , and post owner_id .

Original: The most useful features in the deployed ML model include the number ofcharacters, query proximity to the post text, and components of a multi-dimensional content embedding.
Revised: The most useful features in the deployed ML model include the number of characters, query proximity to the post text, and components of a multi-dimensional content embedding.

Original: In this study, we check if compression-based afﬁnity scores are comparable in their utility tolanguage-speciﬁc content embeddings, which require additional training and cannot handle text inmany languages, or mixed-language text.
Revised: In this study, we check if compression-based afﬁnity scores are comparable in their utility to language-speciﬁc content embeddings, which require additional training and cannot handle text in many languages, or mixed-language text.

Original: In contrast, Zest can be useful where content embeddingsare not easily available.
Revised: In contrast, Zest can be useful where content embeddings are not easily available.

Original: To prepare input for text afﬁnity computation, we feature-engineer the positive and negative postexamples to evaluate the post text.
Revised: To prepare input for text afﬁnity computation, we feature-engineer the positive and negative post examples to evaluate the post text.

Original: For each user on the internal tool, we fetch the 12 most recentposts from the 5 groups with which the user interacted most recently.
Revised: For each user on the internal tool, we fetch the 12 most recent posts from the 5 groups with which the user interacted most recently.

Original: We split these examplesbetween positive and negative by whether the user viewed them more than once.
Revised: We split these examples between positive and negative by whether the user viewed them more than once.

Original: As most posts endup being negative examples for a user, we added posts that are trending on the internal tool as positiveexamples.
Revised: As most posts end up being negative examples for a user, we added posts that are trending on the internal tool as positive examples.

Original: On average, a user has 39 negative examples with 851 characters each and 20 positiveexamples with 1659 characters each.
Revised: On average, a user has 39 negative examples with 851 characters each and 20 positive examples with 1659 characters each.

Original: This way, the number of characters passed into the positive andnegative compression dictionaries balances out.[Table] [Table] [Table]
Revised: This way, the number of characters passed into the positive and negative compression dictionaries balances out.

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Table]

Original: [Figure]

Original: [Table]

Original: [Figure]

Original: False examples

Original: . Empirical evaluation within a larger model
Revised: 3.2 Empirical evaluation within a larger model

Original: We ran a baseline GBDT workﬂow with no additional features, a GBDT workﬂow with Zest scoresas features, and a GBDT workﬂow with 3-gram afﬁnity scores (percentage of matched 3-grams) asfeatures.
Revised: We ran a baseline gradient-boosted decision tree (GBDT) workﬂow with no additional features, a GBDT workﬂow with Zest scores as features, and a GBDT workﬂow with 3-gram afﬁnity scores (percentage of matched 3-grams) as features.

Original: The Zest transformer took roughly 50% longer to compute afﬁnity scores in our workﬂowscompared to the n-gram transformer (both implemented by us).
Revised: The Zest transformer took roughly 50% longer to compute afﬁnity scores in our workﬂows compared to the n-gram transformer (both implemented by us).

Original: However, the Zest classiﬁer coderan much faster with the Python implementation, taking 200-300 seconds to build dictionaries on 25kexamples, whereas the transformer would take 40-50 minutes for a few thousands of examples.
Revised: However, the Zest classiﬁer code ran much faster with the Python implementation, taking 200-300 seconds to build dictionaries on 25k examples, whereas the transformer would take 40minutes for a few thousands of examples.

Original: Thiscould be to due to the memory limits placed on Pytorch transformers when running in production.
Revised: This could be to due to the memory limits placed on TorchScript modules when running in production.

Original: Feature importance of the top Zest feature was #16 (compared to #201 for the n-gram models), aheadof hundreds of content-embedding dimensions and behind of only 7 of them.
Revised: Feature importance of the top Zest feature was # (compared to #201 for the n-gram models), ahead of hundreds of content-embedding dimensions and behind of only 7 of them.

Original: We then tested removing embedding features to see how well Zest can ﬁll in the missing information.
Revised: We then tested removing embedding features to see how well Zest can ﬁll in the missing information.

Original: Based on random removal of embedding dimensions, the new features allow the model to drop 150dimensions of both the post and query embeddings, while improving normalized entropy (NE) by7% compared to the baseline model.
Revised: Based on random removal of embedding dimensions, the new features allow the model to dropdimensions of both the post and query embeddings, while improving normalized entropy (NE) by 7% compared to the baseline model.

Original: With half of the embedding features removed, the top Zestfeature was at #8 with only 4 embedding features ahead.
Revised: With half of the embedding features removed, the top Zest feature was at #8 with only 4 embedding features ahead.

Original: An important distinction between Zestand the embedding features is that the Texas SIF embeddings [4, 5] used in the use case can onlysupport English and Spanish, whereas the Zest transformer is language-agnostic and can handlemixed-language text. 
Revised: An important distinction between Zest and the embedding features is that the Texas SIF embeddings [9, 10] used in this application can only support English and Spanish, whereas the Zest transformer is language-agnostic and can handle mixed-language text. Incidentally, the Texas SIF embeddings are shown be a "Tough-to-Beat Baseline for Sentence Embeddings" [9].

Original: We also checked feature quality of the Zest transformer by removing featuresrepresenting an ID, given that the ID features had high feature importance and could be affectingmodel quality.
Revised: We also checked feature quality of the Zest transformer by removing features representing an ID, given that the ID features had high feature importance and could be affecting model quality.

Original: After removing the ID features, feature importance jumped from #16 to #9, againbeing outperformed by only 4 embedding dimensions.
Revised: After removing the ID features, feature importance jumped from #16 to #9, again being outperformed by only 4 embedding dimensions.

Original: Table 1 compares different workﬂow runs with different conﬁgurations along with the ofﬂine resultsfor comparison.
Revised: Table 1 compares different workﬂow runs with different conﬁgurations along with the ofﬂine results for comparison.

Original: There is a distinction in the score distribution between the True and False examples,with most True examples around 0.03 - 0.11, and most False examples around 0-0.07, indicating thatthe feature values can be strong enough to help with classiﬁcation on its own.
Revised: There is a distinction in the score distribution between the True and False examples, with most True examples around 0.03 - 0.11, and most False examples around 0-0.07, indicating that the feature values can be strong enough to help with classiﬁcation on its own.

Original:  Standalone comparisons versus linear models
Revised: 3.3 Standalone comparisons versus linear models

Original: As demonstrated on production data, Zest features can be useful when passed into a model alongwith other features.
Revised: As demonstrated on production data, Zest features can be useful when passed into a model along with other features.

Original: To compare Zest to other text transformers while avoiding non-text features,to perform ablation studies, and experiment with ensembling, we worked with various public textclassiﬁcation and sentiment analysis datasets.
Revised: To compare Zest to other text transformers while avoiding non-text features, [Figure] to perform ablation studies, and experiment with ensembling, we worked with various public text classiﬁcation and sentiment analysis datasets.

Original: We ran Logistic Regression (LR) trained on countvectorizers as a feature, LR trained on Facebook’s InferSent sentence embeddings [6], and themulti-class version of Zest on a dataset with various categories of news headlines [7] and varioussentiment datasets (Stanford Movie sentiment [8] and IMDB movie review sentiment [9]).
Revised: We ran Logistic Regression (LR) trained on Bag of Words (BoW) as a feature, LR trained on Facebook’s InferSent sentence embeddings [11], and the multi-class version of Zest on a dataset with various categories of news headlines [12] and various sentiment datasets (Stanford Movie sentiment [13] and IMDB movie review sentiment [14]).

Original: We ran Zest with 1, 2, and 4 telescoping dictionaries each to check performance on the news headlinesdataset.
Revised: We ran Zest with 1, 2, and 4 telescoping dictionaries each to check performance on the news headlines dataset.

Original: The Zest model with 4 telescoping dictionaries performed signiﬁcantly better than therest.
Revised: The Zest model with 4 telescoping dictionaries performed signiﬁcantly better than the rest.

Original: Word padded generally improved accuracy by 0.5-1% based on the dataset.
Revised: Word padding generally improved accuracy by 0.5-1% based on the dataset.

Original: Compared tosophisticated language models — BERT and such, — Zest has a much smaller resource footprintand is easier to work with, yet customizable.
Revised: Compared to sophisticated language models — BERT and such, — Zest has a much smaller resource footprint and is easier to work with, yet customizable [Table]

Original: The ensemble (averaged) prediction of Zest and LR with a count vectorizer performs the best on thenews headline categories dataset.
Revised: The ensemble (averaged) prediction of Zest and LogisticRegression with a BoW performs the best on the news headline categories dataset.

Original: However, count vectorizer as a feature worked well with Logistic
Revised: However, BoW as a feature worked well with Logistic

Original: Regression — it ran faster and outperformed standalone Zest by 1-5% in accuracy, depending onthe dataset.
Revised: Regression — it ran faster and outperformed standalone Zest by 1-5% in accuracy, depending on the dataset.

Original: The sentiment analysis datasets both had an accuracy of ≈ 87% with LR and CV versus≈ 78-80% for Zest, no matter how it was ensembled.
Revised: The sentiment analysis datasets both had an accuracy of ≈ 87% with LR and BoW versus ≈ 78-80% for Zest, no matter how it was ensembled.

Original: [Table] [Table]
Revised: [Table] [Table]

Original: The baseline model is a gradient-boosted decision tree (GBDTs).
Revised: The baseline model is a GBDT.

Original: Alternatively, we pass either Zest or the 3-gram counter in as additional features to the baseline model.
Revised: Alternatively, we pass either Zest or the 3-gram counter in as additional features to the baseline model.

Original: Word-level Count Vectorizers (CV) are also compared to Zest and also passed in as features, to a Logistic Regression (LR) or Naive Bayes (NB).
Revised: BoWs are also compared to Zest and also passed in as features, to a Logistic Regression (LR) or Naive Bayes (NB).

Original: Zest is ablated with 1, 2 and 4 telescoping dictionaries.
Revised: Zest is ablated with 1, 2 andtelescoping dictionaries.

Original: Additional sentiment analysis datasets (not shown) exhibit similar trends.
Revised: Additional sentiment analysis datasets (not shown) exhibit similar trends.

Revised: 3.4 Comparisons with other compression algorithms

Revised: As discussed in Section 1, Halford [5] compares various compression algorithms by speed and quality of results on a categorical newsgroups dataset.

Revised: While zstd is not included, the LZMA algorithm performs the best but takes over 30 minutes for 4,000 documents.

Revised: We extend Halford’s work by including zstd in two ways — as a regular compressor (without using its dictionary mode) and via

Revised: Zest .

Original: Conclusions and Future Work
Revised: Such comparisons can clarify if (1) other compression algorithms are competitive and (2) if our improvements help with performance and speed. Halford uses the Newsgroups dataset [16] that contains 20,000 documents from 20 newsgroups. GZip , Zlib , and BZ2 all underperform, with an average of 0.65-0.75 for both precision and recall.

Revised: The best-performing algorithm, LZMA , attains both a precision and recall of 0.897 and takes 30 minutes to complete.

Revised: zstd used as a regular compressor achieves a precision 0.857 and completes in under a minute.

Revised: Zest takes only 40 seconds to train and test the documents, with FOM 0.899.

Revised: Zest is a signiﬁcant improvement over using compression algorithms on its own, likely due to the telescoping dictionaries.

Revised:  Conclusions and Future Work

Original: We have demonstrated model-free language-agnostic text features based on data compression thatcan be useful to text rankers and classiﬁers.
Revised: We have demonstrated model-free language-agnostic text features based on data compression that can be useful to text rankers and classiﬁers.

Original: In addition to using a modern data compression tool,our implementation goes beyond the ideas in [1] by leveraging the dictionary mode in zstandard ,using telescoping dictionaries and performing word padding .
Revised: In addition to using a modern data compression tool, our implementation goes beyond the ideas in [1] by leveraging the dictionary mode in zstandard , using telescoping dictionaries and performing word padding .

Original: Empirical performance of PyTorchtransformer on a production ML platform is competitive with that of content-embedding features.
Revised: Empirical performance of TorchScript module on a production ML platform is competitive with that of content-embedding features.

Original: However, for some simpler datasets with clear distinction between text classes, count vectorizershows better ML performance, while being simple and fast.
Revised: However, for some simpler datasets with clear distinction between text classes, BoW shows better ML performance, while being simple and fast.

Original: Evidence from Section 3 allows us to conclude the following:
Revised: Evidence from Section 3 allows us to conclude the following:

Original: Compression-based methods can be signiﬁcantly improved by telescoping dictionaries and word padding.
Revised: Compression-based methods can be signiﬁcantly improved by telescoping dictionaries and word padding.

Original: Counting methods can achieve strong performance in some cases.
Revised: Counting methods can achieve strong performance in some cases.

Original: Ability to handle synonyms via embeddings offers no advantage on some practical datasets.
Revised: Ability to handle synonyms via embeddings offers no advantage on some practical datasets.

Original: Different datasets and classiﬁcation types favor different models.
Revised: Different datasets and classiﬁcation types favor different models.

Original: Zest is competitive with trained sentence embeddings in production settings.
Revised: Zest is competitive with trained sentence embeddings in production settings.

Original: Zest outperforms other counting methods such as n-grams in production datasets.
Revised: Zest outperforms other counting methods such as n-grams in production datasets.

Original: Although Zest performance is strong and can be an adequate replacement for content embeddings ina production environment, count vectorizers as features consistently performed the best on all publicdatasets that we used to evaluate Zest .
Revised: Although Zest performance is strong and can be an adequate replacement for content embeddings in a production environment, BoWs as features consistently performed the best on all public datasets that we used to evaluate Zest .

Original: Cursory analysis suggests that these datasets allow identifyingeach class by a small set of words, making explicit counting more accurate than compression-basedmethods and trained word/content embeddings.
Revised: Cursory analysis suggests that these datasets allow identifying each class by a small set of words, making explicit counting more accurate than compression-based methods and trained word/content embeddings.

Original: However, in a production environment as the onedescribed in Section 3, frequent class-speciﬁc words are less common, allowing methods like Zestto be on par with competition but with no training.
Revised: However, in a production environment as the one described in Section 3, frequent class-speciﬁc words are less common, allowing methods like Zest to be on par with competition but with no training.

Original: We also evaluated (Markov-chain) languagemodels that estimate the probability that a given text was generated by a given language [10].
Revised: We also evaluated (Markov-chain) language models that estimate the probability that a given text was generated by a given language [4, 15].

Original: In ourexperiments (not shown), they produce slightly more accurate classiﬁers than Zest , but tend to bemore complex and consume greater resources.
Revised: In our experiments (not shown), they produce slightly more accurate classiﬁers than Zest , but tend to be more complex and consume greater resources.

Revised: Compression-based methods using compression algorithms out of the box do not perform well either, with the exception of lzma .

Revised: zstd slightly underperforms in comparison with lzma , but can cut the compression time signiﬁcantly.

Revised: Zest with its telescoping dictionaries is efﬁcient and performs well in our compression-based experiments.

Original: Our ﬁndings are useful when designing ML platforms that need to deal with text features without asking product engineers to write ML code.
Revised: Our ﬁndings are useful when designing ML platforms that need to deal with text features without asking product engineers to write ML code.

Original: They suggest maintaining several lightweight,language-agnostic text features including compression-based ones, and letting the model-trainingprocess choose which features are helpful.
Revised: They suggest maintaining several lightweight, language-agnostic text features including compression-based ones, and letting the model-training process choose which features are helpful.

Original: In many applications, such low-hanging features provideperformance that is close to or better than more sophisticated word/content embeddings, while usinga much smaller resource and latency footprint.
Revised: In many applications, such low-hanging features provide performance that is close to or better than more sophisticated word/content embeddings, while using a much smaller resource and latency footprint.

Original: Unlike more sophisticated methods, lightweightmethods tend to be language agnostic and can be implemented without language detection.
Revised: Unlike more sophisticated methods, lightweight methods tend to be language agnostic and can be implemented without language detection.

Revised: It is straightforward to generalize our methods to the applications explored in [2], and we believe that many of our conclusions are going to generalize as well.

Revised: Our code and experiments are available at https://github.com/facebookresearch/zest .