A Two-Sample Test of Text Generation Similarity
Not on the map. Why?
Abstract (arXiv)
The surge in digitized text data requires reliable inferential methods on observed textual patterns. This article proposes a novel two-sample text test for comparing similarity between two groups of documents. The hypothesis is whether the probabilistic mapping generating the textual data is identical across two groups of documents. The proposed test aims to assess text similarity by comparing the entropy of the documents. Entropy is estimated using neural network-based language models. The test statistic is derived from an estimation-and-inference framework, where the entropy is first approximated using an estimation set, followed by inference on the remaining data set. We showed theoretically that under mild conditions, the test statistic asymptotically follows a normal distribution. A multiple data-splitting strategy is proposed to enhance test power, which combines p-values into a unified decision. Various simulation studies and a real data example demonstrated that the proposed two-sample text test maintains the nominal Type one error rate while offering greater power compared to existing methods. The proposed method provides a novel solution to assert differences in document classes, particularly in fields where large-scale textual information is crucial.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 17 of its 47 references that are in the map. First posted on arXiv 8 May 2025.
Builds on
17 of 47 references.
References · 17
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,474
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
- 2021MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontierscited by 470
- 2016Interpretable Distribution Features with Maximum Testing Powercited by 63
- 2016Classification accuracy as a proxy for two sample testingcited by 42
- 2018Utilizing Neural Networks and Linguistic Metadata for Early Detection of Depression Indications in Text Sequencescited by 36
- 2020Revisiting LSTM Networks for Semi-Supervised Text Classification via Mixed Objective Functioncited by 23
- 2019On the Optimality of Gaussian Kernel Based Nonparametric Tests against Smooth Alternativescited by 21
- 2021Convergence rates of deep ReLU networks for multiclass classificationcited by 21
- 2018Cauchy combination test: a powerful test with analytic p-value calculation under arbitrary dependency structurescited by 20
- 2021Significance tests of feature relevance for a black-box learnercited by 15
5 more
- 2021Inferential Wasserstein Generative Adversarial Networkscited by 6
- 2021Multiple-Splitting Projection Test for High-Dimensional Mean Vectorscited by 5
- 2021Kernel Two-Sample Tests in High Dimension: Interplay Between Moment Discrepancy and Dimension-and-Sample Orderscited by 5
- 2020Learning Inter-Modal Correspondence and Phenotypes from Multi-Modal Electronic Health Recordscited by 4
- 2019Asymptotic Distributions of High-Dimensional Distance Correlation Inferencecited by 3
Built on by
Not cited yet.