All models

UAE

A deep autoregressive cardinality estimator that learns a table's joint distribution from both data and queries.

Tabular and recommender · 171 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (9 KB)

Open in a new tab

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
138.8K
Operations
171
Framework
PyTorch
Recurrent
No
Published
SIGMOD 2021
Cited by
80 (as of 3 November 2026)
Authors
Peizhi Wu, Gao Cong
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21105
Graph hash
184aa98914945d13537866a0f0c34d49cddc0861d45e0fadcb463f7e2e5112b2
Skeleton hash
3c967873f0c5d45c45a4de11e1d8efcfa79ce58a881d7da47a86b5b60f917e64
Architecture hash
b14e7bc4244016a75f62eafa030828f33cb8d82743404e51fab73adefbe10aae
Diagram SHA-256
a1d5a97811317ac92576c5ebcf8d02d498f83d57210a9bf0d153f82f755ccef3
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

UAE is a cardinality estimator for database queries: a deep autoregressive model that learns the joint distribution of a table from both the data and the query workload. The paper starts from the observation that most earlier work uses only one of the two, either data as unsupervised information or the query workload as supervised information.

An autoregressive estimator answers range queries by progressive sampling, and the paper points out that this sampling is not differentiable, so such a model could not be trained from queries by backpropagation. The authors make the sampling differentiable with the Gumbel-Softmax trick and call the result differentiable progressive sampling. The losses from data and from queries are then combined with a trade-off hyper-parameter.

The network is ResMADE, a multi-layer perceptron with a masking technique. In the paper's experiments it has 2 hidden layers of 128 units. The Census dataset used there has 48K tuples and 14 columns. The repository implements UAE with MADE and ResMADE architectures. The authors also note that the version trained on data alone, UAE-D, is equivalent to Naru.

Key idea. UAE trains one deep autoregressive model on both data and query workload by making progressive sampling differentiable with the Gumbel-Softmax trick.

  • UAE
  • UAE-Q
  • cardinality estimation
  • selectivity estimation
  • deep autoregressive model
  • differentiable progressive sampling
  • DPS
  • Gumbel-Softmax
  • learned cardinality estimator
  • query workload

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wu2021unifieddeepmodellearning,
      title={A Unified Deep Model of Learning from both Data and Queries for Cardinality Estimation}, 
      author={Peizhi Wu and Gao Cong},
      year={2021},
      eprint={2107.12295},
      archivePrefix={arXiv},
      primaryClass={cs.DB},
      doi={https://doi.org/10.1145/3448016.3452830},
      url={https://arxiv.org/abs/2107.12295}, 
}