LEON
A tree convolution network that calibrates a database optimizer's cost estimates for query plans.
84 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
- 856.9K
- Operations
- 84
- Framework
- PyTorch
- Recurrent
- No
- Published
- PVLDB 16(9), VLDB 2023
- Cited by
- 52 (as of 29 October 2026)
- Authors
- Xu Chen, Haitian Chen, Zibo Liang and others
- Source
- GitHub: haitianchen/LEON
- 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
- m17751
- Graph hash
- 0636061df1e9bc68cfaefbde563a9eabd044ff628e45926a3ac6254cd44983f0
- Skeleton hash
- 86c93c560b71c2e0d204a9ef52e92f09315327537b9432ae94366c372d541b93
- Architecture hash
- b6fb1ff19778431b818296c3d7028c71e4ede4afb0c02d56bfdd31fd054698bc
- Diagram SHA-256
- 0bbb35048196d81123f2e6c0ec2fae599be6aea585ddc08d33456814349fe563
- 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
LEON is a framework for ML-aided query optimization in a database system. Rather than replacing the expert query optimizer, it keeps the optimizer's rewriting rules, transformation rules and search strategy and uses machine learning only to enhance the cost model. The existing cost model gives the initial estimate, and an ML model calibrates it so that costs agree better with a user-defined goal such as latency. If the ML model fails, the system can fall back to the traditional query optimizer.
The network is that calibration model. Its logical features are a one-hot vector for properties including output cardinality and the join graph. Its physical features keep the tree structure of the plan, in which every node is a one-hot vector for the physical operators and sort order. The paper's implementation uses tree convolution networks, with the convolution and pooling operations from Neo, as the feature extractor. Each output head after the feature extractor is a multilayer perceptron. The paper states that the choice of feature extractor is not its contribution and that other network architectures can be used.
The model is trained with a pairwise ranking objective instead of regression, because what the optimizer needs is the correct order of candidate plans. The paper uses two benchmarks, JOB and TPC-H. It reports that LEON outperforms the expert DBMS consistently with 3 hours of training.
Key idea. LEON keeps the expert query optimizer and uses an ML model, trained with a pairwise ranking objective, to calibrate the cost model's estimates during plan search.
- LEON
- ML-aided query optimization
- learned query optimizer
- query optimization
- cost model calibration
- plan ranking
- tree convolution
- PostgreSQL
- database
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Chen_2023, title={LEON: A New Framework for ML-Aided Query Optimization}, volume={16}, ISSN={2150-8097}, url={http://dx.doi.org/10.14778/3598581.3598597}, DOI={10.14778/3598581.3598597}, number={9}, journal={Proceedings of the VLDB Endowment}, publisher={Association for Computing Machinery (ACM)}, author={Chen, Xu and Chen, Haitian and Liang, Zibo and Liu, Shuncheng and Wang, Jinghong and Zeng, Kai and Su, Han and Zheng, Kai}, year={2023}, month=May, pages={2261–2273} }