Papers for

database system developers

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Text to SQL model accuracy improves using plans across database dialects

Closing the Cross-Dialect Gap: Query Plans as a Portable Interface in Text-to-SQL

Abstract: Text-to-SQL systems are typically trained and evaluated on a single dialect (SQLite), yet production deployments span PostgreSQL, MySQL, ClickHouse, and beyond. We show that this single-dialect assumption leads to a substantial drop in cross-dialect accuracy for every model we tested. The drop persists across scale, architecture, and even purpose-built text-to-SQL systems. We argue that the fix is to change the generation target: instead of asking an LLM to emit dialect-specific SQL, we have it emit a dialect-agnostic relational algebra query plan, which a deterministic compiler then renders into SQL for any supported backend. Across thirteen models from 3B to frontier scale, this restores cross-dialect portability nearly uniformly, at a small cost in peak accuracy on the model's home dialect for capable prompted models and none once fine-tuned on plans; under matched fine-tuning, plan supervision yields a stronger model than SQL supervision. We also introduce MetricName, a question-aware result-set comparator needed to evaluate fairly across dialects, where existing metrics confound semantic errors with benign cross-dialect variation. More broadly, the result is a reminder that a generation target chosen for execution is not necessarily the one that maximizes generation quality.

Sun 27 SeptComputation and Language
The gist
Text-to-SQL models usually learn one type of database language, which causes errors when used with others. The authors show this is a big problem for many models. They suggest having the model produce a general query plan, which can be turned into any specific database language afterwards. This method improves accuracy across many SQL languages without hurting performance on the original language, and sometimes even improves it. They also created a new way to fairly measure correctness across different database languages.
Open → 2609.33670v1

Transformer memory restructured to enable exact reuse and deletion

Memory as a cache: Exact context reuse and deletion by construction

Abstract: The KV cache of a transformer entangles every token's representation with its entire prefix: a passage encoded once cannot be reused under a different prefix or removed without recomputing everything after it, so exact cache reuse is limited to shared prefixes. We present SMem, an architecture whose context representation is a cache by construction. A block-local encoder maps each block to memory rows independently of other blocks, and a reader conditions generation on their union through cross-attention. For every parameter setting, memory composes exactly at fixed block indices, deleting a block is an exact $O(b)$ update for $b$-token blocks, and the memory state is independent of the edit path. At $4\times$ the training context, under the shared recipe, SMem retrieves planted needles beyond any trained-length window (exact match 0.14-0.28 at distances of 31 and 63 blocks), where learned-position, RoPE, and Block-Attention-style transformers all score at most 0.02. A fully cached context is served by computing one block alone at a near-constant 3.1-6.2 ms, whereas cold prefill grows with context; batched decode stores 34-38% fewer KV rows and runs 1.4-1.7$\times$ faster when bandwidth-bound; and deletion beats suffix recomputation by 8.5$\times$ at 512 blocks and 452$\times$ at 4096 blocks (32-256$\times$ the trained length, probing the cost model rather than a served regime). The cost is a perplexity gap of -4.7% to +2.8% (negative favors SMem) against a parameter-matched transformer with the same positional scheme, at 160M-1.5B on FineWeb-Edu across two recipes and a learning-rate search. SMem also composes with RoPE: at 160M and 410M the composite matches or leads the matched transformer and closes 29-59% of SMem's gap to a RoPE transformer. Dropping prefix entanglement thus keeps perplexity comparable while making the cache exactly composable and editable.

Sat 26 SeptArtificial IntelligenceMachine Learning
The gist
Current transformer models combine every token’s memory with everything before it, making it hard to reuse parts or remove sections without recalculating everything after. The authors introduce SMem, which stores memory in separate blocks that can be combined exactly and updated efficiently. This allows removing or reusing parts of the memory quickly without affecting the rest, and keeps prediction quality close to standard models. SMem also works well with common positional encoding methods to maintain accuracy.
Open → 2609.32395v1

Deciding bag query containment using controlled Diophantine equations

Attacking Diophantus: Special Cases of Bag Containment

