Skip to content

CADENZA in Action: Breaking the Monolith with Intent-Dependent Plan Spaces for Semantic Queries

Source: arXiv:2607.01468 · Published 2026-07-01 · By Jaehyun Ha, Yongjoo Park, Wook-Shin Han

TL;DR

This paper addresses the challenge of optimizing semantic queries that are specified via natural language intents and executed over multimodal data through various AI models. Existing semantic query processing engines (SQPEs) treat semantic operators as monolithic black boxes implemented by a single model or cascade (e.g., LLMs or embedding models), which creates a trade-off between costly but accurate calls and cheaper but semantically coarse alternatives. The authors propose CADENZA, a novel semantic operator optimizer that decomposes a natural language intent into smaller, interpretable logical steps, then selects and tunes concrete implementations for each step, considering user-specified preferences over quality, latency, and cost.

CADENZA synthesizes multiple candidate logical plans per intent by leveraging LLMs to break down tasks into DAGs of specialized and task-agnostic operators. Each operator is backed by heterogeneous implementations (symbolic, specialized models, general-purpose large models). CADENZA then tunes the routing and backend parameters for each plan using Bayesian optimization on a validation set and selects the best plan under a multi-objective utility that balances accuracy, latency, and cost. Through an interactive demo on an e-commerce product matching scenario with multimodal data, CADENZA demonstrates the ability to find distinct winning plans under different quality–latency–cost trade-offs, significantly outperforming monolithic baseline plans.

Key findings

  • CADENZA achieves a quality (F1) score of 0.82 with latency 566s and cost $0.80 on a SemJoin multimodal benchmark, compared to single-LLM baseline quality 0.76 with 25,323s latency and $2.59 cost (Table 1).
  • Embedding-cascade baseline yields quality 0.63 with latency 4,208s and cost $1.20, showing CADENZA both improves accuracy and reduces latency/cost.
  • Logical planner synthesizes multiple intent decompositions (Figure 1), enabling different visual processing strategies (captioning+NLI, OCR+text similarity, logo detection+text-image similarity).
  • Physical planner constructs routed ensembles per operator, dynamically dispatching inputs to heterogeneous backends based on learned difficulty scores.
  • Multi-objective Bayesian optimization tunes routing thresholds and parameters per plan for best trade-offs given user preferences (quality–latency–cost weights).
  • Under a Balanced preference, the fine-grained logo detection plan wins; under a Budget preference, a cheaper captioning plan becomes optimal (Figure 3f).
  • Plan exploration and refinement techniques synthesize structurally diverse plans starting from LLM-generated seeds and rule-based transformations.
  • Uses proxy-labeled validation sets, either user-provided or oracle-labeled by GPT-4, for scalable plan evaluation without requiring ground truth.

Threat model

The paper does not address an adversarial security threat model. The focus is on optimizing semantic query execution given multimodal data and natural language intents. The "adversary" is implicit as the system designer seeking trade-offs between accuracy, latency, and cost without active attackers manipulating inputs or models.

Methodology — deep read

The threat model assumes a semantic query processing context where the adversary is the system user who provides natural language intents for semantic operators, and the system must optimize these intents over multimodal datasets. There is no active attacker; the focus is on cost-quality-latency trade-offs for query execution rather than traditional security.

The system inputs include: (i) a semantic operator instance (e.g., SemJoin) specified by a natural language intent; (ii) input multimodal relations such as text and images; (iii) an optional validation set labeled for quality measurement; and (iv) user preferences over quality, latency, and cost weights (w_q, w_l, w_c).

CADENZA maintains a catalog of logical operators split into task-specific (e.g., NER, OCR, image captioning, similarity scoring) and task-agnostic (e.g., filter, join) operators. Each task-specific operator supports multiple backend implementations categorized as symbolic (e.g., string match), specialized models (e.g., DeBERTa-NLI, CLIP), general-purpose LLMs (e.g., GPT-4), and composite multi-stage pipelines. Precompiled and on-demand implementations populate the catalog, updated automatically by an integration pipeline.

The logical planner consumes the intent, input schemas, and catalog to produce a small set of seed logical plans. Seeds are generated by prompting an LLM with few-shot examples to produce intent decompositions represented as directed acyclic graphs (DAGs) of operators. Invalid drafts are refined and then expanded via rule-based plan transformations to create multiple candidate logical plans representing alternative decompositions.

For each candidate logical plan, the physical planner binds each operator to candidate implementations. A crucial innovation is the construction of routed ensembles: lightweight difficulty scoring functions extract cheap features from input tuples to route each input to one of N backends. The routing function is generated by prompting an LLM with operator descriptions and ordered backends, yielding code for feature extraction and scoring.

The full physical plan with routing parameters and backend hyperparameters forms a tunable space Θ. CADENZA employs Bayesian optimization on the validation set to tune Θ, optimizing a scalar utility combining quality (e.g., F1) and log-normalized latency and cost by the user’s preference weights. Each tuning trial runs the full physical plan on validation data to measure Q, L, and C.

