On Sketching Trimmed Statistics
Abstract
We present space-efficient linear sketches for estimating trimmed statistics of an -dimensional frequency vector , e.g., the sum of -th powers of the largest frequencies (i.e., entries) in absolute value, or the -trimmed vector, which excludes the top and bottom frequencies. This is called the moment of the trimmed vector. Trimmed measures are used in robust estimation, as seen in the R programming language's `trim.var' function and the `trim' parameter in the mean function. Linear sketches improve time and memory efficiency and are applicable to streaming and distributed settings. We initiate the study of sketching these statistics and give a new condition for capturing their space complexity. When , we give a linear sketch using space which provides a approximation to the top- moment for . For general , we give a sketch with the same guarantees under a condition relating the -th largest frequency to the tail mass, and show this condition is necessary. For the -trimmed version, our sketch achieves optimal error guarantees under the same condition. We extend our methods to and also address related problems such as computing the moment of frequencies above a threshold, finding the largest such that the moment of the top exceeds , and the moment of the top frequencies such that each entry is at least . Notably, our algorithm for this third application improves upon the space bounds of the algorithm of Govindan, Monemizadeh, and Muthukrishnan (PODS '17) for computing the -index. We show empirically that our top algorithm uses much less space compared to Count-Sketch while achieving the same error.
Cite
@article{arxiv.2506.07342,
title = {On Sketching Trimmed Statistics},
author = {Honghao Lin and Hoai-An Nguyen and David P. Woodruff},
journal= {arXiv preprint arXiv:2506.07342},
year = {2025}
}