RobustMSCN
A set-based cardinality estimator for database queries, trained with query masking and join bitmap features.
Tabular and recommender · 55 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 217.3K
- Operations
- 55
- Framework
- PyTorch
- Recurrent
- No
- Published
- PVLDB 16(6), VLDB 2023
- Cited by
- 81 (as of 28 October 2026)
- Authors
- Parimarjan Negi, Ziniu Wu, Andreas Kipf and others
- Source
- GitHub: learnedsystems/CEB
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19884
- Graph hash
- 67b32ae6e6fecbca49331b22c7739f0b36cbd85d9772729b4e2a1aa340b19a34
- Skeleton hash
- bed37535b6cf7e1950dc8cbf56986e562cad447ab45c3100ddb5286a9a1803c2
- Architecture hash
- 1f3af128fd452e3a0c2f344985872e4b855f13b4b48117237b8e548c1995942a
- Diagram SHA-256
- 2096f78c9b9701315ee67529647619dbf8251de38ad20d2f01f1c9af2614a4c7
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
Robust-MSCN is a query-driven cardinality estimator, a regression model that maps database queries to their cardinalities using past workloads. The paper's concern is workload drift: such models can perform unpredictably badly if the query pattern or the data changes.
The network follows the Multi Set Convolutional Network (MSCN) design, a set-based architecture in which the tables, joins and filters of a query are considered independently. It processes the three sets of fixed-length vectors independently with a fully connected network and averages each set into a single vector. These vectors are concatenated and processed further by fully connected layers. The authors also append the data feature to each hidden layer after the sets are concatenated.
The robustness comes from modifications to the query representation and to training. Query masking randomly hides query-specific features during training, which forces the model to rely more on the data features. Join bitmaps give one bitmap per primary key, with the information from the foreign key samples included in it. The paper's Robust-MSCN uses query masking with p = 0.2 and a primary key bitmap size of 1000. The paper reports that a model trained with these techniques on a simple workload generalizes to the more complex Join Order Benchmark, with queries of up to 16 tables, and improves query runtimes by 2× over PostgreSQL.
Key idea. The paper makes a query-driven cardinality estimator robust to workload drift by masking query features during training and by adding join bitmaps to the query representation.
- robust-mscn
- robustmscn
- multi set convolutional network
- cardinality estimation
- query driven cardinality estimation
- workload drift
- query masking
- join bitmaps
- learned query optimizer
- ceb
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Negi_2023, title={Robust Query Driven Cardinality Estimation under Changing Workloads}, volume={16}, ISSN={2150-8097}, url={http://dx.doi.org/10.14778/3583140.3583164}, DOI={10.14778/3583140.3583164}, number={6}, journal={Proceedings of the VLDB Endowment}, publisher={Association for Computing Machinery (ACM)}, author={Negi, Parimarjan and Wu, Ziniu and Kipf, Andreas and Tatbul, Nesime and Marcus, Ryan and Madden, Sam and Kraska, Tim and Alizadeh, Mohammad}, year={2023}, month=Feb, pages={1520–1533} }