---
title: Virtual Best Encoding (VBE) in ASP
url: https://www.emergentmind.com/topics/virtual-best-encoding-vbe
type: topic
---

# Virtual Best Encoding (VBE) in ASP

Virtual Best Encoding (VBE) is an oracle-style benchmarking measure for comparing multiple encoding variants of the same problem. In the Answer Set Programming (ASP) setting, VBE records, for each benchmark instance, the fastest runtime achieved by any considered encoding, including the original encoding and streamlined variants obtained by adding candidate constraints [2604.19251]. Its principal role is to quantify the attainable “portfolio effect”: the gain that would be available if one could select the best encoding variant on a per-instance basis in advance, even though such oracle selection is not directly deployable [2604.19251].

## 1. Definition and conceptual role

In the ASP formulation, VBE is defined over a set of encodings $\mathcal{E}$ and an instance $i$ by
\[
\mathrm{VBE}(i) = \min_{E \in \mathcal{E}} T(E,i),
\]
where $T(E,i)$ denotes the runtime of encoding $E$ on instance $i$ [2604.19251]. The set $\mathcal{E}$ contains the original encoding and its streamlined variants.

This construction is explicitly a benchmarking device rather than a solver architecture. The paper characterizes VBE as a performance upper bound that would be achievable if, for each instance, one could magically select the fastest encoding variant in advance [2604.19251]. Accordingly, VBE is used to estimate the “portfolio effect” and to demonstrate the complementarity of different streamliners: even when no individual streamliner is uniformly superior, the virtual aggregate may still yield substantial improvements [2604.19251].

A corresponding aggregate measure can be formed over an instance set $\mathcal{I}$:
\[
\mathrm{VBE\_sum} = \sum_{i \in \mathcal{I}} \min_{E \in \mathcal{E}} T(E,i).
\]
For penalized scoring, the paper also describes PAR2-style evaluation, in which timeouts are assigned $2 \times$ the time limit before taking the per-instance minimum [2604.19251].

## 2. Generation of streamlined encodings in ASP

The VBE construction in “Streamliners for Answer Set Programming” is embedded in a fully automated pipeline for generating streamliner constraints with Large Language Models (LLMs) [2604.19251]. The inputs are the original ASP encoding in Clingo format and a small set of satisfiable training instances solvable in seconds [2604.19251].

The prompt asks the LLM to generate five symmetry-breaking or implied Clingo constraints in JSON format, while insisting on syntactic correctness and creativity [2604.19251]. The process adapts the StreamLLM approach, originally designed to generate streamliners for Constraint Programming, to ASP [2604.19251]. Multiple LLMs are sampled randomly for diversity; the examples named in the description are Claude, GPT-5 Mini, Gemini Pro, Mistral, and Deepseek [2604.19251].

The paper emphasizes that the generated constraints are not merely syntactic variants. Different LLMs produce semantically diverse constraints, including symmetry breakers, implied constraints, and occasionally nontrivial or domain-specific pruning rules [2604.19251]. This is presented as evidence that the method captures genuine problem structure rather than superficial reformulation [2604.19251].

## 3. Filtering candidates and selecting the training portfolio

Candidate constraints are subjected to a multi-stage filtering procedure before they contribute to VBE computation. First, baseline runtimes are recorded by running the original encoding on the training instances [2604.19251]. LLM-generated candidates are then screened.

Three classes of candidates are discarded: those that cause syntax errors; those that make any satisfiable training instance unsatisfiable; and those that do not improve runtime on any training instance, equivalently those that degrade performance on all training instances [2604.19251]. Only constraints that improve runtime on at least one training instance are retained [2604.19251].

This search is run iteratively for 30 minutes, accumulating retained streamliners [2604.19251]. If the retained streamliners are denoted $C_1,\ldots,C_k$, then every triple $S=\{C_a,C_b,C_c\}$ is evaluated on the training set through
\[
T_S(i) = \min\!\Big(T(E_0,i),\ T(E_0+C_a,i),\ T(E_0+C_b,i),\ T(E_0+C_c,i)\Big),
\]
where $E_0$ is the original encoding [2604.19251]. The selected triple is
\[
S^* = \arg\min_S \sum_i T_S(i),
\]
that is, the combination of three streamliners minimizing the total runtime over the training instances [2604.19251].

This training-time selection criterion is itself VBE-based: it does not ask for a universally dominant streamliner, but for a small set whose per-instance complementarity yields the strongest aggregate effect [2604.19251].

## 4. Benchmark-time computation and scoring conventions

On the test set, the described procedure runs the original encoding together with the three selected streamlined encodings; the paper’s detailed description also allows optionally running the encoding with all three streamliners together [2604.19251]. For a test instance $i$, the benchmark-time VBE is therefore computed as
\[
\mathrm{VBE}(i) = \min_{E \in \{E_0,\ E_0+C_a,\ E_0+C_b,\ E_0+C_c,\ E_0+C_a+C_b+C_c\}} T(E,i)
\]
in the version that includes the joint encoding [2604.19251].

