SearcharxivSearch

arXiv subjects

Kyoungmin Kim

Publications and source records attributed to Kyoungmin Kim.

At least 19 recordsLinked to original sources

Confining Nondeterminism: AI-Driven Research Systems as DBMSs for Reliable, Non-Wasteful, Transparent, and Collaborative Research [Vision]

LLM agents that conduct research (proposing ideas, writing and running code, analyzing results) can already carry a study from research question to figures, yet cannot be fully trusted. The same question asked twice in a row returns different answers; the agent announces a number that no execution produced, and tool use does not prevent this, because nothing binds what the agent reports to what its tools returned; a small upstream change leaves downstream results silently stale, with no way to list which ones; and the agent re-runs preprocessing and rewrites code it has already produced. We argue these failures share one root: every step of today's agent loop is a stochastic LLM call whose internal state nobody, including the agent, can check. Rather than trying to see inside the LLM, we take a lesson from databases, which earn trust without being watched, because deterministic operators over well-defined state make their guarantees hold by construction. We propose organizing a research project the same way. The project lives in a deterministic, versioned dataflow engine (in effect, a query plan over materialized views), and the LLM, together with the user, is a stochastic compiler that may only edit that plan. The executor never calls the LLM; LLM output enters only as versioned code and data that the executor then runs, and any asserted result enters the record only with an execution behind it. Five design rules at this boundary turn familiar database machinery, from versioning and provenance to incremental maintenance and cost-based scheduling, into guarantees that make research reliable, non-wasteful, transparent, and collaborative. This report presents the diagnosis, the requirements, and the design; the guarantee walkthrough, a prototype, and the research agenda appear in the full version, in preparation. The LLM, we argue, should be the query compiler, never the executor.

cs.DB

Fast LLM-Based Semantic Filtering: From a Unified Framework to an Adaptive Two-Phase Method

Evaluating a natural-language yes/no predicate over a document corpus under an accuracy target - the semantic filter - is a cornerstone of LLM-based data processing. Calling the LLM on every document (the oracle) is prohibitive, so cascades pair the oracle with a fast proxy. As deployed today, they leave four limitations on the table. (1) Each cascade family - model-free clustering, prebuilt small-LLM proxies, online-trained proxies - commits to a single representation and pipeline, and wins on only a narrow query regime. (2) The strongest online proxy invests in a custom training scheme on a bi-encoder over dense embeddings, missing the token-level evidence richer predicates require. (3) The proxy is trained against binary yes/no labels, wasting the LLM's per-document confidence at the boundary documents it most needs to learn. (4) Existing calibrations add a uniform safety margin, conflating genuine proxy uncertainty with small-sample noise and inflating cascade cost. We address these by (1) composing families adaptively - model-free clustering first, online proxy only when needed, with oracle calls shared across phases; (2) replacing the cosine bi-encoder with a hybrid of off-the-shelf token-aware models; (3) training the proxy with the oracle's per-document confidence as a soft label; and (4) a calibration that adds the safety margin only where the labeled sample is sparse. We are also the first to use the oracle's per-document confidence for three purposes: a query-level difficulty compass, a lower bound on the minimum oracle calls any proxy-based cascade can make, and the proxy's soft training label. At a 90% accuracy target on three 10K-document corpora, our methods are 1.6-2.0x faster than the best prior method per corpus and meet the target on 95% of queries; the BER-derived lower bound indicates a further ~4-20x of headroom for future work.

cs.DB

Fast Approximate Vector Joins via Offline-Online Co-Design

Vector joins - finding all vector pairs between a set of query and data vectors whose distances are below a given threshold - are fundamental to modern vector and vector-relational database systems that power multimodal retrieval and semantic analytics. Existing state-of-the-art approach exploits work sharing among similar queries but still suffers from redundant index traversals and excessive distance computations. We propose a unified framework for efficient approximate vector joins that (1) introduces soft work sharing to reuse traversal results beyond the join results of previous queries, (2) builds a merged index over both query and data vectors to further speedup graph explorations, (3) improves robustness for out-of-distribution queries through an adaptive hybrid search strategy, and (4) further optimizes all these as offloading only the necessary online overhead to offline while minimizing maintenance cost. Experiments on eight datasets demonstrate substantial improvements in efficiency-recall trade-off over the state of the art.

cs.DB

QVCache: A Query-Aware Vector Cache

Vector databases have become a cornerstone of modern information retrieval, powering applications in recommendation, search, and retrieval-augmented generation (RAG) pipelines. However, scaling approximate nearest neighbor (ANN) search to high recall under strict latency SLOs remains fundamentally constrained by memory capacity and I/O bandwidth. Disk-based vector search systems suffer severe latency degradation at high accuracy, while fully in-memory solutions incur prohibitive memory costs at billion-scale. Despite the central role of caching in traditional databases, vector search lacks a general query-level caching layer capable of amortizing repeated query work. We present QVCache, the first backend-agnostic, query-level caching system for ANN search with bounded memory footprint. QVCache exploits semantic query repetition by performing similarity-aware caching rather than exact-match lookup. It dynamically learns region-specific distance thresholds using an online learning algorithm, enabling recall-preserving cache hits while bounding lookup latency and memory usage independently of dataset size. QVCache operates as a drop-in layer for existing vector databases. It maintains a megabyte-scale memory footprint and achieves sub-millisecond cache-hit latency, reducing end-to-end query latency by up to 40-1000x when integrated with existing ANN systems. For workloads exhibiting temporal-semantic locality, QVCache substantially reduces latency while preserving recall comparable to the underlying ANN backend, establishing it as a missing but essential caching layer for scalable vector search.

cs.DB

Composition laws of binary quadratic forms and isolations of quadratic forms

A positive definite and integral quadratic form $f$ is called irrecoverable if there is a quadratic form $F$ such that it represents all proper subforms of $f$, whereas it does not represent $f$ itself. In this case, $F$ is called an isolation of $f$. In this article, we prove that there does not exist a binary isolation of any unary quadratic form. We also prove that there does not exist a ternary isolation of any binary quadratic form. Furthermore, if the form class group of a primitive binary quadratic form has no element of order $4$, then the discriminant of any quaternary isolation of it, if exists, is a square of an integer. The composition laws of primitive binary quadratic forms play an essential role in the proofs of the results.

math.NT

Sums of squares of integers except for a fixed one

In this article, we study a sum of squares of integers except for a fixed one. For any nonnegative integer $n$, we find the minimum number of squares of integers except for $n$ whose sums represent all positive integers that are represented by a sum of squares except for it. This problem could be considered as a generalization of Dubouis's result for the case when $n=0$.

math.NT

Trustworthy and Efficient LLMs Meet Databases

In the rapidly evolving AI era with large language models (LLMs) at the core, making LLMs more trustworthy and efficient, especially in output generation (inference), has gained significant attention. This is to reduce plausible but faulty LLM outputs (a.k.a hallucinations) and meet the highly increased inference demands. This tutorial explores such efforts and makes them transparent to the database community. Understanding these efforts is essential in harnessing LLMs in database tasks and adapting database techniques to LLMs. Furthermore, we delve into the synergy between LLMs and databases, highlighting new opportunities and challenges in their intersection. This tutorial aims to share with database researchers and practitioners essential concepts and strategies around LLMs, reduce the unfamiliarity of LLMs, and inspire joining in the intersection between LLMs and databases.

cs.DB

Saving GPU Hours in LLM Inference System Development and Online Workloads with Simulation and DBMS-Inspired Cache Replacement Policies

LLMs are increasingly used world-wide from daily tasks to agentic systems and data analytics, requiring significant GPU resources. While LLM inference systems are capable of serving millions of requests from multiple users, they often lack theoretical models to determine whether they achieve the performance upper bounds of underlying hardware resources. Beyond online workload serving, merely analyzing existing systems-or developing yet another one-is both GPU-intensive and labor-intensive. This paper provides a comprehensive survey of LLM inference systems, focusing on their cache management policies and availability. We then show that simulations can be an effective tool to save GPU hours in the development and analysis phase of inference systems, revealing useful insights for developing better inference techniques, unlike how existing studies used simulations to find the best parameters inside a given system. Finally, we provide theoretical tools to estimate the optimal performance and formulate new ideas. Based on the theoretical analysis, especially on the cache management in LLM inference, we propose a simple yet effective cache replacement policy that can be easily plugged into existing preemptive schedulers and systems. We show that such a simple policy inspired from database systems can substantially save GPU hours in actual inference systems on online workloads. We share our experience submitting a journal paper to a database venue in November 2025 for anyone considering a similar path.