Evaluation compares CADENZA’s decomposed plans versus monolithic baselines (single LLM, embedding cascades) on SemBench multimodal benchmarking tasks, in particular a SemJoin query on an e-commerce dataset with 100 product descriptions and 100 images. The interactive demo allows users to repeat optimization under different preferences, demonstrating how optimal plans and routing shift depending on trade-offs.

The authors provide open source code and data at the linked GitHub repository. The validation sets can be user-supplied or automatically labeled by an oracle LLM like GPT-4, enabling reproducible tuning. Also, the system architecture supports integration with other SQPEs via lightweight hooks.

Technical innovations

  • Intent-dependent plan synthesis: use LLMs to decompose natural language intents into alternative logical DAG plans rather than treating semantic operators as monolithic black boxes.
  • Routed ensembles per operator: synthesized difficulty-score-based routing functions dispatch inputs across heterogeneous backends (symbolic, specialized models, LLMs) dynamically per tuple.
  • Multi-objective Bayesian tuning of backend routing thresholds and operator parameters under user preferences balancing quality, latency, and cost.
  • Plan exploration via rule-based transformations on LLM-generated seed plans to generate diverse candidate logical plans without extra LLM queries.
  • Interactive web interface allowing data engineers to compose, tune, and compare multiple decomposed semantic query plans, enhancing transparency and practical usability.

Datasets

  • SemBench E-Commerce Scenario — 100 descriptions + 100 images — preloaded demo subset

Baselines vs proposed

  • Single LLM monolithic SemJoin: Quality (F1) = 0.76, Latency = 25,323s, Cost = $2.59 vs CADENZA decomposed Plan C: Quality = 0.82, Latency = 566s, Cost = $0.80
  • Embedding cascade baseline: Quality = 0.63, Latency = 4,208s, Cost = $1.20 vs CADENZA decomposed Plan C: Quality = 0.82, Latency = 566s, Cost = $0.80

Figures from the paper

Figures are reproduced from the source paper for academic discussion. Original copyright: the paper authors. See arXiv:2607.01468.

Fig 3

Fig 3: Demo walkthrough. S1 (a–d): Under Balanced preference, a SemJoin query is decomposed into three plans; Plan C

Fig 2

Fig 2: System architecture of CADENZA.

Fig 1

Fig 1: shows three candidates for our running example; all

Fig 4

Fig 4 (page 3).

Fig 5

Fig 5 (page 3).

Fig 6

Fig 6 (page 3).

Fig 7

Fig 7 (page 3).

Fig 8

Fig 8 (page 3).

Limitations

  • Demonstration primarily on a single e-commerce SemJoin scenario; unclear generalization to other semantic operators or larger-scale datasets.
  • Proxy-labeled validation sets rely on oracle LLMs like GPT-4; quality depends on proxy label accuracy and may introduce noise.
  • No formal adversarial robustness evaluation or security analysis of operator routing decisions or intent decompositions.
  • Latency (566s) remains high for real-time use cases; cost savings depend on efficient backend invocation at scale.
  • Current plan exploration is limited to rule-based expansions; potential to miss optimal plans needing more advanced synthesis.
  • Routing synthesized by LLM prompts may not be fully interpretable or guarantee optimal dispatch.

Open questions / follow-ons

  • How well does CADENZA scale and generalize to other semantic operators and more diverse multimodal datasets beyond the e-commerce scenario?
  • Can the proxy-labeling approach be improved or replaced with low-cost ground truth acquisition to increase tuning fidelity?
  • What methods could formally verify or explain the LLM-synthesized routing functions for interpretability and trust?
  • Could adversarial inputs or noisy intents cause performance degradation, and how might robustness be improved?

Why it matters for bot defense

This work introduces a novel paradigm for decomposing complex, intent-driven semantic queries into modular plans that can be flexibly optimized across heterogeneous backends. For bot-defense and CAPTCHA practitioners, insights from CADENZA’s approach could inspire more nuanced challenges that dynamically adapt difficulty based on user input complexity and contextual intent. Instead of monolithic challenge evaluation, systems might route intent-specific subtasks to custom detectors or classifiers, optimizing for security and latency trade-offs.

Moreover, the multi-objective tuning framework balancing quality and cost under user preferences offers a template to optimize CAPTCHA challenge selection and AI-detection pipelines in practical deployments. CADENZA’s approach to modeling and composing multiple specialized operators could inform bot-defense strategies that combine distinct signals (e.g., image recognition, textual entailment) flexibly rather than relying on single black-box classifiers. Finally, the paper's emphasis on transparent plan exploration and user-controllable preferences aligns well with the needs for interpretable and adaptable bot-defense systems in production.

Cite

bibtex
@article{arxiv2607_01468,
  title={ CADENZA in Action: Breaking the Monolith with Intent-Dependent Plan Spaces for Semantic Queries },
  author={ Jaehyun Ha and Yongjoo Park and Wook-Shin Han },
  journal={arXiv preprint arXiv:2607.01468},
  year={ 2026 },
  url={https://arxiv.org/abs/2607.01468}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution