CORTEXA
← Browse
arxivcs.LGstat.ML2026-07-17

ASK-NN: An Asymmetric Nearest-Neighbor Test that detects Distribution Drifts in Natural Language

Sergey Zakharov, Rodion Oblovatny, Alexey Zaytsev

Hallucinations and artificial text in LLM-generated outputs often appear as distributional deviations between prompt and response hidden-state distributions. Since prompts or retrieved contexts typically serve as reference samples and responses as query samples, with major differences in length, these asymmetries motivate the use of change test statistics that treat the two samples differently. We consider an asymmetric two-sample test ASK-NN based on the directed k-nearest-neighbor graph. Our statistic counts reference points whose nearest neighbor in the pooled sample is also a reference point. Under the permutation null, it admits an exact finite-sample conditional mean and variance; we further establish asymptotic normality and consistency under fixed alternatives. ASK-NN is computationally effective and easy to implement. Empirically, it is competitive with kernel and graph-based baselines on synthetic benchmarks, artificial-text detection, and LLM hallucination detection from token-level hidden states.

View free PDFSource page

Related papers

arxivecon.EMcs.LGmath.STstat.MEstat.ML2026-07-20

Vector Search As Nearest Neighbor Matching: RAG-based Policy Learning in Causal Inference

Masahiro Kato, Taka Kato

We propose one-step and two-step methods for policy learning with retrieval-augmented generation (RAG). We formulate RAG-based action selection under the potential outcome framework. In the two-step method, vector search retrieves action-specific neighboring evidence in an embedd…

View free PDFSource page
arxivcs.LGcs.AIcs.CRcs.CVstat.ML2026-07-23

Self-Poisoning in Adaptive Out-of-Distribution Detection: A Sharp-Threshold Theory and Certified Label-Free Calibration

Vishnu Bindu Balachandran

Test-time adaptive out-of-distribution (OOD) detectors update a memory bank from the unlabelled stream. We show this adaptation obeys a provable dynamical law. Modelling bank impurity as a generalized Pólya urn, we prove almost-sure convergence to a mean-field equilibrium whose s…

View free PDFSource page
arxivcs.LGcs.AIcs.CVcs.ITstat.ML2026-07-03

CuBAS: Information Geometric Curvature-Based Adaptive Sampling for Supervised Classification

Alexandre L. M. Levada

The informativeness of a training set is as consequential as its size, yet most sampling strategies remain agnostic to the intrinsic geometry of the data distribution. We introduce CuBAS (Curvature-Based Adaptive Sampling), an information-geometric framework for adaptive data sel…

View free PDFSource page
arxivcs.LGstat.ML2026-07-23

Zero-Flow Two-Sample Tests

Yakun Wang, Leyang Wang, Song Liu, Taiji Suzuki

We propose a new approach to two-sample testing for deciding whether two sets of samples are drawn from the same distribution. The test is built on a statistical discrepancy based on the zero-flow criterion, termed zero-flow discrepancy (ZFD). We prove the validity of ZFD and pro…

View free PDFSource page