Abstract: Query containment is a fundamental decision problem in database theory: given two queries, determine whether, over all database instances, every answer produced by the first is also produced by the second. For conjunctive queries under set semantics, the problem is understood through the classical homomorphism-based characterisation. Under bag semantics, the interpretation underlying real relational databases, containment becomes a quantitative comparison of answer multiplicities. Despite decades of work, the decidability of bag containment for conjunctive queries remains open. This frontier is fragile: for slightly more expressive classes, bag containment is undecidable, with negative results relying on reductions from variants of Hilbert's 10th problem. This work develops a unified framework for bag containment of conjunctive queries that subsumes two previously studied decidable cases: projection-free and join-on-free containee queries. The framework yields decidability for a broader class, called join-uniform queries, while leaving the containing query arbitrary. This contrasts with techniques that impose restrictions on the containing query. The approach identifies tractable classes based on the internal unification structure of the query whose multiplicities must be bounded. Specifically, it reduces containment to a controlled Diophantine problem. Starting from the containee query, one builds a canonical model generated by all its possible unifications, over which multiplicities admit a finite arithmetic characterisation. Containment is proved equivalent to the non-existence of solutions of a corresponding Diophantine inequality system. Although these problems are undecidable in general, we show that the systems arising from join-uniform containment form a decidable subclass. Thus, the standard source of undecidability for bag containment becomes the core of the decision procedure.

Fri 25 SeptDatabases
The gist
Checking if one database query always gives answers contained within another is a key problem in databases. When counting duplicate answers (bag semantics), deciding this containment can be very hard or impossible for complex queries. The authors create a new way to handle certain queries, called join-uniform queries, by translating the problem into a special kind of math problem with equations. They prove that for these queries, deciding containment is indeed doable, improving on earlier restricted cases. This work links tricky database questions to classic math problems about numbers.
Open → 2609.30956v1

Scan-resistant cache gadgets improve storage performance and reliability

SR-Gadgets: Make Scan-Resistant Caching Practical

Abstract: Block caches commonly serve scan-heavy I/O workloads, motivating extensive studies on scan-resistant eviction algorithms. Many of these algorithms adopt a multi-queue structure. However, they focus primarily on one-time scans and do not handle repeated scans well. Two important challenges from repeated scans are miss-ratio cliffs, where a small increase in cache size sharply reduces the miss ratio, and Belady's anomalies, where increasing the cache size increases the miss ratio. In this paper, we first develop two quantitative metrics to measure these behaviors. With these metrics, we find that LIRS is the only multi-queue algorithm that is scan-resistant (almost cliff- and anomaly-free). Contrary to conventional wisdom, we show that stack distance is not the secret sauce that makes LIRS scan-resistant. Instead, regulating the queues are the key to its scan resistance. Based on these insights, we design the \gadgetprefix Gadgets, easy-to-integrate augmentations that make existing algorithms scan-resistant without changing their eviction heuristics or queue structures. We implement the \gadgetprefix Gadgets in five algorithms: S3-FIFO, SIEVE, ARC, 2Q, and TinyLFU, and make them scan-resistant. Evaluated on 5,538 production traces, all augmented algorithms outperform their base versions, reducing miss ratios by up to 23.1% while consistently reducing cliffs and Belady's anomalies across the production traces.

Thu 24 SeptPerformance
The gist
Cache systems store data temporarily to speed up computers, but data 'scans' can cause sudden drops or unexpected increases in cache misses, hurting performance. The authors studied these problems and found that a popular algorithm called LIRS avoids them well—not because of earlier assumed reasons, but because it manages its data queues smartly. Using this insight, they created small add-ons called Gadgets that make other cache algorithms handle scans better without changing their core methods. Testing these Gadgets on thousands of real data traces showed they reduce missed data fetches and avoid weird caching problems.
Open → 2609.30468v1

Transposition rule approaches optimal list order in polynomial time

Transposition achieves OPT$+O(1)$ in polynomial time for IID list update

Abstract: In the classical list update problem, a set of items must be stored in a list-type structure, where accessing the $i$-th element costs $i$. Items will be queried in an IID manner according to some probability distribution $p$ on the items. We want to minimize the expected cost of each query. The optimal order is to place the items in decreasing order of probability $p_1 \geq p_2 \geq \cdots$ with expected cost $\mathsf{OPT} = \sum_j j p_j$, but the probability vector $p$ is generally unknown. Thus we use a self-organizing list following the transposition rule: an item is transposed 1 position forward whenever it is queried. Coester (2026) proved that, at stationarity measure for the transposition rule, the expected cost of a query is at most $\mathsf{OPT} + 1$. However, this Markov chain may have arbitrarily slow mixing time. We prove that, for arbitrary $p$ and arbitrary initial orderings $σ$, after polynomially many queries in the number of items, the expected cost of a query is at most $\mathsf{OPT} + O(1)$.

