Demo Data from SIGIR 2026 / reviewers in the wild / expert
Amir Shaikhha
dblp:143/6186
· DBLP profile ↗
40ranked-venue papers
19as first author
24since 2021 · last 2026
0000-0002-9062-759XORCID · corroborated
Domains — the database's venue-derived domains; a paper can count in several
Software engineering, systems software and programming languages · 27 · 13 first-author · 17 since 2021Databases, data management, data science and information retrieval · 13 · 6 first-author · 7 since 2021Systems, architecture and hardware · 4 · 3 first-author · 3 since 2021
Expertise — from the expertise taxonomy: the topics of the expert's papers under the CCF categories. A weight counts papers with recency: 1 for a paper about the topic, 0.3 when the topic is its context, halved every five years.
| Databases, data mining, and information retrieval
12 papers |
Query processing and optimization · 56% Data models and query languages · 19% Machine learning and data management · 6% | |
| Software engineering, system software, and programming languages
7 papers |
Compilers and program optimization · 62% Programming languages and type systems · 38% | |
| Computer architecture, parallel and distributed computing, and storage systems
2 papers |
High-performance computing · 100% |
Topics — the 29 heaviest of 36, each with the papers that count most for it
| Topic | Weight | Papers | Last | Evidence papers |
|---|---|---|---|---|
Compilers and program optimization
code generation |
1.5 | 2 | 2025 | Compressed and Parallelized Structured Tensor Algebra · Proc. ACM Program. Lang. 2025 Compiling Structured Tensor Algebra · Proc. ACM Program. Lang. 2023 |
Compilers and program optimization › domain-specific compilation
tensor algebra compilation |
1.5 | 2 | 2025 | Compressed and Parallelized Structured Tensor Algebra · Proc. ACM Program. Lang. 2025 Compiling Structured Tensor Algebra · Proc. ACM Program. Lang. 2023 |
Query processing and optimization
query compilation |
1.3 | 2 | 2024 | PyTond: Efficient Python Data Science on the Shoulders of Databases · ICDE 2024 An Intermediate Representation for Hybrid Database and Machine Learning Workloads · Proc. VLDB Endow. 2021 |
Compilers and program optimization
e-graph |
0.9 | 1 | 2025 | Slotted E-Graphs: First-Class Support for (Bound) Variables in E-Graphs · Proc. ACM Program. Lang. 2025 |
Programming languages and type systems › term rewriting
equality saturation |
0.9 | 1 | 2025 | Slotted E-Graphs: First-Class Support for (Bound) Variables in E-Graphs · Proc. ACM Program. Lang. 2025 |
Data models and query languages
datalog |
0.8 | 1 | 2024 | Optimizing Nested Recursive Queries · Proc. ACM Manag. Data 2024 |
Query processing and optimization › recursive query
recursive query optimization |
0.8 | 1 | 2024 | Optimizing Nested Recursive Queries · Proc. ACM Manag. Data 2024 |
Query processing and optimization › query optimization
cost-based optimization |
0.7 | 1 | 2023 | Optimizing Tensor Programs on Flexible Storage · Proc. ACM Manag. Data 2023 |
Machine learning and data management
in-database machine learning |
0.7 | 1 | 2023 | Demonstration of OpenDBML, a Framework for Democratizing In-Database Machine Learning · Proc. VLDB Endow. 2023 |
Data models and query languages
relational data |
0.7 | 1 | 2023 | Demonstration of OpenDBML, a Framework for Democratizing In-Database Machine Learning · Proc. VLDB Endow. 2023 |
Indexing and storage engines › storage management
storage layout optimization |
0.7 | 1 | 2023 | Optimizing Tensor Programs on Flexible Storage · Proc. ACM Manag. Data 2023 |
Query processing and optimization › view maintenance
incremental view maintenance |
0.6 | 2 | 2020 | Synthesis of Incremental Linear Algebra Programs · ACM Trans. Database Syst. 2020 DBToaster: higher-order delta processing for dynamic, frequently fresh views · VLDB J. 2014 |
Query processing and optimization › aggregate query processing
functional aggregate queries |
0.5 | 1 | 2021 | An Intermediate Representation for Hybrid Database and Machine Learning Workloads · Proc. VLDB Endow. 2021 |
Query processing and optimization
intermediate representation |
0.5 | 1 | 2021 | An Intermediate Representation for Hybrid Database and Machine Learning Workloads · Proc. VLDB Endow. 2021 |
High-performance computing
scientific computing systems |
0.5 | 2 | 2025 | Compressed and Parallelized Structured Tensor Algebra · Proc. ACM Program. Lang. 2025 Compiling Structured Tensor Algebra · Proc. ACM Program. Lang. 2023 |
High-performance computing › tensor computation
tensor algebra |
0.5 | 2 | 2025 | Compressed and Parallelized Structured Tensor Algebra · Proc. ACM Program. Lang. 2025 Compiling Structured Tensor Algebra · Proc. ACM Program. Lang. 2023 |
Query processing and optimization
incremental computation |
0.4 | 1 | 2020 | Synthesis of Incremental Linear Algebra Programs · ACM Trans. Database Syst. 2020 |
Query processing and optimization › SQL query processing
nested query processing |
0.4 | 1 | 2020 | Scalable Querying of Nested Data · Proc. VLDB Endow. 2020 |
Query processing and optimization
analytical query processing |
0.3 | 1 | 2018 | Building Efficient Query Engines in a High-Level Language · ACM Trans. Database Syst. 2018 |
Programming languages and type systems
metaprogramming |
0.3 | 1 | 2018 | Unifying analytic and statically-typed quasiquotes · Proc. ACM Program. Lang. 2018 |
Transaction processing and concurrency control › concurrency control
multiversion concurrency control |
0.3 | 1 | 2017 | Transaction Repair for Multi-Version Concurrency Control · SIGMOD Conference 2017 |
Transaction processing and concurrency control › recovery
transaction repair |
0.3 | 1 | 2017 | Transaction Repair for Multi-Version Concurrency Control · SIGMOD Conference 2017 |
Automated reasoning and model checking
theorem proving |
0.3 | 1 | 2025 | Slotted E-Graphs: First-Class Support for (Bound) Variables in E-Graphs · Proc. ACM Program. Lang. 2025 |
Query processing and optimization › query compilation
query compiler |
0.2 | 1 | 2016 | How to Architect a Query Compiler · SIGMOD Conference 2016 |
Programming languages and type systems
domain-specific languages |
0.2 | 1 | 2016 | How to Architect a Query Compiler · SIGMOD Conference 2016 |
Query processing and optimization › incremental computation
delta processing |
0.2 | 1 | 2014 | DBToaster: higher-order delta processing for dynamic, frequently fresh views · VLDB J. 2014 |
Distributed and cloud data management
distributed query processing |
0.1 | 1 | 2020 | Scalable Querying of Nested Data · Proc. VLDB Endow. 2020 |
Compilers and program optimization › domain-specific compilation
query compilation |
0.1 | 1 | 2018 | Building Efficient Query Engines in a High-Level Language · ACM Trans. Database Syst. 2018 |
Transaction processing and concurrency control › concurrency control
optimistic concurrency control |
0.1 | 1 | 2017 | Transaction Repair for Multi-Version Concurrency Control · SIGMOD Conference 2017 |
Methods — techniques the papers use, named apart from their topics
polyhedral analysis · 1.7equality saturation · 1.7e-graph rewriting · 1.7affine code generation · 1.7MLIR · 1.7symbolic computation · 1.3intermediate language · 1.3semiring algebra · 1.1relational algebra · 1.1linear algebra · 1.1intermediate representation optimization · 0.8intermediate representation · 0.8fixpoint semantics · 0.8SQL code generation · 0.8python interface · 0.7declarative storage mapping · 0.7cost-based optimizer · 0.7
| Year | Publication | Venue | Position |
|---|---|---|---|
| 2026 | Optimizing Sparse Tensor Compilation for Sparse OutputabstractSparse tensor algebra plays an important role in many scientific and engineering applications, yet existing sparse libraries and compilers face challenges when the output tensor is sparse. Array-based storage formats, such as CSR, require costly memory reallocations and rely on intermediate tensors (workspaces) to handle sparse scattering into the output, which limits performance and scalability. We introduce a new approach that employs our proposed flexible map-based storage format to directly support sparse scattering into the output without requiring extra workspaces. Our system then applies code and storage-specific optimizations to maximize efficiency. Experimental results across a range of kernels and datasets demonstrate an average speedup of 8.06× over a state-of-the-art compiler and 5.28× over a sparse tensor library. Shideh Hashemian, Michael F. P. O'Boyle, Amir Shaikhha |
CC | 3 |
| 2026 | Raqlet: Cross-Paradigm Compilation for Recursive Queries
Amir Shaikhha, Youning Xia, Meisam Tarabkhah, Jazal Saleem, Anna Herlihy |
CIDR | 1 |
| 2026 | Language-Integrated Recursive QueriesabstractPerformance-critical applications, including large-scale program analyses, graph analyses, and distributed system analyses, rely on fixed-point computations. The introduction of recursion using the WITH RECURSIVE keyword in SQL:1999 extended the ability of relational database systems to handle fixed-point computations, unlocking significant performance advantages by allowing computation to move closer to the data. Yet, with recursion, SQL becomes a Turing-complete programming language with new correctness and safety risks. Full SQL lacks a fixed semantics, as the SQL specification is written in natural language with ambiguities that database vendors resolve in divergent ways. As a result, reasoning about the correctness of recursive SQL programs must rely on isolated, composable properties of queries rather than wrestling a unified formal model out of a language with notoriously inconsistent implementations across systems. To address these challenges, we propose a calculus, λ_RQL, that derives properties from embedded recursive queries using the host-language type system and, depending on the database backend, rejects queries that may lead to the three classes of recursive query errors: runtime database exceptions, incorrect results, and nontermination. Queries that respect all properties are guaranteed to find the minimal fixed point in a finite number of steps. We introduce TyQL, a practical implementation in Scala for safe, recursive language-integrated query. TyQL uses modern type system features of Scala 3, namely Named-Tuples and type-level pattern matching, to ensure query portability and safety. TyQL shows no performance penalty compared to SQL queries expressed as embedded strings while enabling a three-order-of-magnitude speedup over non-recursive SQL. Anna Herlihy, Amir Shaikhha, Anastasia Ailamaki, Martin Odersky |
ECOOP | 2 |
| 2026 | Modular Substructural Constraints for Embedded DSLsabstractSubstructural type systems provide static guarantees about resource usage in programs. In most practical systems, however, the available usage constraints and their composition are predetermined by the language design, with only limited support for application programmers to customize them. We present a technique for expressing modular substructural constraints on function arrows in embedded domain-specific languages, enabling resource disciplines to be customized to the heterogeneous requirements of real-world domains. We formalize the design as an extension of the simply-typed lambda calculus and provide a Scala 3 implementation that uses type-level programming to enforce constraints at compile-time without host-compiler modifications. We illustrate the approach on a Linear Datalog case study, showing no performance overhead on practical programs. Anna Herlihy, Amir Shaikhha, Anastasia Ailamaki, Martin Odersky |
GPCE | 2 |
| 2026 | [Experiment, Analysis, and Benchmark] Systematic Evaluation of Plan-Based Adaptive Query ProcessingabstractUnreliable cardinality estimation remains a critical performance bottleneck in database management systems (DBMSs). Adaptive Query Processing (AQP) strategies address this limitation by providing a more robust query execution mechanism. Specifically, plan-based AQP achieves this by incrementally refining cardinality using feedback from the execution of sub-plans. However, the actual reason behind the improvements of plan-based AQP, especially across different storage architectures (on-disk vs. in-memory DBMSs), remains unexplored. This paper presents the first comprehensive analysis of state-of-the-art plan-based AQP. We implement and evaluate this strategy on both on-disk and in-memory DBMSs across two benchmarks. Our key findings reveal that while plan-based AQP provides overall speedups in both environments, the sources of improvement differ significantly. In the on-disk DBMS, PostgreSQL, performance gains primarily come from the query plan reorderings, but not the cardinality updating mechanism; in fact, updating cardinalities introduces measurable overhead. Conversely, in the in-memory DBMS, DuckDB, cardinality refinement drives significant performance improvements for most queries. We also observe significant performance benefits of the plan-based AQP compared to a state-of-the-art related-based AQP method. These observations provide crucial insights for researchers on when and why plan-based AQP is effective, and ultimately guide database system developers on the tradeoffs between the implementation effort and performance improvements. Pei Mu 0003, Anderson Chaves Carniel, Antonio Barbalace, Amir Shaikhha |
ICDE | 4 |
| 2025 | Synthesis of Quantum Simulators by CompilationabstractQuantum simulation plays a critical role in advancing our understanding and development of quantum algorithms, quantum computing hardware, and quantum information science. Despite the availability of various quantum circuit simulators, they often face challenges in terms of maintainability and extensibility. In this paper, we introduce Lightweight Functional Quantum Simulator (LFQS), a compilation-based framework that addresses these issues by leveraging an intermediate language to synthesize efficient quantum simulators in C and CUDA. The intermediate language exploits the underlying structured sparsity behind the matrix representation of quantum gates. Our framework generates efficient code for multi-core CPUs and GPUs and outperforms state-of-the-art simulators, such as Qiskit, Catalyst, and QuEST, as well as a representative of dense tensor frameworks, NumPy, in both micro-benchmark and macro-benchmark circuits. Meisam Tarabkhah, Mahshid Delavar, Mina Doosti, Amir Shaikhha |
CGO | 4 |
| 2025 | Compressed and Parallelized Structured Tensor AlgebraabstractTensor algebra is a crucial component for data-intensive workloads such as machine learning and scientific computing. As the complexity of data grows, scientists often encounter a dilemma between the highly specialized dense tensor algebra and efficient structure-aware algorithms provided by sparse tensor algebra. In this paper, we introduce DASTAC, a framework to propagate the tensors’s captured high-level structure down to low-level code generation by incorporating techniques such as automatic data layout compression, polyhedral analysis, and affine code generation. Our methodology reduces memory footprint by automatically detecting the best data layout, heavily benefits from polyhedral optimizations, leverages further optimizations, and enables parallelization through MLIR. Through extensive experimentation, we show that DASTAC can compete if not significantly outperform specialized hand-tuned implementation by experts. We observe 0.16x 44.83x and 1.37x - 243.78x speed-up for single- and multi-threaded cases, respectively. Mahdi Ghorbani, Emilien Bauer, Tobias Grosser, Amir Shaikhha |
Proc. ACM Program. Lang. | 4 |
| 2025 | Slotted E-Graphs: First-Class Support for (Bound) Variables in E-GraphsabstractEquality saturation has gained significant interest as a powerful optimization and reasoning technique. At its heart is the e-graph data structure, that space-efficiently represents equal sub-terms uniquely. An important open problem in this context is extending this efficient representation to languages featuring (bound) variables. Independent of how we represent variables in e-graphs, either as names or nameless (using de Bruijn indices), sharing is broken as sub-terms that differ only in the names of their variables are represented separately. This results in aggressive e-graph growth, bad performance, as well as reduced expressiveness. In this paper, we present a novel approach to representing bound variables in e-graphs by making them a first-class built-in feature of the data structure. Our slotted e-graph represents terms that differ only by (bound or free) variable names uniquely. To do so, e-classes that represent equivalent terms via e-nodes are parameterized by slots , abstracting over free variables of the represented terms. Referring to an e-class from an e-node now requires relating the variables from its context to the slots of the e-class. Our evaluation of slotted e-graph uses two case studies from compiler optimization and theorem proving to show that performing equality saturation for languages with bound variables is greatly simplified and that we can solve practically relevant problems that cannot be solved with e-graphs using de Bruijn indices. Rudi Schneider, Marcus Rossel, Amir Shaikhha, Andres Goens, Thomas Koehler 0005, Michel Steuwer |
Proc. ACM Program. Lang. | 3 |
| 2024 | A Tensor Algebra Compiler for Sparse DifferentiationabstractSparse tensors are prevalent in many data-intensive applications. However, existing automatic differentiation (AD) frameworks are tailored towards dense tensors, which makes it a challenge to efficiently compute gradients through sparse tensor operations. This is due to irregular sparsity patterns that can result in substantial memory and computational overheads. We propose a novel framework that enables the efficient AD of sparse tensors. The key aspects of our work include a compilation pipeline leveraging two intermediate DSLs with AD-agnostic domain-specific optimizations followed by efficient C++ code generation. We showcase the effectiveness of our framework in terms of performance and scalability through extensive experimentation, outperforming state-of-the-art alternatives across a variety of synthetic and real-world datasets. Amir Shaikhha, Mathieu Huot, Shideh Hashemian |
CGO | 1 |
| 2024 | Restaging Domain-Specific Languages: A Flexible Design Pattern for Rapid Development of Optimizing CompilersabstractThis paper addresses the complexity of developing optimizing compilers by proposing a novel design pattern named Restage. The Restage interface reduces boilerplate code in transformation passes by simplifying the extraction and reconstruction of language constructs, thereby enabling more efficient and maintainable compiler development. This approach automatically generates the necessary interface instances using metaprogramming, minimizing manual effort. Additionally, the proposed solution integrates seamlessly with existing methodologies for building optimizing compilers, including strategy-based transformations and the visitor design pattern. The Restage design pattern significantly reduces the complexity and maintenance cost of compilers for generic-purpose and domain-specific languages. Amir Shaikhha |
GPCE | 1 |
| 2024 | PyTond: Efficient Python Data Science on the Shoulders of DatabasesabstractPython data science libraries such as Pandas and NumPy have recently gained immense popularity. Although these libraries are feature-rich and easy to use, their scalability limitations require more robust computational resources. In this paper, we present PyTond, an efficient approach to push the processing of data science workloads down into the database engines that are already known for their big data handling capabilities. Compared to the previous work, by introducing TondIR, our approach can capture a more comprehensive set of workloads and data layouts. Moreover, by doing IR-level optimizations, we generate better SQL code that improves the query processing by the underlying database engine. Our evaluation results show promising performance improvement compared to Python and other alternatives for diverse data science workloads. Hesam Shahrokhi, Amirali Kaboli, Mahdi Ghorbani, Amir Shaikhha |
ICDE | 4 |
| 2024 | Optimizing Nested Recursive QueriesabstractDatalog is a declarative programming language that has gained popularity in various domains due to its simplicity, expressiveness, and efficiency. But "pure" Datalog is limited to monotone queries, and cannot be used in most practical applications. For that reason, newer systems are relaxing the language by allowing non-monotone queries to be freely combined with recursion. But by departing from the elegant fixpoint semantics of pure datalog, these systems often result in inefficient query execution, for example they perform redundant computations, or use redundant storage. In this paper, we propose Temporel, a system that allows recursion to be freely combined with non-monotone operators. Temporel optimizes the program by compiling it into a novel intermediate representation that we call TempoDL. Our experimental results show that our system outperforms a state-of-the-art Datalog engine as well as a vectorized and a compiled in-memory database system for a wide range of applications from machine learning to graph processing. Amir Shaikhha, Dan Suciu, Maximilian Schleich, Hung Q. Ngo 0001 |
Proc. ACM Manag. Data | 1 |
| 2023 | Compiling Discrete Probabilistic Programs for Vectorized Exact InferenceabstractProbabilistic programming languages (PPLs) are essential for reasoning under uncertainty. Even though many real-world probabilistic programs involve discrete distributions, the state-of-the-art PPLs are suboptimal for a large class of tasks dealing with such distributions. In this paper, we propose BayesTensor, a tensor-based probabilistic programming framework. By generating tensor algebra code from probabilistic programs, BayesTensor takes advantage of the highly-tuned vectorized implementations of tensor processing frameworks. Our experiments show that BayesTensor outperforms the state-of-the-art frameworks in a variety of discrete probabilistic programs, inference over Bayesian Networks, and real-world probabilistic programs employed in data processing systems. Jingwen Pan, Amir Shaikhha |
CC | 2 |
| 2023 | Building a Compiled Query Engine in PythonabstractThe simplicity of Python and its rich set of libraries has made it the most popular language for data science. Moreover, the interpreted nature of Python offers an easy debugging experience for the developers. However, it comes with the price of poor performance compared to the compiled code. In this paper, we adopt and extend state-of-the-art research in query compilers to propose an efficient query engine embedded in Python. Our open-sourced framework enables the developers to do the debugging in Python, while being able to easily build a compiled version of the code for deployment. Our benchmark results on the entire set of TPC-H queries show that our approach covers different types of relational workloads and is competitive with state-of-the-art in-memory engines in both single- and multi-threaded settings. Hesam Shahrokhi, Amir Shaikhha |
CC | 2 |
| 2023 | Fine-Tuning Data Structures for Query ProcessingabstractWe introduce a framework for automatically choosing data structures for efficient query processing. Our contributions are twofold. First, we introduce a novel low-level intermediate language that can express the algorithms behind various query processing paradigms such as classical joins, groupjoin, and in-database machine learning engines. This language is designed around the notion of dictionaries and allows for a more fine-grained choice of its low-level implementation. Second, the cost model for alternative implementations is automatically inferred by combining machine learning and program reasoning. The dictionary cost model is learned using a regression model trained over the profiling data of dictionary operations on a given architecture. Program reasoning helps to infer the expected cost of the whole query by combining the learned dictionary cost estimates. Our experimental results show the effectiveness of the trained cost model on microbenchmarks. Furthermore, we show that the code generated by our framework outperforms or is competitive with state-of-the-art analytical query and in-database machine learning engines. Amir Shaikhha, Marios Kelepeshis, Mahdi Ghorbani |
CGO | 1 |
| 2023 | An Efficient Vectorized Hash Table for Batch ComputationsabstractIn recent years, the increasing demand for high-performance analytics on big data has led the research on batch hash tables. It is shown that this type of hash table can benefit from the cache locality and multi-threading more than ordinary hash tables. Moreover, the batch design for hash tables is amenable to using advanced features of modern processors such as prefetching and SIMD vectorization. While state-of-the-art research and open-source projects on batch hash tables made efforts to propose improved designs by better usage of mentioned hardware features, their approaches still do not fully exploit the existing opportunities for performance improvements. Furthermore, there is a gap for a high-level batch API of such hash tables for wider adoption of these high-performance data structures. In this paper, we present Vec-HT, a parallel, SIMD-vectorized, and prefetching-enabled hash table for fast batch processing. To allow developers to fully take advantage of its performance, we recommend a high-level batch API design. Our experimental results show the superiority and competitiveness of this approach in comparison with the alternative implementations and state-of-the-art for the data-intensive workloads of relational join processing, set operations, and sparse vector processing. Hesam Shahrokhi, Amir Shaikhha |
ECOOP | 2 |
| 2023 | Hinted Dictionaries: Efficient Functional Ordered Sets and Maps
Amir Shaikhha, Mahdi Ghorbani, Hesam Shahrokhi |
ECOOP | 1 |
| 2023 | Optimizing Tensor Programs on Flexible StorageabstractTensor programs often need to process large tensors (vectors, matrices, or higher order tensors) that require a specialized storage format for their memory layout. Several such layouts have been proposed in the literature, such as the Coordinate Format, the Compressed Sparse Row format, and many others, that were especially designed to optimally store tensors with specific sparsity properties. However, existing tensor processing systems require specialized extensions in order to take advantage of every new storage format. In this paper we describe a system that allows users to define flexible storage formats in a declarative tensor query language, similar to the language used by the tensor program. The programmer only needs to write storage mappings, which describe, in a declarative way, how the tensors are laid out in main memory. Then, we describe a cost-based optimizer that optimizes the tensor program for the specific memory layout. We demonstrate empirically significant performance improvements compared to state-of-the-art tensor processing systems. Maximilian Schleich, Amir Shaikhha, Dan Suciu |
Proc. ACM Manag. Data | 2 |
| 2023 | Compiling Structured Tensor AlgebraabstractTensor algebra is essential for data-intensive workloads in various computational domains. Computational scientists face a trade-off between the specialization degree provided by dense tensor algebra and the algorithmic efficiency that leverages the structure provided by sparse tensors. This paper presents StructTensor, a framework that symbolically computes structure at compilation time. This is enabled by Structured Tensor Unified Representation (STUR), an intermediate language that can capture tensor computations as well as their sparsity and redundancy structures. Through a mathematical view of lossless tensor computations, we show that our symbolic structure computation and the related optimizations are sound. Finally, for different tensor computation workloads and structures, we experimentally show how capturing the symbolic structure can result in outperforming state-of-the-art frameworks for both dense and sparse tensor algebra. Mahdi Ghorbani, Mathieu Huot, Shideh Hashemian, Amir Shaikhha |
Proc. ACM Program. Lang. | 4 |
| 2023 | Demonstration of OpenDBML, a Framework for Democratizing In-Database Machine LearningabstractMachine learning over relational data has been used in several applications. The traditional approach of joining relations first and then training a model on the joined table is time-consuming and requires a significant amount of memory. Recent research has focused on in-database machine learning (in-DB ML) to address this issue; these methods train the models over relations without joining, resulting in a more efficient process. However, such systems have ad-hoc user interfaces and specific data formats, making them challenging to use. To address this problem, this paper presents OpenDBML, a framework for democratizing in-DB ML. OpenDBML offers a Python interface for multiple in-DB ML systems, a set of commonly used datasets, and the ability to add new datasets and in-DB ML systems via both Python and web interfaces. The paper also presents comprehensive demonstration scenarios to illustrate how to use OpenDBML effectively. Mahdi Ghorbani, Amir Shaikhha |
Proc. VLDB Endow. | 2 |
| 2022 | Hinted Dictionaries: Efficient Functional Ordered Sets and Maps (Extended Abstract)abstractSets and maps are two essential collection types for programming used widely in data analytics [Shaikhha et al., 2022]. The underlying implementation for both are normally based on 1) hash tables or 2) ordered data structures. The former provides (average-case) constant-time lookup, insertion, and deletion operations, while the latter performs these operations in a logarithmic time. The trade-off between these two approaches has been heavily investigated in systems communities [Kim et al., 2009]. An important class of operations are those dealing with two collection types, such as set-set-union or the merge of two maps. One of the main advantages of hash-based implementations is a straightforward implementation for such operations with a linear computational complexity. However, naïvely using ordered dictionaries results in an implementation with a computational complexity of O(n log(n)). Motivating Example. The following C++ code computes the intersection of two sets, implemented by std::unordered_set, a hash-table-based set: std::unordered_set result; for(auto& e : set1) { if(set2.count(e)) result.emplace(e); } However, the same fact is not true for ordered data structures; changing the dictionary type to std::set, an ordered implementation, results in a program with O(n log(n)) computational complexity. This is because both the count (lookup) and emplace (insertion) methods have logarithmic computational complexity. As a partial remedy, the standard library of C++ provides an alternative insertion method that can take linear time, if used appropriately. The emplace_hint method takes a hint for the position that the element will be inserted. If the hint correctly specifies the insertion point, the computational complexity will be amortized to constant time. std::set result; auto hint = result.begin(); for(auto& e : set1) { if(set2.count(e)) hint = result.emplace_hint(hint, e); } However, the above implementation still suffers from an O(n log(n)) computational complexity, due to the logarithmic computational complexity of the lookup operation (count) of the second set. Thanks to the orderedness of the second set, one can observe that once an element is looked up, there is no longer any need to search its preceding elements at the next iterations. By leveraging this feature, we can provide a hinted lookup method with an amortized constant run-time. Hinted Data Structures. The following code, shows an alternative implementation for set intersection that uses such hinted lookup operations: hinted_set result; hinted_set ::hint_t hint = result.begin(); for(auto& e : set1) { hinted_set ::hint_t hint2 = set2.seek(e); if(hint2.found) hint = result.insert_hint(hint, e); set2.after(hint2); } The above hinted set data-structure enables faster insertion and lookup by providing a cursor through a hint object (of type hint_t). The seek method returns the hint object hint2 pointing to element e. Thanks to the invocation of set2.after(hint2), the irrelevant elements of set2 (which are smaller than e) are no longer considered in the next iterations. The expression hint2.found specifies if the element exists in set2 or not. Finally, if an element exists in the second set (specified by hint2.found), it is inserted into its correct position using insert_hint. The existing work on efficient ordered dictionaries can be divided into two categories. First, in the imperative world, there are C++ ordered dictionaries (e.g., std::map) with limited hinting capabilities only for insertion through emplace_hint, but not for deletion and lookup, as observed previously. Second, from the functional world, Adams' sets [Adams, 1993] provide efficient implementations for set-set operators. Functional languages such as Haskell have implemented ordered sets and maps based on them for more than twenty years [Straka, 2010]. Furthermore, it has been shown [Blelloch et al., 2016] that Adams' maps can be used to provide a parallel implementation for balanced trees such as AVL, Red-Black, Weight-Balanced, and Treaps. However, Adams' maps do not expose any hint-based operations to the programmer. At first glance, these two approaches seem completely irrelevant to each other. The key contribution of this paper is hinted dictionaries, an ordered data structure that unifies the techniques from both imperative and functional worlds. The essential building block of hinted dictionaries are hint objects, that enable faster operations (than the traditional O(log n) complexity) by maintaining a pointer into the data structure. The underlying representation for hinted dictionaries can be sorted arrays, unbalanced trees, and balanced trees by sharing the same interface. In our running example, alternative data structures can be provided by simply changing the type signature of the hinted set from hinted_set to another implementation, without modifying anything else. Amir Shaikhha, Mahdi Ghorbani, Hesam Shahrokhi |
ECOOP | 1 |
| 2022 | Deep Fusion for Efficient Nested Recursive ComputationsabstractOne of the performance bottlenecks of nested recursive computations is the intermediate collections created at different levels of recursion. The existing techniques such as vertical and horizontal loop fusion do not remove such intermediate allocations. This paper proposes deep fusion, a technique for the efficient compilation of nested recursive computation over collections. The input to our compilation framework is a high-level functional program that can represent computations on flat and nested collections such as lists, sets, bags, and maps. The intermediate collections are removed in three levels. First, the immutable collections are translated into mutable ones by leveraging in-place updates using the destination-passing style technique. Second, deep fusion enables the inner level of recursion to reuse the destinations of the outer levels for in-place updates. Third, deep fusion removes the need to allocate tiny intermediate collections at different depths of recursion. Our experiments show that deep fusion can improve the performance of nested recursion over nested lists and maps. Amir Shaikhha |
GPCE | 1 |
| 2022 | Functional collection programming with semi-ring dictionariesabstractThis paper introduces semi-ring dictionaries, a powerful class of compositional and purely functional collections that subsume other collection types such as sets, multisets, arrays, vectors, and matrices. We developed SDQL, a statically typed language that can express relational algebra with aggregations, linear algebra, and functional collections over data such as relations and matrices using semi-ring dictionaries. Furthermore, thanks to the algebraic structure behind these dictionaries, SDQL unifies a wide range of optimizations commonly used in databases (DB) and linear algebra (LA). As a result, SDQL enables efficient processing of hybrid DB and LA workloads, by putting together optimizations that are otherwise confined to either DB systems or LA frameworks. We show experimentally that a handful of DB and LA workloads can take advantage of the SDQL language and optimizations. SDQL can be competitive with or outperforms a host of systems that are state of the art in their own domain: in-memory DB systems Typer and Tectorwise for (flat, not nested) relational data; SciPy for LA workloads; sparse tensor compiler taco; the Trance nested relational engine; and the in-database machine learning engines LMFAO and Morpheus for hybrid DB/LA workloads over relational data. Amir Shaikhha, Mathieu Huot, Jaclyn Smith, Dan Olteanu |
Proc. ACM Program. Lang. | 1 |
| 2021 | An Intermediate Representation for Hybrid Database and Machine Learning WorkloadsabstractIFAQ is an intermediate representation and compilation framework for hybrid database and machine learning workloads expressible using iterative programs with functional aggregate queries. We demonstrate IFAQ for several OLAP queries, linear algebra expressions, and learning factorization machines over training datasets defined by feature extraction queries over relational databases. Amir Shaikhha, Maximilian Schleich, Dan Olteanu |
Proc. VLDB Endow. | 1 |
| 2020 | Multi-layer optimizations for end-to-end data analyticsabstractWe consider the problem of training machine learning models over multi-relational data. The mainstream approach is to first construct the training dataset using a feature extraction query over input database and then use a statistical software package of choice to train the model. In this paper we introduce Iterative Functional Aggregate Queries (IFAQ), a framework that realizes an alternative approach. IFAQ treats the feature extraction query and the learning task as one program given in the IFAQ's domain-specific language, which captures a subset of Python commonly used in Jupyter notebooks for rapid prototyping of machine learning applications. The program is subject to several layers of IFAQ optimizations, such as algebraic transformations, loop transformations, schema specialization, data layout optimizations, and finally compilation into efficient low-level C++ code specialized for the given workload and data. Amir Shaikhha, Maximilian Schleich, Alexandru Ghita, Dan Olteanu |
CGO | 1 |
| 2020 | Multi-stage programming in the large with staged classesabstractMulti-stage programming (MSP) holds great promise, allowing the reliable generation of specialized, partially-evaluated code with static type- and scope-safety guarantees. Yet, we argue that MSP has not reached its full potential yet, as it has been traditionally limited to generating expressions, and has lacked principled facilities for generating modular programs and data structures. In that sense, we argue that MSP has been reserved for programming “in the small,” focused on generating efficient kernels of computation on the scale of single function bodies. We present a novel technique called staged classes, which extends MSP with the ability to manipulate class definitions as first-class constructs. This lets programmers use MSP “in the large,” on the level of applications, rather than mere functions. This way, applications can be designed in an abstract and modular way without runtime cost, as staged classes guarantee the removal of all staging-time abstractions, resulting in the generation of efficient specialized modules and data structures. We describe the design of a prototype relational database system in Scala, which uses several stages of runtime compilation to maximize the efficiency of query execution and data storage. We also show that staged classes can be used for defining type- and scope-safe implementations of type providers. Lionel Parreaux, Amir Shaikhha |
GPCE | 2 |
| 2020 | Scalable Querying of Nested DataabstractWhile large-scale distributed data processing platforms have become an attractive target for query processing, these systems are problematic for applications that deal with nested collections. Programmers are forced either to perform non-trivial translations of collection programs or to employ automated flattening procedures, both of which lead to performance problems. These challenges only worsen for nested collections with skewed cardinalities, where both handcrafted rewriting and automated flattening are unable to enforce load balancing across partitions. In this work, we propose a framework that translates a program manipulating nested collections into a set of semantically equivalent shredded queries that can be efficiently evaluated. The framework employs a combination of query compilation techniques, an efficient data representation for nested collections, and automated skew-handling. We provide an extensive experimental evaluation, demonstrating significant improvements provided by the framework in diverse scenarios for nested collection programs. Jaclyn Smith, Michael Benedikt, Milos Nikolic 0001, Amir Shaikhha |
Proc. VLDB Endow. | 4 |
| 2020 | Synthesis of Incremental Linear Algebra ProgramsabstractThis article targets the Incremental View Maintenance (IVM) of sophisticated analytics (such as statistical models, machine learning programs, and graph algorithms) expressed as linear algebra programs. We present LAGO, a unified framework for linear algebra that automatically synthesizes efficient incremental trigger programs, thereby freeing the user from error-prone manual derivations, performance tuning, and low-level implementation details. The key technique underlying our framework is abstract interpretation, which is used to infer various properties of analytical programs. These properties give the reasoning power required for the automatic synthesis of efficient incremental triggers. We evaluate the effectiveness of our framework on a wide range of applications from regression models to graph computations. Amir Shaikhha, Mohammed Elseidy, Stephan Mihaila, Daniel Espino, Christoph Koch 0001 |
ACM Trans. Database Syst. | 1 |
| 2019 | Finally, a Polymorphic Linear Algebra Language (Pearl)abstractDerivatives, mostly in the form of gradients and Hessians, are ubiquitous in machine learning. Automatic differentiation (AD), also called algorithmic differentiation or simply "autodiff", is a family of techniques similar to but more general than backpropagation for efficiently and accurately evaluating derivatives of numeric functions expressed as computer programs. AD is a small but established field with applications in areas including computational fluid dynamics, atmospheric sciences, and engineering design optimization. Until very recently, the fields of machine learning and AD have largely been unaware of each other and, in some cases, have independently discovered each other's results. Despite its relevance, general-purpose AD has been missing from the machine learning toolbox, a situation slowly changing with its ongoing adoption under the names "dynamic computational graphs" and "differentiable programming". We survey the intersection of AD and machine learning, cover applications where AD has direct relevance, and address the main implementation techniques. By precisely defining the main differentiation techniques and their interrelationships, we aim to bring clarity to the usage of the terms "autodiff", "automatic differentiation", and "symbolic differentiation" as these are encountered more and more in machine learning settings. Amir Shaikhha, Lionel Parreaux |
ECOOP | 1 |
| 2019 | Polymorphic extractors for semantic and portable pattern matching (short paper)abstractThis paper introduces polymorphic extractors, a technique for tackling two main issues with the existing pattern matching techniques in functional languages. First, this technique defines semantic pattern matching rather than a syntactic one. Second, this technique solves the portability issue when defining a set of patterns based on different underlying data-structure design choices. Furthermore, polymorphic extractors can be further improved by performing optimizations and multi-stage programming. The key technique behind polymorphic extractors is using the tagless-final technique (a.k.a. polymorphic embedding/object algebras) for defining different extraction semantics over expression terms. Amir Shaikhha |
GPCE | 1 |
| 2019 | Compiler generation for performance-oriented embedded DSLs (short paper)abstractIn this paper, we present a framework for generating optimizing compilers for performance-oriented embedded DSLs (EDSLs). This framework provides facilities to automatically generate the boilerplate code required for building DSL compilers on top of the existing extensible optimizing compilers. We evaluate the practicality of our framework by demonstrating a real-world use-case successfully built with it. Amir Shaikhha, Vojin Jovanovic, Christoph Koch 0001 |
GPCE | 1 |
| 2019 | Efficient differentiable programming in a functional array-processing languageabstractWe present a system for the automatic differentiation (AD) of a higher-order functional array-processing language. The core functional language underlying this system simultaneously supports both source-to-source forward-mode AD and global optimisations such as loop transformations. In combination, gradient computation with forward-mode AD can be as efficient as reverse mode, and that the Jacobian matrices required for numerical algorithms such as Gauss-Newton and Levenberg-Marquardt can be efficiently computed. Amir Shaikhha, Andrew W. Fitzgibbon, Dimitrios Vytiniotis, Simon L. Peyton Jones |
Proc. ACM Program. Lang. | 1 |
| 2018 | Push versus pull-based loop fusion in query enginesabstractAbstract Database query engines use pull-based or push-based approaches to avoid the materialization of data across query operators. In this paper, we study these two types of query engines in depth and present the limitations and advantages of each engine. Similarly, the programming languages community has developed loop fusion techniques to remove intermediate collections in the context of collection programming. We draw parallels between databases (DB) and programming language (PL) research by demonstrating the connection between pipelined query engines and loop fusion techniques. Based on this connection, we propose a new type of pull-based engine, inspired by a loop fusion technique, which combines the benefits of both approaches. Then, we experimentally evaluate the various engines, in the context of query compilation, for the first time in a fair environment, eliminating the biasing impact of ancillary optimizations that have traditionally only been used with one of the approaches. We show that for realistic analytical workloads, there is no considerable advantage for either form of pipelined query engine, as opposed to what recent research suggests. Also, by using micro-benchmarks, which demonstrate certain edge cases on which one approach or the other performs better, we show that our proposed engine dominates the existing engines by combining the benefits of both. Amir Shaikhha, Mohammad Dashti 0001, Christoph Koch 0001 |
J. Funct. Program. | 1 |
| 2018 | Unifying analytic and statically-typed quasiquotesabstractMetaprograms are programs that manipulate (generate, analyze and evaluate) other programs. These tasks are greatly facilitated by quasiquotation, a technique to construct and deconstruct program fragments using quoted code templates expressed in the syntax of the manipulated language. We argue that two main flavors of quasiquotes have existed so far: Lisp-style quasiquotes, which can both construct and deconstruct programs but may produce code that contains type mismatches and unbound variables; and MetaML-style quasiquotes, which rely on static typing to prevent these errors, but can only construct programs. In this paper, we show how to combine the advantages of both flavors into a unified framework: we allow the construction, deconstruction and evaluation of program fragments while ensuring that generated programs are well-typed and well-scoped, a combination unseen in previous work. We formalize our approach as λ {} , a multi-stage calculus with code pattern matching and rewriting, and prove its type safety. We also present its realization in Squid, a metaprogramming framework for Scala, leveraging Scala’s expressive type system. To demonstrate the usefulness of our approach, we introduce speculative rewrite rules , a novel code transformation technique that makes decisive use of these capabilities, and we outline how it simplifies the design of some crucial query compiler optimizations. Lionel Parreaux, Antoine Voizard, Amir Shaikhha, Christoph Koch 0001 |
Proc. ACM Program. Lang. | 3 |
| 2018 | Building Efficient Query Engines in a High-Level LanguageabstractAbstraction without regret refers to the vision of using high-level programming languages for systems development without experiencing a negative impact on performance. A database system designed according to this vision offers both increased productivity and high performance instead of sacrificing the former for the latter as is the case with existing, monolithic implementations that are hard to maintain and extend. In this article, we realize this vision in the domain of analytical query processing. We present LegoBase, a query engine written in the high-level programming language Scala. The key technique to regain efficiency is to apply generative programming: LegoBase performs source-to-source compilation and optimizes database systems code by converting the high-level Scala code to specialized, low-level C code. We show how generative programming allows to easily implement a wide spectrum of optimizations, such as introducing data partitioning or switching from a row to a column data layout, which are difficult to achieve with existing low-level query compilers that handle only queries. We demonstrate that sufficiently powerful abstractions are essential for dealing with the complexity of the optimization effort, shielding developers from compiler internals and decoupling individual optimizations from each other. We evaluate our approach with the TPC-H benchmark and show that (a) with all optimizations enabled, our architecture significantly outperforms a commercial in-memory database as well as an existing query compiler. (b) Programmers need to provide just a few hundred lines of high-level code for implementing the optimizations, instead of complicated low-level code that is required by existing query compilation approaches. (c) These optimizations may potentially come at the cost of using more system memory for improved performance. (d) The compilation overhead is low compared to the overall execution time, thus making our approach usable in practice for compiling query engines. Amir Shaikhha, Yannis Klonatos, Christoph Koch 0001 |
ACM Trans. Database Syst. | 1 |
| 2017 | Quoted staged rewriting: a practical approach to library-defined optimizationsabstractStaging has proved a successful technique for programmatically removing code abstractions, thereby allowing for faster program execution while retaining a high-level interface for the programmer. Unfortunately, techniques based on staging suffer from a number of problems — ranging from practicalities to fundamental limitations — which have prevented their widespread adoption. We introduce Quoted Staged Rewriting (QSR), an approach that uses type-safe, pattern matching-enabled quasiquotes to define optimizations. The approach is “staged” in two ways: first, rewrite rules can execute arbitrary code during pattern matching and code reconstruction, leveraging the power and flexibility of staging; second, library designers can orchestrate the application of successive rewriting phases (stages). The advantages of using quasiquote-based rewriting are that library designers never have to deal directly with the intermediate representation (IR), and that it allows for non-intrusive optimizations — in contrast with staging, it is not necessary to adapt the entire library and user programs to accommodate optimizations. Lionel Parreaux, Amir Shaikhha, Christoph Koch 0001 |
GPCE | 2 |
| 2017 | Transaction Repair for Multi-Version Concurrency ControlabstractThe optimistic variants of Multi-Version Concurrency Control (MVCC) avoid blocking concurrent transactions at the cost of having a validation phase. Upon failure in the validation phase, the transaction is usually aborted and restarted from scratch. The "abort and restart" approach becomes a performance bottleneck for use cases with high contention objects or long running transactions. In addition, restarting from scratch creates a negative feedback loop in the system, because the system incurs additional overhead that may create even more conflicts. Mohammad Dashti 0001, Sachin Basil John, Amir Shaikhha, Christoph Koch 0001 |
SIGMOD Conference | 3 |
| 2016 | How to Architect a Query CompilerabstractThis paper studies architecting query compilers. The state of the art in query compiler construction is lagging behind that in the compilers field. We attempt to remedy this by exploring the key causes of technical challenges in need of well founded solutions, and by gathering the most relevant ideas and approaches from the PL and compilers communities for easy digestion by database researchers. All query compilers known to us are more or less monolithic template expanders that do the bulk of the compilation task in one large leap. Such systems are hard to build and maintain. We propose to use a stack of multiple DSLs on different levels of abstraction with lowering in multiple steps to make query compilers easier to build and extend, ultimately allowing us to create more convincing and sustainable compiler-based data management systems. We attempt to derive our advice for creating such DSL stacks from widely acceptable principles. We have also re-created a well-known query compiler following these ideas and report on this effort. Amir Shaikhha, Yannis Klonatos, Lionel Parreaux, Lewis Brown, Mohammad Dashti 0001, Christoph Koch 0001 |
SIGMOD Conference | 1 |
| 2014 | Yin-yang: concealing the deep embedding of DSLsabstractDeeply embedded domain-specific languages (EDSLs) intrinsically compromise programmer experience for improved program performance. Shallow EDSLs complement them by trading program performance for good programmer experience. We present Yin-Yang, a framework for DSL embedding that uses Scala macros to reliably translate shallow EDSL programs to the corresponding deep EDSL programs. The translation allows program prototyping and development in the user friendly shallow embedding, while the corresponding deep embedding is used where performance is important. The reliability of the translation completely conceals the deep em- bedding from the user. For the DSL author, Yin-Yang automatically generates the deep DSL embeddings from their shallow counterparts by reusing the core translation. This obviates the need for code duplication and leads to reliability by construction. Vojin Jovanovic, Amir Shaikhha, Sandro Stucki, Vladimir Nikolaev, Christoph Koch 0001, Martin Odersky |
GPCE | 2 |
| 2014 | DBToaster: higher-order delta processing for dynamic, frequently fresh views
Christoph Koch 0001, Yanif Ahmad, Oliver Kennedy, Milos Nikolic 0001, Andres Nötzli, Daniel Lupei, Amir Shaikhha |
VLDB J. | 7 |