Lego Sketch: A Scalable Memory-augmented Neural Network for Sketching Data Streams
Yuan Feng, Yukun Cao, Hairu Wang, Xike Xie, S. Kevin Zhou
Abstract
Sketches, probabilistic structures for estimating item frequencies in infinite data streams with limited space, are widely used across various domains. Recent studies have shifted the focus from handcrafted sketches to neural sketches, leveraging memory-augmented neural networks (MANNs) to enhance the streaming compression capabilities and achieve better space-accuracy trade-offs. However, existing neural sketches struggle to scale across different data domains and space budgets due to inflexible MANN configurations. In this paper, we introduce a scalable MANN architecture that brings to life the Lego sketch, a novel sketch with superior scalability and accuracy. Much like assembling creations with modular Lego bricks, the Lego sketch dynamically coordinates multiple memory bricks to adapt to various space budgets and diverse data domains. Our theoretical analysis guarantees its high scalability and provides the first error bound for neural sketch. Furthermore, extensive experimental evaluations demonstrate that the Lego sketch exhibits superior space-accuracy trade-offs, outperforming existing handcrafted and neural sketches. Our code is available at https://github.com/FFY0/LegoSketch ICML .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ec19e26e-33df-4d37-a989-bb0e513a2521Cited by top-tier papers2
- RatioSketch: Towards More Accurate Frequency Estimation in Data Streams via a Lightweight Neural NetworkMengbo Wang, Zhuochen Fan, Dayu Wang, Guorui Xie et al.AAAI 2026 · 1 citation
- Discovering Data Structures: Nearest Neighbor Search and BeyondOmar Salemohamed, Laurent Charlin, Shivam Garg, Vatsal Sharan et al.NeurIPS 2025
Builds on10
- Memory-Efficient and Flexible Detection of Heavy Hitters in High-Speed NetworksHe Huang, Jiakun Yu, Yang Du, Jia Liu et al.SIGMOD 2024 · 33 citations
- Experimental Analysis of Large-scale Learnable Vector Storage CompressionHailin Zhang, Penghao Zhao, Xupeng Miao, Yingxia Shao et al.VLDB 2024 · 20 citations
- Panakos: Chasing the Tails for Multidimensional Data StreamsFuheng Zhao, Punnal Ismail Khan, Divyakant Agrawal, Amr El Abbadi et al.VLDB 2023 · 18 citations
- Improved Frequency Estimation Algorithms with and without PredictionsAnders Aamand, Justin Y. Chen, Huy Lê Nguyen, Sandeep Silwal et al.NeurIPS 2023 · 16 citations
- Meta-Sketch: A Neural Data Structure for Estimating Item Frequencies of Data StreamsYukun Cao, Yuan Feng, Xike XieAAAI 2023 · 13 citations
Related papers
- The Stair Sketch: Bringing more Clarity to Memorize Recent EventsYikai Zhao, Yubo Zhang, Pu Yi, Tong Yang et al.ICDE 2022 · 13 citations
- Sublime: Sublinear Error & Space for Unbounded Skewed StreamsNavid Eslami, Ioana O. Bercea, Rasmus Pagh, Niv DayanSIGMOD 2026
- XY-Sketch: on Sketching Data Streams at Web ScaleYongqiang Liu, Xike XieWWW 2021 · 12 citations
- Spatiotemporal Sketch Disaggregation: Streaming Analytics with Heterogeneous ResourcesJonatan Langlet, Peiqing Chen, Michael Mitzenmacher, Zaoxing Liu et al.ICDE 2026
- OmniSketch: Efficient Multi-Dimensional High-Velocity Stream Analytics with Arbitrary PredicatesWieger R. Punter, Odysseas Papapetrou, Minos N. GarofalakisVLDB 2024 · 10 citations