Wed 23 SeptData Structures and AlgorithmsDiscrete Mathematics
The gist
When you have a list of items and want to find things quickly, the best way is to put the most popular items near the front. But if you don't know which items are popular, you can use a simple rule: whenever an item is accessed, swap it one step closer to the front. The authors show that this simple rule gets very close to the best possible ordering after a reasonable number of accesses, even starting from any order. Previous work proved the rule is nearly optimal on average, but this paper shows it works quickly.
Open → 2609.28397v1

Succinct storage methods improve search trees for complex networks

Succinct Representation of Search Trees on Trees

Abstract: A search tree on trees (STT) is a data structure for performing a search for a target vertex in a reference tree. A standard binary search tree is a special case of an STT, where the reference tree is a path of totally ordered elements. In this paper, we study the problem of succinct representation of STTs. We consider two cases: (1) general search trees on trees, and (2) Steiner-closed search trees on trees [Bose et al. TALG 2023]. For both cases, we present representations that can be constructed in polynomial time and achieve optimal space up to the lower-order additive terms. We also present data structures for supporting fast traversals of both general and Steiner-closed STTs. For general STTs our data structure still takes optimal space up to lower-order additive terms.

Fri 18 SeptData Structures and Algorithms
The gist
Finding a specific point in a complicated network can be tricky and slow without the right tools. This paper looks at ways to store special search structures, called search trees on trees, in a very compact form so they take up less space. The researchers made sure these compact versions still let you search quickly, and that building them doesn’t take too long. Their methods work for both general cases and a more specialized version called Steiner-closed search trees.
Open → 2609.21236v1

Maximum strong independent sets improve hypergraph clustering methods

Maximum Strong Independent Sets in Hypergraphs: Reductions, Bounds, and Greedy Certificates

Abstract: We study the maximum strong independent set problem in a finite hypergraph: find the largest vertex set that intersects every hyperedge in at most one vertex. This objective arises whenever each observed block is a local incompatibility constraint but transitive closure across overlapping blocks is not justified. A motivating example is multi-band LSH-MinHash deduplication, where each collision bucket gives local evidence, while connected-component contraction can impose spurious global equivalences. The paper develops an incidence-structural toolkit for this problem. We prove exact reductions for dominance, incidence twins, and weight-1 blocks; derive closed-form and low-weight upper bounds; introduce puncturing and covering certificates that sharpen those bounds; and analyze a layered greedy clustering algorithm driven by block weights and residual incidence. The algorithmic analysis includes feasibility, maximality, conditional optimality, a layered witness-matching upper bound, and incidence-local complexity bounds. The results give correctness, termination, fixed-point, and optimality certificates for broad incidence families, together with examples showing when different certificates separate or coincide.

Wed 16 SeptMachine Learning
The gist
The paper looks at how to find the largest set of points in a network where each group of connected points contains at most one from the set. This problem is important when you want local information without assuming it spreads globally, like when deduplicating data from overlapping groups. The authors create tools and mathematical rules to simplify, estimate, and solve this problem with a step-by-step method that checks the quality of its solutions. They also describe when and how their method works best and provide examples to show the differences in how solutions can be certified.
Open → 2609.17951v1

Explicit construction of efficient graphs improves program discovery and data access

Explicit unbalanced 1-expanders with small degree and right size

Abstract: An explicit graph is given with left size $N$, left degree $\widetilde O(\log^2 N)$, right size $(1+o(1))K$ and $1$-expansion up to~$K$, meaning that every left subset of size $K' \le K$ has at least $K'$ neighbors. Let $\C(x)$ be the minimal length of a program that prints~$x$ (i.e., the central concept in Kolmogorov complexity). The $1$-expander is used to obtain an algorithm that on input $x$ computes in time $\poly(|x|)$ a list with $\widetilde O(|x|^3)$ programs such that at least 1 program prints $x$ and has length $\C(x) + O(1)$. This improves on the $O(|x|^{6+\eps})$ upper bound in~\cite{zim:c:shortlistshortproof} and is close to the $Ω(|x|^2)$ lower bound from~\cite[theorem 4]{bmvz:j:shortlist}. In the companion paper ``Online matching games in bipartite expanders: applications to data structures," the $1$-expander is used to obtain dynamic dictionaries in which the query operation has non-adaptive memory access.