cs.PF

Isolations of the sum of two squares from its proper subforms

For a (positive definite and integral) quadratic form $f$, a quadratic form is said to be {\it an isolation of $f$ from its proper subforms} if it represents all proper subforms of $f$, but not $f$ itself. It was proved that the minimal rank of isolations of the square quadratic form $x^2$ is three, and there are exactly $15$ ternary diagonal isolations of $x^2$. Recently, it was proved that any quaternary quadratic form cannot be an isolation of the sum of two squares $I_2=x^2+y^2$, and there are quinary isolations of $I_2$. In this article, we prove that there are at most $231$ quinary isolations of $I_2$, which are listed in Table $1$. Moreover, we prove that $14$ quinary quadratic forms with dagger mark in Table $1$ are isolations of $I_2$.

math.NT

Guaranteeing the Õ(AGM/OUT) Runtime for Uniform Sampling and OUT Size Estimation over Joins

We propose a new method for estimating the number of answers OUT of a small join query Q in a large database D, and for uniform sampling over joins. Our method is the first to satisfy all the following statements. - Support arbitrary Q, which can be either acyclic or cyclic, and contain binary and non-binary relations. - Guarantee an arbitrary small error with a high probability always in Õ(AGM/OUT) time, where AGM is the AGM bound OUT (an upper bound of OUT), and Õ hides the polylogarithmic factor of input size. We also explain previous join size estimators in a unified framework. All methods including ours rely on certain indexes on relations in D, which take linear time to build offline. Additionally, we extend our method using generalized hypertree decompositions (GHDs) to achieve a lower complexity than Õ(AGM/OUT) when OUT is small, and present optimization techniques for improving estimation efficiency and accuracy.

cs.DB

Primitively universal quaternary quadratic forms

A (positive definite and integral) quadratic form $f$ is said to be $\textit{universal}$ if it represents all positive integers, and is said to be $\textit{primitively universal}$ if it represents all positive integers primitively. We also say $f$ is $\textit{primitively almost universal}$ if it represents almost all positive integers primitively. Conway and Schneeberger proved (see [1]) that there are exactly $204$ equivalence classes of universal quaternary quadratic forms. Recently, Earnest and Gunawardana proved in [4] that among $204$ equivalence classes of universal quaternary quadratic forms, there are exactly $152$ equivalence classes of primitively almost universal quaternary quadratic forms. In this article, we prove that there are exactly $107$ equivalence classes of primitively universal quaternary quadratic forms. We also determine the set of all positive integers that are not primitively represented by each of the remaining $152-107=45$ equivalence classes of primitively almost universal quaternary quadratic forms.

math.NT

[Technical Report] Combining Sampling and Synopses with Worst-Case Optimal Runtime and Quality Guarantees for Graph Pattern Cardinality Estimation

Graph pattern cardinality estimation is the problem of estimating the number of embeddings of a query graph in a data graph. This fundamental problem arises, for example, during query planning in subgraph matching algorithms. There are two major approaches to solving the problem: sampling and synopsis. Synopsis (or summary)-based methods are fast and accurate if synopses capture information of graphs well. However, these methods suffer from large errors due to loss of information during summarization and inherent assumptions. Sampling-based methods are unbiased but suffer from large estimation variance due to large sample space. To address these limitations, we propose Alley, a hybrid method that combines both sampling and synopses. Alley employs 1) a novel sampling strategy, random walk with intersection, which effectively reduces the sample space, 2) branching to further reduce variance, and 3) a novel mining approach that extracts and indexes tangled patterns as synopses which are inherently difficult to estimate by sampling. By using them in the online estimation phase, we can effectively reduce the sample space while still ensuring unbiasedness. We establish that Alley has worst-case optimal runtime and approximation quality guarantees for any given error bound $ε$ and required confidence $μ$. In addition to the theoretical aspect of Alley, our extensive experiments show that Alley outperforms the state-of-the-art methods by up to orders of magnitude higher accuracy with similar efficiency.

cs.DB

Minimal universality criterion sets on the representations of quadratic forms

For a set $S$ of (positive definite and integral) quadratic forms with bounded rank, a quadratic form $f$ is called $S$-universal if it represents all quadratic forms in $S$. A subset $S_0$ of $S$ is called an $S$-universality criterion set if any $S_0$-universal quadratic form is $S$-universal. We say $S_0$ is minimal if there does not exist a proper subset of $S_0$ that is an $S$-universality criterion set. In this article, we study various properties of minimal universality criterion sets. In particular, we show that for `most' binary quadratic forms $f$, minimal $S$-universality criterion sets are unique in the case when $S$ is the set of all subforms of the binary form $f$.

math.NT

Prime-universal diagonal quadratic forms

A (positive definite and integral) quadratic form is said to be $\textit{prime-universal}$ if it represents all primes. Recently, Doyle and Williams in [2] classified all prime-universal diagonal ternary quadratic forms, and all prime-universal diagonal quaternary quadratic forms under two conjectures proposed by themselves. In this article, we classify all prime-universal diagonal quadratic forms regardless of ranks. Furthermore, we prove, so called, $67$-Theorem for a diagonal quadratic form to be prime-universal.

math.NT

Quadratic forms with a strong regularity property on the representations of squares

A (positive definite and non-classic integral) quadratic form is called strongly $s$-regular if it satisfies a strong regularity property on the number of representations of squares of integers. In this article, we prove that for any integer $k \ge 2$, there are only finitely many isometry classes of strongly $s$-regular quadratic forms with rank $k$ if the minimum of the nonzero squares that are represented by them is fixed.

math.NT

The number of representations of squares by integral quaternary quadratic forms

Let $f$ be a positive definite (non-classic) integral quaternary quadratic form. We say $f$ is strongly $s$-regular if it satisfies a regularity property on the number of representations of squares of integers. In this article, we prove that there are only finitely many strongly $s$-regular quaternary quadratic forms up to isometry if the minimum of the nonzero squares that are represented by the quadratic form is fixed. Furthermore, we show that there are exactly $34$ strongly $s$-regular diagonal quaternary quadratic forms representing one (see Table $1$). In particular, we use eta-quotients to prove the strongly $s$-regularity of the quaternary quadratic form $x^2+2y^2+3z^2+10w^2$, which is, in fact, of class number $2$ (see Lemma $5.5$ and Proposition $5.6$).

math.NT

A sum of squares not divisible by a prime

Let $p$ be a prime. We define $S(p)$ the smallest number $k$ such that every positive integer is a sum of at most $k$ squares of integers that are not divisible by $p$. In this article, we prove that $S(2)=10$, $S(3)=6$, $S(5)=5$, and $S(p)=4$ for any prime $p$ greater than $5$. In particular, it is proved that every positive integer is a sum of at most four squares not divisible by $5$, except the unique positive integer $79$.

math.NT

Spinor representations of positive definite ternary quadratic forms

For a positive definite integral ternary quadratic form $f$, let $r(k,f)$ be the number of representations of an integer $k$ by $f$. The famous Minkowski-Siegel formula implies that if the class number of $f$ is one, then $r(k,f)$ can be written as a constant multiple of a product of local densities which are easily computable. In this article, we consider the case when the spinor genus of $f$ contains only one class. In this case the above also holds if $k$ is not contained in a set of finite number of square classes which are easily computable (see, for example, \cite{sp1} and \cite {sp2}). By using this fact, we prove some extension of the results given in both \cite {cl} on the representations of generalized Bell ternary forms and \cite {be} on the representations of ternary quadratic forms with some congruence conditions.

math.NT