# Extending GPU Databases with Semantic Queries over Multimodal Data

> GSQ runs semantic SQL with task-specific proxies and served-model fallback. Across 80 proxy-covered workloads, median speedup was 49× against the faster MLLM per workload; proxy accuracy stayed no more than 10 percentage points below omni on 55 of 68 gold-scored tasks.

- arXiv: https://arxiv.org/abs/2612.05153
- Authors: Rathijit Sen, Matteo Interlandi
- Published: 2026-12-04
- Topic: Inference & systems
- Visual carousel: https://instaxiv.com/p/2612.05153
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## What if semantic operators ran beside GPU SQL?

**49×** median speedup vs faster MLLM, 80 workloads

## Semantic SQL splits the database from its AI

**Semantic-query engines:** Most keep relational execution on the CPU; when a GPU is present, it serves the model rather than the database query.

**GPU databases:** They accelerate relational queries but, to the authors’ knowledge, lack first-class semantic operators. GSQ targets that gap.

## One plan, two semantic paths

1. **Lower and route**: T-SQL lowers to GPU relational operators; a static router picks a proxy by operator, modality and predicate intent, not row values.
2. **Proxy or server**: Off-the-shelf, non-generative single-pass proxies, not smaller LLMs, run in-process on the same GPU; uncovered tasks such as OCR use a served model.

## Why short answers hit a serving ceiling

![Figure 2](https://cdn.instaxiv.com/figures/2612.05153/figure2.webp)

On omni/A100, a tiny-prompt, one-token request reaches a measured prefill ceiling of ~686 inferences/s. A DistilBERT proxy avoids autoregressive decoding and reaches ~6K inferences/s. (Figure 2)

## The proxy path stays inside the query

1. **Reuse and prepare**: GSQ evaluates each distinct semantic input once; text tokenization, JPEG decoding and audio features run on GPU where supported.
2. **Return results to SQL**: For selected queries, GPU preparation is up to 4.5× faster than CPU prep for the same proxy; cuDF keeps exact relational SQL semantics.

## The proxy wins throughput across covered workloads

![Figure 5](https://cdn.instaxiv.com/figures/2612.05153/figure5.webp)

Bars compare semantic ops/s for omni, phi4 and per-operator proxies. Labels report task-specific scores; the proxy is faster than the faster MLLM on all 80 workloads it can serve. (Figure 5)

## Quality varies with task fit, especially for ranking

**Accuracy:** Per-operator accuracy was no more than 10 percentage points below omni on 55 of 68 gold-scored tasks, and phi4 on 64.

**Ranking:** The cross-encoder beat phi4 on four of five ranking sets. On HellaSwag’s 200 validation contexts ranking 500 MiniLM candidates, nDCG@10 was 0.418 versus omni’s 0.655.

## A direct comparison with semantic-query systems

**Matched SemBench subset:** On 54 SemBench workloads GSQ could serve with proxies, prompts, outputs and joins were matched to GSQ. LOTUS used an embedding cascade for joins; ThalamusDB issued join requests serially.

**Query-time result:** GSQ was faster on every workload either system ran: median speedup was 118× over LOTUS and 63× over ThalamusDB. Six baseline runs hit 30 minutes, so those ratios are lower bounds.

## Cheap inference can expose relational work

![Figure 7](https://cdn.instaxiv.com/figures/2612.05153/figure7.webp)

Ratios compare GSQ’s GPU path with alternatives. In movie/Q7, the served-MLLM path needs 16,256 inferences and has 0.14% relational time; the proxy path uses 256 DistilBERT inferences and reaches 52.2%, though SQL backend also changes. (Figure 7)

## Blocking turns semantic joins into candidate reranking

1. **Embed records**: MiniLM handles text pairs; CLIP maps text and images into a shared space for cross-modal joins.
2. **Keep top-k**: GPU cosine similarity retains k right-side candidates per left row, shrinking the full cross product before semantic calls.
3. **Rerank survivors**: AI_FILTER scores only candidates: a 925-row text × 923-image join drops from 853,775 pairs to 9,250, about 92× fewer.

## A memory cap contains huge inputs, but slows them

![Figure 9](https://cdn.instaxiv.com/figures/2612.05153/figure9.webp)

On synthetic images, a 2 GiB budget and downscale-on-decode held total GPU memory to 0.65 GiB from 2K to 24K pixels per side. At 4K, throughput was 2.2 vs 74 semantic ops/s without the budget. (Figure 9)

## What these results do not establish

- **Coverage and labels**: Five of 85 workloads had no suitable proxy; five more lacked available gold. On four accuracy tasks, proxies trailed both MLLMs by over 10 percentage points.
- **Join evidence is blocked**: Proxies and MLLMs score the same top-k candidates; no full-cross-product MLLM run tests pairs blocking removes.
- **Scope and budget trade-offs**: GSQ uses one A100; warm timings exclude setup and table loads. Tight budgets reduce throughput, and image downscaling or Wav2CLIP windowing can affect fidelity.

## Key takeaways

- When inference gets cheap, relational execution can become a major query cost.
- Use task-matched, single-pass proxies on the database GPU; keep served models for operators without a suitable proxy.
- Open question: can proxy selection, accuracy targets and join blocking be coordinated to bound answer quality as well as runtime?

## Links

- arXiv: https://arxiv.org/abs/2612.05153
- PDF: https://arxiv.org/pdf/2612.05153

## Citation

```bibtex
@article{sen2026extending,
  title   = {Extending GPU Databases with Semantic Queries over Multimodal Data},
  author  = {Sen, Rathijit and Interlandi, Matteo},
  journal = {arXiv preprint arXiv:2612.05153},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.05153}
}
```