Sun 13 SeptComputational ComplexityDiscrete Mathematics
The gist
The authors built a special type of network (called a 1-expander) that connects items on the left to items on the right with a small number of links. This network helps to quickly find short descriptions (or programs) that produce a given output, which is a key problem in understanding how complex data can be compressed and described. Their method speeds up an algorithm to list these short programs, making it more efficient than previous approaches. They also showed how this network can help create data structures that access memory predictably without changing during queries.
Open → 2609.14587v1

Computable limits show when sql queries are truly equivalent

Few Rows Tell Them Apart: Equivalence of Queries Mixing Set and Bag Semantics

Abstract: Bounded SQL equivalence checkers search for a counter-example database of bounded size, and a search that comes back empty proves nothing. We supply missing theory: computable bounds $B$ such that agreement on all databases with at most $B$ tuples per relation implies equivalence. We work in the combined-semantics framework, which captures SQL's mix of duplicate-eliminating (DISTINCT) and duplicate-preserving computation over set-valued relations. For conjunctive queries we prove a bound linear in the query size for fixed multiset width: inequivalent queries already disagree on a database with at most $2^w |Q|$ tuples, where the width $w$ counts only the columns the queries actually read, independently of the total number of multiset variables. Declared keys shrink the bound to $2^{kw} |Q|$ for the smaller key-width $kw$, acyclic foreign keys leave it unchanged, and the result extends to several classes of queries with comparisons, for which equivalence had not previously been characterized. For these fragments, bounded search becomes a terminating, complete decision procedure.

Wed 9 SeptDatabases
The gist
Figuring out if two database queries always give the same result is tricky when queries mix counting duplicates and ignoring them. The authors found exact size limits for small example databases you need to check to be sure two queries behave identically. These limits depend on how many columns the queries look at and some database rules called keys. This finding means that testing query equivalence can be automated and will always finish for important types of queries.
Open → 2609.09978v1

Approximate nearest neighbor search in very high dimensions under max distance

Approximate Nearest Neighbor in Ultra-High Dimensional $\ell_\infty$

Abstract: We study the approximate nearest neighbor problem under $\ell_\infty$ in the ultra-high dimensional setting where the dimension $d$ is significantly larger than the number of points $n$. Thus, we desire data structures with no dependence on $d$ in the query time. [Herold-Nanongkai-Spoerhase-Varma-Wu, SoCG 2025] introduce this problem and give data structures in $\ell_p$: for $p=1,2$, they give $(1+\varepsilon)$-approximation data structures with space $\tilde{O}(n\log d/\text{poly}(\varepsilon))$ and query time $\tilde{O}(n/\text{poly}(\varepsilon))$. Since any data structure must have query time $Ω(\min \{n,d\})$, this query time is nearly tight. However, their results are inefficient for $\ell_\infty$, with query time $Ω(nd)$. In order to handle the challenges of $\ell_\infty$, we introduce a notion of subset embeddings, which embed points by simply selecting a subset of dimensions. In particular, we show one may preserve all pairwise distances of an $n$ point dataset up to a factor of $O(c)$ by computing distances on only $n^{1+1/c}$ coordinates. We also show a matching lower bound: for any $c > 1$, there exists a set of $n$ points in $\mathbb{R}^{d}$ such that any subset embedding for the set with approximation $c$ must have at least $n^{1+Ω(1/c)}$ coordinates. Using our subset embeddings, we give data structures for approximate nearest neighbor in $\ell_\infty$ with space $O(n^2\log d)$, query time $\tilde{O}(n^{1+1/c})$, and approximation $O(c\log\log n)$ for any $c \geq 1$. Finally, we give another data structure for the approximate nearest neighbor under $\ell_\infty$ with the same space and query time as our subset embedding approach, but with approximation $O(c^{\log_2 3}) \approx O(c^{1.58})$. This allows us to achieve $O(1)$-approximation with query time e.g.~$n^{1.01}$

Tue 8 SeptData Structures and Algorithms
The gist
Finding the closest data points becomes tricky when you have many dimensions, especially under the max distance (ℓ∞) measure. The authors study this problem when the number of dimensions is much larger than the number of points. They develop a way to focus on only a carefully chosen subset of dimensions to speed up searches while still keeping results approximately correct. Their new methods reduce query time dramatically compared to existing solutions and allow good approximations with manageable space.
Open → 2609.09427v1