The total VBE can then be reported either as a sum of runtimes or as a penalized average such as PAR2, with unsolved instances penalized by $2 \times$ the cutoff [2604.19251]. The paper also provides pseudocode reflecting this evaluation pattern: runtime is measured for each encoding on each instance up to a time limit, transformed to a PAR2 value if needed, and minimized across encodings on a per-instance basis [2604.19251].

The methodological significance of this evaluation is that it separates two questions. One concerns whether individual streamliners are useful in isolation; the other concerns whether the family of generated encodings exhibits enough heterogeneity to support a strong virtual portfolio. VBE is designed for the second question [2604.19251].

## 5. Empirical results on ASP Competition benchmarks

The reported experiments use three ASP Competition benchmarks: Partner Units Problem, Sokoban, and Towers of Hanoi [2604.19251]. On these benchmarks, the VBE achieves speedups of up to $4$--$5\times$ over the original encoding [2604.19251].

| Benchmark | Original | Best VBE |
|---|---:|---:|
| Partner Units Problem | 17/26; 13,938 s | 22/26; 3,302 s |
| Sokoban | 12/18; 8,837 s | 14/18; 2,178 s |
| Towers of Hanoi | 31/46; 56,710 s | 46/46; 11,833 s |

For Partner Units Problem, a second run is also reported in which VBE solves 20 instances with a total time of 7,412 s, compared with 13,938 s for the original encoding [2604.19251]. For Sokoban, a second run yields 3,758 s against 8,837 s for the original encoding [2604.19251]. For Towers of Hanoi, the second-run VBE total is 16,053 s against 56,710 s for the original encoding [2604.19251].

Summarized as reductions in total runtime, the reported VBE improvement ranges from 47% to 79%, while often solving more instances than the original encoding [2604.19251]. The abstract compresses this result as speedups of up to 4--5x [2604.19251].

An important empirical observation is that no single streamliner dominates. The fact that VBE outperforms every single streamliner, including combined variants, is presented as evidence that the observed gains arise from complementarity rather than from the existence of one universally superior added constraint [2604.19251].

## 6. Interpretation, significance, and limitations

The empirical behavior of VBE in this setting is tied to the nature of the generated streamliners. The paper states that LLMs can produce syntactically valid and semantically diverse streamliners, and that these constraints can yield real performance improvements even when they are logically redundant or quadratic in grounding size [2604.19251]. It further notes that manual reformulations intended to improve scaling, such as replacing $O(n^2)$ rules with aggregates, sometimes resulted in worse empirical performance [2604.19251]. This suggests that the benchmarked utility of a streamliner is not reducible to a simple syntactic or asymptotic proxy.

The method is also notable for requiring only small training sets and no domain- or encoding-specific templates, in contrast to prior learning methods that need a “language bias” [2604.19251]. In this sense, VBE functions not only as an evaluation metric but also as a diagnostic for whether a template-free streamliner generation process is discovering a useful and diverse encoding family.

The study’s stated efficacy limit is that it is restricted to decision problems; extending the approach to optimization is framed as future work [2604.19251]. Because VBE is oracle-style, it should not be conflated with an online selection policy or a directly executable portfolio solver. Its practical value in the paper is as an upper-bound analysis of attainable gains under perfect per-instance selection [2604.19251].

## 7. Related usages and acronym disambiguation

The phrase “virtual best encoding” also appears in a broader empirical sense outside ASP. In multilingual text classification, the 2017 study by Zhang and LeCun describes a virtual best encoding as a hypothetical aggregate in which an oracle always selects the best encoding method and model for each dataset; the paper does not provide an explicit VBE error figure, but uses the concept to underscore that no single encoding or model is always best across Chinese, English, Japanese, and Korean datasets [1708.02657]. In that usage, the notion is again an oracle upper bound over a family of encodings rather than a deployable fixed method.

The acronym “VBE” is also used for unrelated concepts. In DAO governance research, “Voting-Bloc Entropy” denotes a decentralization metric based on clustering token holders by aligned utility functions across elections [2311.03530; 2509.22620]. In quantum algorithms, “Variational Block-Encoding” denotes a variational method for compiling block-encoding unitaries with near-optimal resource requirements [2507.17658]. These usages are terminologically unrelated to Virtual Best Encoding, even though all three employ the same acronym.

Within the ASP context, however, Virtual Best Encoding has a specific and narrow technical meaning: a per-instance minimum over a set of original and streamlined encodings, used to expose the full portfolio value of LLM-generated streamliner constraints [2604.19251].

Source: https://www.emergentmind.com/topics/virtual-best-encoding-vbe