{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T19:07:19Z","timestamp":1779131239760,"version":"3.51.4"},"reference-count":45,"publisher":"Association for Computing Machinery (ACM)","issue":"3","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2026,5,18]]},"abstract":"<jats:p>Despite decades of research, the practical adoption of Approximate Query Processing (AQP) remains limited. Sampling-based systems such as VerdictDB often yield slow or inaccurate results for complex analytical queries, as their effectiveness depends heavily on sample quality. Model-based systems such as DeepDB perform well on simple queries but incur high runtime latency for multiway joins and group-by operations, as each group is evaluated as an independent query with instantiated attribute values, preventing global optimization across groups. Both approaches are tied to fixed hardware backends, limiting flexibility across CPU and GPU platforms.<\/jats:p>\n                  <jats:p>This paper presents BayesAQP, a backend-agnostic AQP framework that compiles Bayesian Network (BN) inference into tensor algebra (TA) programs. During training, BayesAQP models per-table statistics using BNs and integrates join histograms for efficient multi-table queries. At runtime, SQL queries are compiled into TA programs in BTL++, a tensor-centric probabilistic programming language, and optimized into tensor contractions for execution on tensor processing frameworks across CPUs and GPUs. Experimental results show that BayesAQP achieves an average 37\u00d7 speed-up over existing AQP systems on three real-world datasets while maintaining comparable accuracy and significantly improving performance for complex multiway join and group-by queries.<\/jats:p>","DOI":"10.1145\/3802003","type":"journal-article","created":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T18:19:16Z","timestamp":1779128356000},"page":"1-25","source":"Crossref","is-referenced-by-count":0,"title":["A Backend-Agnostic Compiler for Approximate Query Processing with Probabilistic Tensor Algebra"],"prefix":"10.1145","volume":"4","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-3736-8808","authenticated-orcid":false,"given":"Jingwen","family":"Pan","sequence":"first","affiliation":[{"name":"The University of Edinburgh, Edinburgh, United Kingdom"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1307-9286","authenticated-orcid":false,"given":"James","family":"Cheney","sequence":"additional","affiliation":[{"name":"The University of Edinburgh, Edinburgh, United Kingdom"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9062-759X","authenticated-orcid":false,"given":"Amir","family":"Shaikhha","sequence":"additional","affiliation":[{"name":"The University of Edinburgh, Edinburgh, United Kingdom"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2026,5,18]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"Mart\u00edn Abadi et al. 2015. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. Software available from tensorflow.org."},{"key":"e_1_2_1_2_1","first-page":"1","article-title":"pgmpy: A Python Toolkit for Bayesian Networks","volume":"25","author":"Ankan Ankur","year":"2024","unstructured":"Ankur Ankan and Johannes Textor. 2024. pgmpy: A Python Toolkit for Bayesian Networks. Journal of Machine Learning Research, Vol. 25, 265 (2024), 1-8. http:\/\/jmlr.org\/papers\/v25\/23-0487.html","journal-title":"Journal of Machine Learning Research"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jval.2019.01.006"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3132700"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/2576868"},{"key":"e_1_2_1_6_1","unstructured":"William X. Cao Poorva Garg Ryan Tjoa Steven Holtzen Todd Millstein and Guy Van den Broeck. 2023. Scaling Integer Arithmetic in Probabilistic Programs. arXiv:2307.13837 [cs.AI] https:\/\/arxiv.org\/abs\/2307.13837"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.artint.2007.11.002"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1968.1054142"},{"key":"e_1_2_1_9_1","unstructured":"Philipp Eichmann Carsten Binnig Tim Kraska and Emanuel Zgraggen. 2018. IDEBench: A Benchmark for Interactive Data Exploration. showeprintarXiv:1804.02593"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.5555\/2074226.2074246"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.5555\/1296231"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.14778\/3625054.3625059"},{"key":"e_1_2_1_13_1","volume-title":"A Survey of Algorithms for Real-Time Bayesian Network Inference. (10","author":"Guo Haipeng","year":"2002","unstructured":"Haipeng Guo and William Hsu. 2002. A Survey of Algorithms for Real-Time Bayesian Network Inference. (10 2002)."},{"key":"e_1_2_1_14_1","unstructured":"Benjamin Hilprecht Andreas Schmidt Moritz Kulessa Alejandro Molina Kristian Kersting and Carsten Binnig. 2019. DeepDB: Learn from Data not from Queries. arXiv:1909.00607 [cs.DB] https:\/\/arxiv.org\/abs\/1909.00607"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/342820"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656409"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.14778\/3648160.3648181"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1109\/18.910572"},{"key":"e_1_2_1_19_1","unstructured":"Moritz Kulessa Alejandro Molina Carsten Binnig Benjamin Hilprecht and Kristian Kersting. 2018. Model-based Approximate Query Processing. arXiv:1811.06224 [cs.DB] https:\/\/arxiv.org\/abs\/1811.06224"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.14778\/2850583.2850594"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2915235"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3093754.3093763"},{"key":"e_1_2_1_23_1","unstructured":"David Lopez-Paz Philipp Hennig and Bernhard Sch\u00f6lkopf. 2013. The Randomized Dependence Coefficient. arXiv:1304.7717 [stat.ML] https:\/\/arxiv.org\/abs\/1304.7717"},{"key":"e_1_2_1_24_1","volume-title":"Accurate and Fast. In Conference on Innovative Data Systems Research.","author":"Qingzhi","unstructured":"Qingzhi Ma et al., 2021. Learned Approximate Query Processing: Make it Light, Accurate and Fast. In Conference on Innovative Data Systems Research."},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/3299869.3324958"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-10424-4_17"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3578360.3580258"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183713.3196905"},{"key":"e_1_2_1_29_1","unstructured":"Iago Par\u00eds Raquel S\u00e1nchez-Cauce and Francisco Javier D\u00edez. 2020. Sum-product networks: A survey. arXiv:2004.01167 [cs.LG] https:\/\/arxiv.org\/abs\/2004.01167"},{"key":"e_1_2_1_30_1","unstructured":"Adam Paszke et al. 2019. PyTorch: An Imperative Style High-Performance Deep Learning Library. arXiv:1912.01703 [cs.LG]"},{"key":"e_1_2_1_31_1","volume-title":"Tunnell","author":"Peters Christina","year":"2022","unstructured":"Christina Peters, Aaron Higuera, Shixiao Liang, Venkat Roy, Waheed U. Bajwa, Hagit Shatkay, and Christopher D. Tunnell. 2022. A Method for Quantifying Position Reconstruction Uncertainty in Astroparticle Physics using Bayesian Networks. arXiv:2205.10305 [astro-ph.IM]"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1016\/0004-3702(94)00092-1"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454078"},{"key":"e_1_2_1_34_1","volume-title":"Proc. ACM Manag. Data","volume":"1","author":"Maximilian","year":"2023","unstructured":"Maximilian Schleich et al., 2023. Optimizing Tensor Programs on Flexible Storage. Proc. ACM Manag. Data, Vol. 1, 1, Article 37 (may 2023), 27 pages."},{"key":"e_1_2_1_35_1","first-page":"1","article-title":"Pomegranate: fast and flexible probabilistic modeling in python","volume":"18","author":"Schreiber Jacob","year":"2017","unstructured":"Jacob Schreiber. 2017. Pomegranate: fast and flexible probabilistic modeling in python. J. Mach. Learn. Res., Vol. 18, 1 (Jan. 2017), 5992\u20135997.","journal-title":"J. Mach. Learn. Res."},{"key":"e_1_2_1_36_1","volume-title":"Proc. ACM Program. Lang.","volume":"6","author":"Amir","year":"2022","unstructured":"Amir Shaikhha et al., 2022. Functional collection programming with semi-ring dictionaries. Proc. ACM Program. Lang., Vol. 6, OOPSLA1, Article 89 (apr 2022), 33 pages."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589269"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.21105\/joss.00753"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.cageo.2011.09.011"},{"key":"e_1_2_1_40_1","unstructured":"Jan-Willem van de Meent Brooks Paige Hongseok Yang and Frank Wood. 2021. An Introduction to Probabilistic Programming. arXiv:1809.10756 [stat.ML] https:\/\/arxiv.org\/abs\/1809.10756"},{"key":"e_1_2_1_41_1","volume-title":"Model-based machine learning","author":"Winn John","unstructured":"John Winn. 2023. Model-based machine learning. CRC Press."},{"key":"e_1_2_1_42_1","unstructured":"Ziniu Wu et al. 2021. BayesCard: Revitilizing Bayesian Frameworks for Cardinality Estimation. arXiv:2012.14743 [cs.DB]"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3588721"},{"key":"e_1_2_1_44_1","volume-title":"Proc. of the Tenth Canadian Conference on Artificial Intelligence.","author":"Zhang Nevin L","year":"1994","unstructured":"Nevin L Zhang and David Poole. 1994. A simple approach to Bayesian network computations. In Proc. of the Tenth Canadian Conference on Artificial Intelligence."},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3725335"}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3802003","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T18:31:40Z","timestamp":1779129100000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3802003"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,5,18]]},"references-count":45,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2026,5,18]]}},"alternative-id":["10.1145\/3802003"],"URL":"https:\/\/doi.org\/10.1145\/3802003","relation":{},"ISSN":["2836-6573"],"issn-type":[{"value":"2836-6573","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,5,18]]}}}