Text to sql evaluation improved with query changes and new metrics

SQLMorph: Query Mutation and Fine-Grained Metrics for Text-to-SQL Evaluation

Abstract: Text-to-SQL systems translate natural language queries into executable SQL, democratizing access to structured data. Despite recent advances driven by large language models (LLMs), evaluation remains a major bottleneck: public benchmarks fail to capture the complexity of enterprise schema, while building private evaluation sets is costly and nondeterministic, making evaluation results difficult to reproduce. To address this issue, we present SQLMorph, a framework for Text-to-SQL evaluation via query mutation. SQLMorph introduces two techniques to automatically generate and expand evaluation sets: Join Query Expansion (JQE), which systematically increases structural complexity through valid join additions, and Textual Query Augmentation (TQA), which generates controlled natural language perturbations to assess robustness to linguistic variation. JQE and TQA create targeted choke points to challenge specific system components. When applied to state-of-the-art systems, JQE increases query coverage and reveals accuracy degradation as the number of joins grows. Meanwhile, TQA shows that linguistic brittleness induced by heavy abbreviation can reduce accuracy by up to 17%. Beyond evaluation sets, SQLMorph introduces a family of execution-level metrics that address the limitations of current binary measures, such as Execution Accuracy. We define Execution Precision (EXP) and Execution Recall (EXR) to quantify the fraction of correct and recovered results, respectively, and combine them via F1 for unified scoring. Our experiments show that these relaxed metrics enable fine-grained analysis of over- and under-prediction, revealing differences across systems that binary metrics obscure. Together, SQLMorph's query mutation and fine-grained metrics support debugging and better align Text-to-SQL evaluation practices with real-world deployments.

Tue 8 SeptDatabasesArtificial Intelligence
The gist
Text-to-SQL systems help people ask computers questions about databases using everyday language. The authors found existing methods to test these systems aren’t thorough enough, especially when queries become complex or phrased differently. They created SQLMorph, which changes queries in smart ways to see how well systems handle tricky joins and varied language. They also introduced new scoring methods to better understand when parts of answers are right or wrong. This helps developers find weaknesses and improve systems for real-world use.
Open → 2609.08950v1

Streaming algorithms extend vector similarity metrics beyond equality counts

Frequency Moments Beyond Equality: Streaming Cosine Density Moments

Abstract: For a stream of nonzero vectors $x_1,\ldots,x_n\in\mathbb{R}^d$, let $u_i=x_i/\|x_i\|_2$. We define the cosine density of the $i$-th stream element by $D_i:=\sum_{j\in[n]}\langle u_i,u_j\rangle$ and study the density moments $M_p:=\sum_{i\in[n]}D_i^p$ in both the signed- and nonnegative-cosine regimes. These quantities are similarity-aware analogues of classical frequency moments: replacing cosine similarity by equality (that is, $D_i = \sum_{j\in[n]} \mathbf{1}\{u_j = u_i\}$) gives $M_p=F_{p+1}$ and, in particular, $M_{-1}=F_0$, the number of distinct elements. We give one-pass streaming algorithms and lower bounds that are tight or nearly tight in their dependence on the dimension $d$. Our results thus extend several fundamental statistics from the classical data stream literature to cosine similarity, a widely used measure for comparing vector embeddings in modern AI systems. The main challenge in proving a space lower bound for nonnegative cosine is to eliminate unwanted contributions without relying on pairs of opposite vectors. We address this through a construction that we call \emph{equal-sum moment isolation}: two insertion-only prefixes have the same cardinality and vector sum, and a finite-difference comparison cancels their common baseline while isolating the desired higher-order signal. This proof framework may be useful for other insertion-only streaming lower bounds, where direct cancellation is not possible.

Mon 7 SeptData Structures and Algorithms
The gist
When comparing many vectors, it's helpful to know how similar each one is to all the others. Previous methods focused only on counting exact matches, but this paper studies a way to measure similarity using cosine similarity, which captures angle-based closeness. The authors develop streaming algorithms that can calculate these similarity measures efficiently as new vectors arrive, using limited memory. They also prove theoretical limits on how well these calculations can be done, providing a new framework to handle challenging cases when vectors aren't just opposites.
Open → 2609.06925v1