利用随机投影提升流数据中去重计数的鲁棒性
MaxSketch: Robust Distinct Counting in Streams via Random Projections
- 基于随机高斯投影构建最大线性摘要,适应相似但不完全相同的元素
- 仅需约 $\widetilde{O}(\log n / \varepsilon^2)$ 内存即可实现 $(1+\varepsilon)$ 精度
- 适用于图像等高维学习表征场景,对训练外数据也有良好泛化能力
在传统数据流中,重复元素完全相同,去重计数问题已明确解决。但在现代场景下,观测值为高维且含噪声,同一对象的不同实例仅近似相似(如不同角度的人脸图像在像素层面差异显著)。经典算法如 HyperLogLog 依赖一致哈希值,对此类情况失效。已有工作在一般度量空间下实现 $\widetilde{\Theta}(\sqrt{n})$ 的内存复杂度,已是理论最优。本文证明,在学习表征中常见的几何结构下,可获得更优的内存保证。提出 MaxSketch——一种基于随机高斯投影的简单最大线性摘要。理论上证明:在该假设下,$m = \widetilde{O}(\log n / \varepsilon^2)$ 次随机投影(即 $\widetilde{O}(\log n / \varepsilon^2)$ 内存)足以将真实去重数量估计到 $(1+\varepsilon)$ 倍范围内。图像流实验表明,MaxSketch 能准确估计不同对象数量,并泛化至训练之外的场景。研究连接了经典流算法与现代表示学习,揭示几何结构可根本降低去重计数的复杂度。
原文摘要 · Abstract (English)
Estimating the number of distinct elements in a data stream is well understood when repeated elements are identical. In modern settings, however, observations are high-dimensional and noisy, so repeated instances of the same object are only approximately similar -- for example, different images of the same individual may vary significantly at the pixel level. Classical sketches such as HyperLogLog rely on consistent hash values for identical elements and break down in this regime. Recent work on robust distinct counting in general metric spaces achieves $\widetildeΘ(\sqrt{n})$ memory, which is tight in the worst case. We show that substantially improved memory guarantees are possible under geometric structure common in learned representations. We introduce MaxSketch, a simple max-linear sketch built from random Gaussian projections, and prove that it succeeds in estimating the number of distinct latent objects. Concretely, we show that under this assumption $m = \widetilde{O} (\log n / \varepsilon^2)$ random projections (and hence $\widetilde{O} (\log n/\varepsilon^2)$ memory) suffice to recover the true distinct count within a $(1+\varepsilon)$ factor. Experiments on image streams confirm that MaxSketch accurately estimates distinct counts and generalizes beyond the training regime. Our results bridge classical streaming algorithms and modern representation learning, showing how geometric structure can fundamentally reduce the complexity of distinct counting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。