ACM Home Page
Please provide us with feedback. Feedback
Optimal sampling from sliding windows
Full text PdfPdf (485 KB)
Source
Symposium on Principles of Database Systems archive
Proceedings of the twenty-eighth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems table of contents
Providence, Rhode Island, USA
SESSION: Stream processing table of contents
Pages 147-156  
Year of Publication: 2009
ISBN:978-1-60558-553-6
Authors
Vladimir Braverman  UCLA, Los Angeles, CA, USA
Rafail Ostrovsky  UCLA, Los Angeles, CA, USA
Carlo Zaniolo  UCLA, Los Angeles, CA, USA
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGMOD: ACM Special Interest Group on Management of Data
SIGART: ACM Special Interest Group on Artificial Intelligence
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 21,   Downloads (12 Months): 72,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1559795.1559818
What is a DOI?

ABSTRACT

A sliding windows model is an important case of the streaming model, where only the most "recent" elements remain active and the rest are discarded in a stream. The sliding windows model is important for many applications (see, e.g., Babcock, Babu, Datar, Motwani and Widom (PODS 02); and Datar, Gionis, Indyk and Motwani (SODA 02)). There are two equally important types of the sliding windows model -- windows with fixed size, (e.g., where items arrive one at a time, and only the most recent n items remain active for some fixed parameter n), and bursty windows (e.g., where many items can arrive in "bursts" at a single step and where only items from the last t steps remain active, again for some fixed parameter t).

Random sampling is a fundamental tool for data streams, as numerous algorithms operate on the sampled data instead of on the entire stream. Effective sampling from sliding windows is a nontrivial problem, as elements eventually expire. In fact, the deletions are implicit; i.e., it is not possible to identify deleted elements without storing the entire window. The implicit nature of deletions on sliding windows does not allow the existing methods (even those that support explicit deletions, e.g., Cormode, Muthukrishnan and Rozenbaum (VLDB 05); Frahling, Indyk and Sohler (SOCG 05)) to be directly "translated" to the sliding windows model. One trivial approach to overcoming the problem of implicit deletions is that of over-sampling. When k samples are required, the over-sampling method maintains k'>k samples in the hope that at least k samples are not expired. The obvious disadvantages of this method are twofold:

(a) It introduces additional costs and thus decreases the performance; and

(b) The memory bounds are not deterministic, which is atypical for streaming algorithms (where even small probability events may eventually happen for a stream that is big enough).

Babcock, Datar and Motwani (SODA 02), were the first to stress the importance of improvements to over-sampling. They formally introduced the problem of sampling from sliding windows and improved the over-sampling method for sampling with replacement. Their elegant solutions for sampling with replacement are optimal in expectation, and thus resolve disadvantage (a) mentioned above. Unfortunately, the randomized bounds do not resolve disadvantage (b) above. Interestingly, all algorithms that employ the ideas of Babcock, Datar and Motwani have the same central problem of having to deal with randomized complexity (see e.g., Datar and Muthukrishnan (ESA 02); Chakrabarti, Cormode and McGregor (SODA 07)). Further, the proposed solutions of Babcock, Datar and Motwani for sampling without replacement are based on the criticized over-sampling method and thus do not solve problem (a). Therefore, the question of whether we can solve sampling on sliding windows optimally (i.e., resolving both disadvantages) is implicit in the paper of Babcock, Datar and Motwani and has remained open for all variants of the problem.

In this paper we answer these questions affirmatively and provide optimal sampling schemas for all variants of the problem, i.e., sampling with or without replacement from fixed or bursty windows. Specifically, for fixed-size windows, we provide optimal solutions that require O(k) memory; for bursty windows, we show algorithms that require O(klogn), which is optimal since it matches the lower bound by Gemulla and Lehner (SIGMOD 08). In contrast to the work of of Babcock, Datar and Motwani, our solutions have deterministic bounds. Thus, we prove a perhaps somewhat surprising fact: the memory complexity of the sampling-based algorithm for all variants of the sliding windows model is comparable with that of streaming models (i.e., without the sliding windows). This is the first result of this type, since all previous "translations" of sampling-based algorithms to sliding windows incur randomized memory guarantees only.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
3
4
 
5
A. Arasu, B. Babcock, S. Babu, J. Cieslewicz, M. Datar, K. Ito, R. Motwani, U. Srivastava, J. Widom, "STREAM: The Stanford Data Stream Management System," Book Chapter, "Data-Stream Management: Processing High-Speed Data Streams", Springer-Verlag, 2005.
6
7
8
 
9
 
10
 
11
12
13
 
14
 
15
 
16
17
18
 
19
20
 
21
 
22
A. Chakrabarti, K. Do Ba, S. Muthukrishnan, "Estimating Entropy and Entropy Norm on Data Streams", In Proceedings of the 23rd International Symposium on Theoretical Aspects of Computer Science, 2006.
 
23
A. Chakrabarti, S. Khot, X. Sun, "Near-optimal lower bounds on the multi-party communication complexity of set-disjointness", Proceedings of the 18th Annual IEEE Conference on Computational Complexity, 2003.
24
 
25
 
26
K. Chaudhuri, N. Mishra, "When Random Sampling Preserves Privacy", CRYPTO, 2006.
27
 
28
 
29
30
 
31
 
32
 
33
 
34
 
35
 
36
 
37
38
 
39
J. Feigenbaum, S. Kannan, and J. Zhang, "Computing diameter in the streaming and sliding-window models", Algorithmica, 41:25--41, 2005.
 
40
 
41
 
42
J. Feigenbaum, S. Kannan, M. Strauss, M. Viswanathan, "Testing and Spot-Checking of Data Streams", Algorithmica, 34(1): 67--80, 2002.
43
 
44
S. Ganguly. "Estimating Frequency Moments of Update Streams using Random Linear Combinations". Proceedings of the 8th International Workshop on Randomized Algorithms, pp. 369--380, 2004.
 
45
46
 
47
R. Gemulla, "Sampling Algorithms for Evolving Datasets", PhD Dissertation.
48
49
50
51
 
52
53
 
54
 
55
P.J. Haas, "Data stream sampling: Basic techniques and results", In M. Garofalakis, J. Gehrke, and R. Rastogi (Eds.), Data Stream Management: Processing High Speed Data Streams, Springer.
 
56
57
 
58
H. Jowhari, M. Ghodsi, "New streaming algorithms for counting triangles in graphs", Proceedings of the 11th COCOON, pp. 710--716, 2005.
59
60
61
62
63
64
 
65
 
66
67
 
68
 
69
C. Procopiuc, O. Procopiuc, "Density Estimation for Spatial Data Streams", Proceedings of the 9th International Symposium on Spatial and Temporal Databases, pp.109--126, 2005.
70
 
71
72
 
73
L. Zhang, Z. Li, M. Yu, Y. Wang, Y. Jiang, "Random sampling algorithms for sliding windows over data streams", Proc. of the 11th Joint International Computer Conference, pp. 572--575, 2005.
74

Collaborative Colleagues:
Vladimir Braverman: colleagues
Rafail Ostrovsky: colleagues
Carlo Zaniolo: colleagues