betaFeedback

WorksComputer Science

Breaking the Binary-Lifting Barrier for DNA Minimizer Density: Exact Optimization of a Native 4-ary Order at (w, k) = (12, 5)

Abstract

Minimizer schemes sample at least one kk-mer from every window of ww consecutive kk-mers via a total order ππ on ΣkΣ^k. For DNA (σ=4σ= 4), state-of-the-art lookup schemes such as GreedyMini and OptMini optimize a binary order (2k2^k ranks) and lift it to ΣkΣ^k by ranking one bit-plane primarily and breaking 2k2^k-way ties lexicographically on the other bit-plane. At (w,k)=(12,5)(w, k) = (12, 5), this projection locks sets of 3232 DNA 55-mers into contiguous blocks and restricts the active universal hitting set (UHS) prefix to 448448 of 10241024 55-mers, giving exact expected DNA density 2246214544/234≈0.13074689452246214544 / 2^{34} \approx 0.1307468945 for OptMini (k5-w12-13.txt) and 2248978620/234≈0.13090778492248978620 / 2^{34} \approx 0.1309077849 for GreedyMini (w12_k5.gm). We bypass binary lifting and optimize directly over native 44-ary permutations (∣Σk∣=1024|Σ^k| = 1024) from scratch via: (i) an exact de Bruijn endpoint transfer-matrix dynamic program over B(4,4)B(4, 4) (256256 states), (ii) a weighted set-cover ratio initializer (SetCover4) producing a compact U=314U = 314 UHS prefix, (iii) bitmask-sparse simulated annealing preserving the zero-cost ww-walk-free tail invariant, and (iv) two-pass O(N)O(N) exact best-insertion sweeps with large-neighborhood ruin-and-recreate search. The resulting explicit 44-ary order achieves exact expected DNA density 2234289615/234≈0.1300527722922234289615 / 2^{34} \approx 0.130052772292 (density factor 1.6906861.690686), cutting charged windows by 1192492911924929 contexts (−0.530890%-0.530890\% relative) below OrensteinLab/Minimizers and 1468900514689005 (−0.653141%-0.653141\%) below w12_k5.gm at 82008200-byte lookup storage (12801280 bytes bit-packed). Warm-start relaxation stalls at U=379U = 379 (0.13017287890.1301728789), whereas native 44-ary initialization breaks 32/3232/32 high-bit blocks across all 2+22+2 nucleotide partitions.

Introduction

Minimizers [1] are a foundational local kk-mer sampling primitive in sequence alignment, sketching, and de novo assembly. Given an alphabet Σ\Sigma of size σ\sigma, window length w≥2w\ge2, kk-mer length k≥1k\ge1, and a total order π:Σk→{0,…,σk−1}\pi:\Sigma^k\to\{0,\ldots,\sigma^k-1\}, each window of ww consecutive kk-mers (spanning w+k−1w+k-1 bases) selects the position of its minimum-rank kk-mer under leftmost tie-breaking. The expected density d(π;w,k)d(\pi;w,k) is the probability over an i.i.d. uniform random sequence in Σ∗\Sigma^* that consecutive windows select distinct positions. Lowering d(π;w,k)d(\pi;w,k) directly reduces index memory and downstream query cost.

In the DNA setting (σ=4\sigma=4, Σ={A,C,G,T}\Sigma=\{\mathrm{A},\mathrm{C},\mathrm{G},\mathrm{T}\}), exact optimization faces a factorial state space of (4k)!(4^k)!. Existing state-of-the-art table-based minimizers sidestep this scaling by first constructing low-density orders over the binary alphabet (σ=2\sigma=2, size 2k2^k) using greedy selection (GreedyMini [3]) or branch-and-bound dynamic programming (OptMini [5]), whose exact solver covers binary k≤6k\le6 and DNA k=2k=2, and then lifting the binary order to Σk\Sigma^k by ranking one bit-plane primarily and breaking ties lexicographically on the second bit-plane. Meanwhile, constant-space schemes such as mod-minimizers [4], decycling orders [2], and 10-minimizers/spacers [6] trade higher density at moderate (w,k)(w,k) for O(1)O(1) description length.

At (w,k)=(12,5)(w,k)=(12,5), every precomputed binary-lifted order in OrensteinLab’s 10-minimizers [6] and Minimizers [3, 5] repositories groups DNA 5-mers into 32 rigid classes of size 32. Because 45=1,0244^5=1{,}024 remains compact enough for microsecond-scale exact transfer-matrix evaluation over the 4-ary de Bruijn graph B(4,4)B(4,4) (M=256M=256 vertices), we investigate direct optimization over native 4-ary permutations without binary projection or seeding from published tables.

Preliminaries and Exact De Bruijn Formulation

Definition 1 (Charged Context and Density). Encode Σ={A,C,G,T }\Sigma=\{\mathrm{A},\mathrm{C},\mathrm{G},\mathrm{T}\ \} as {0,1,2,3}\{0,1,2,3\} with the most-significant base first, identifying each kk-mer with u∈{0,…,4k−1}u\in\{0,\ldots,4^k-1\}. Let π:{0,…,4k−1}→{0,…,4k−1}\pi:\{0,\ldots,4^k-1\}\to\{0,\ldots,4^k-1\} be a bijection. A DNA context C∈Σw+kC\in\Sigma^{w+k} specifies w+1w+1 consecutive kk-mers (x0,x1,…,xw)(x_0,x_1,\ldots,x_w) spanning two adjacent windows W0=(x0,…,xw−1)W_0=(x_0,\ldots,x_{w-1}) and W1=(x1,…,xw)W_1=(x_1,\ldots,x_w). Under leftmost tie-breaking,

M(W0)=min⁡arg⁡min⁡0≤i<wπ(xi),M(W1)=1+min⁡arg⁡min⁡0≤i<wπ(xi+1).M(W_0)=\min\mathop{\arg\min}_{0\le i<w}\pi(x_i),\qquad M(W_1)=1+\min\mathop{\arg\min}_{0\le i<w}\pi(x_{i+1}).

The context CC is charged if and only if M(W0)≠M(W1)M(W_0)\ne M(W_1). The exact expected DNA density is d(π;w,k)=C(π)/4w+kd(\pi;w,k)=C(\pi)/4^{w+k}, where C(π)C(\pi) is the number of charged contexts in Σw+k\Sigma^{w+k}, and the density factor is (w+1)⋅d(π;w,k)(w+1)\cdot d(\pi;w,k).

Theorem 1 (Disjoint Endpoint Decomposition on B(4,k−1)B(4,k-1)). Let N=4kN=4^k and M=4k−1M=4^{k-1}. Identify each kk-mer uu with the directed edge src⁡(u)→dst⁡(u)\operatorname{src}(u)\to\operatorname{dst}(u) in the de Bruijn graph B(4,k−1)B(4,k-1), where src⁡(u)=⌊u/4⌋\operatorname{src}(u)=\lfloor u/4\rfloor and dst⁡(u)=u mod M\operatorname{dst}(u)=u\bmod M. For each rank r∈{0,…,N−1}r\in\{0,\ldots,N-1\}, let ur=π−1(r)u_r=\pi^{-1}(r) and define G≥rG_{\ge r} (resp. G>rG_{>r}) as the subgraph of B(4,k−1)B(4,k-1) containing all edges usu_s with s≥rs\ge r (resp. s>rs>r). Then the exact charged context count satisfies

C(π)=∑r=0N−1cr(π),cr(π)=Left⁡w(ur,G≥r)+Right⁡w(ur,G>r),C(\pi)=\sum_{r=0}^{N-1}c_r(\pi),\qquad c_r(\pi)=\operatorname{Left}_w(u_r,G_{\ge r})+\operatorname{Right}_w(u_r,G_{>r}),

where Left⁡w(ur,G≥r)\operatorname{Left}_w(u_r,G_{\ge r}) is the number of length- ww directed walks in G≥rG_{\ge r} starting at dst⁡(ur)\operatorname{dst}(u_r), and Right⁡w(ur,G>r)\operatorname{Right}_w(u_r,G_{>r}) is the number of length- ww directed walks in G>rG_{>r} ending at src⁡(ur)\operatorname{src}(u_r).

Proof. A context C=(x0,…,xw)C=(x_0,\ldots,x_w) fails to charge if and only if M(W0)=M(W1)∈{1,…,w−1}M(W_0)=M(W_1)\in\{1,\ldots,w-1\}. Let j∗=min⁡arg⁡min⁡0≤j≤wπ(xj)j^*=\min\mathop{\arg\min}_{0\le j\le w}\pi(x_j) be the leftmost occurrence of the global minimum rank r=min⁡0≤j≤wπ(xj)r=\min_{0\le j\le w}\pi(x_j) in CC. If 1≤j∗≤w−11\le j^*\le w-1, then xj∗x_{j^*} lies in both W0W_0 and W1W_1, strictly beats every kk-mer to its left, and weakly beats every kk-mer to its right, forcing M(W0)=j∗=M(W1)M(W_0)=j^*=M(W_1) (uncharged). Conversely, if j∗=0j^*=0, then M(W0)=0≠M(W1)≥1M(W_0)=0\ne M(W_1)\ge1 (charged, with x0=urx_0=u_r and π(xi)≥r\pi(x_i)\ge r for all 1≤i≤w1\le i\le w), corresponding bijectively to length-ww walks from dst⁡(ur)\operatorname{dst}(u_r) in G≥rG_{\ge r}. If j∗=wj^*=w, then M(W0)≤w−1<w=M(W1)M(W_0)\le w-1<w=M(W_1) (charged, with xw=urx_w=u_r and π(xi)>r\pi(x_i)>r for all 0≤i≤w−10\le i\le w-1, corresponding bijectively to length-ww walks into src⁡(ur)\operatorname{src}(u_r) in G>rG_{>r}). Because j∗=0j^*=0 and j∗=wj^*=w are mutually exclusive and partition every charged context uniquely by r=π(xj∗)r=\pi(x_{j^*}), summing over r=0,…,N−1r=0,\ldots,N-1 is exact. □\square

Proposition 1 (Zero-Cost Tail Invariance and Active UHS Prefix). Define the active UHS cutoff U(π)=min⁡{U∈{0,…,N}:G≥U has no directed walk of length w}U(\pi)=\min\{U\in\{0,\ldots,N\}:G_{\ge U}\text{ has no directed walk of length }w\}. Then cr(π)=0c_r(\pi)=0 for all r≥U(π)r\ge U(\pi), and permuting {uU(π),…,uN−1}\{u_{U(\pi)},\ldots,u_{N-1}\} among ranks ≥U(π)\ge U(\pi) leaves C(π)C(\pi) invariant. Moreover,

swapping any active element a<U(π)a < U(\pi) with any tail element b≥U(π)b \ge U(\pi) via the rank-neutral tail swap (b↔U(π))(b \leftrightarrow U(\pi)) followed by (a↔U(π))(a \leftrightarrow U(\pi)) guarantees G>U(π)=G≥U(π)Gold∖{ub}G_{>U(\pi)} = G^{\mathrm{Gold}}_{\ge U(\pi)} \setminus\{u_b\} remains ww-walk-free, so only contributions crc_r for r∈[a,U(π)]r \in[a, U(\pi)] need recomputation.

Cold-Start Native 4-ary Optimization Pipeline

To avoid inheriting the structural bias of binary-lifted orders, we build our (w,k)=(12,5)(w,k)=(12,5) solution from scratch in pure C (-O3) with zero published seeds:

  1. Weighted Set-Cover Ratio Initialization (SetCover4). Starting from the complete graph B(4,4)B(4,4) (r=0→N−1r=0 \to N-1), placing edge u=(src→dst)u=(\mathrm{src}\to\mathrm{dst}) at rank rr settles every (w+1)(w+1)-edge walk containing uu in the active graph GG. Let fwdt[v]\mathrm{fwd}_t[v] and bwdt[v]\mathrm{bwd}_t[v] denote length-tt walks starting/ending at vv in GG. The newly covered context volume through uu is approximately cover⁡(u)=∑a=0wbwda[src]⋅fwdw−a[dst]\operatorname{cover}(u)=\sum_{a=0}^{w}\mathrm{bwd}_a[\mathrm{src}]\cdot\mathrm{fwd}_{w-a}[\mathrm{dst}], while its boundary charge is bounded by charge⁡(u)=fwdw[dst]+bwdw[src]\operatorname{charge}(u)=\mathrm{fwd}_w[\mathrm{dst}]+\mathrm{bwd}_w[\mathrm{src}]. Greedily selecting the unplaced edge minimizing (charge⁡(u)+1)/(cover⁡(u)+1)p(\operatorname{charge}(u)+1)/(\operatorname{cover}(u)+1)^p and sweeping p∈[0.70,1.50]p\in[0.70,1.50] stops as soon as cover⁡(u)=0\operatorname{cover}(u)=0 everywhere, yielding an immediate ww-walk-free tail. At p=1.20p=1.20, SetCover4 produces an initial order in ∼0.1\sim0.1 s with U=314U=314 and exact density 2,262,316,943/234≈0.13168417752{,}262{,}316{,}943/2^{34}\approx0.1316841775.

  1. Bitmask-Sparse Compact-UHS Simulated Annealing (opt_4ary_fast). Representing active vertices in B(4,4)B(4,4) as four 64-bit words with ctz bit-scanning accelerates Theorem 1 to thousands of range evaluations per second. Four move operators run over four reheated annealing cycles: short/medium swaps in [0,U−1][0,U-1], critical-path tournament-selected insertions in [0,U−1][0,U-1], exact active-to-tail swaps leveraging Proposition 1, and tail promotions/ejections. Over 180 s (964,305 exact evaluations), this lowers the cold-start seed to 2,235,898,047/234≈0.13014639542{,}235{,}898{,}047/2^{34}\approx0.1301463954.

  1. Two-Pass O(N)O(N) Exact Best-Insertion Sweep + LNS (exact_lns_insert). Evaluating relocating a single 5-mer x=π−1(a)x=\pi^{-1}(a) to all N=1,024N=1{,}024 candidate ranks b∈{0,…,N−1}b\in\{0,\ldots,N-1\} requires only two linear DP sweeps over B(4,4)B(4,4): Pass 1 evaluates xx and suffix elements without xx across i=N−2→0i=N-2\to0 (reusing ci+1c_{i+1} for i≥ai\ge a), and Pass 2 evaluates prefix elements with xx inserted across i=N−2→ai=N-2\to a (reusing cic_i for i<ai<a). Each candidate rank bb is then scored in O(1)O(1) as pref⁡[b]+cx(b)+suff⁡[b]\operatorname{pref}[b]+c_x(b)+\operatorname{suff}[b]. One exhaustive sweep over all 1,024 elements (1,048,576 candidate placements) executes in ∼7\sim7 s. Coupled with gap-1...6 pairwise swaps and large-neighborhood ruin-and-recreate kicks (8–28 elements), this clears the −0.5%-0.5\% bar within 11 s (2,234,607,526) and converges after an additional 150 s polish to 2,234,289,615/234≈0.1300527722922{,}234{,}289{,}615/2^{34}\approx0.130052772292 (U=314U=314).

Results and Comparison Against Published Tables

Table 1 summarizes the exact expected DNA density over all 417=17,179,869,1844^{17}=17{,}179{,}869{,}184 contexts at (w,k)=(12,5)(w,k)=(12,5) across our cold-start order, an ablated warm-start relaxation from k5-w12-13.txt, and every published comparator from the 10-minimizers (commit 916daeab), GreedyMini (commit 0ea10d3), and Minimizers (commit 7b9430f) repositories of OrensteinLab. All binary orders are lifted to DNA under the repositories’ exact convention (primary rank on the odd/high bit-plane, secondary lexicographic tie-breaking on the even/low bit-plane, leftmost window tie-breaking); we verified exhaustively that both k5-w12-13.txt and w12_k5.gm are binary UHSs for (12,5)(12,5) and yield identical numerators across all six bit-plane tie-breaking variants, and that k5-w12-13.txt is strictly minimal across all 57 k=5k = 5 rows in best-orders.csv (Minimizers).

Scheme / OrderCharged (/234/2^{34})Density ddFactor (w+1)d(w+1)dOur Rel. Δ\Delta
Native 4-ary cold-start (this work)2,234,289,6150.13005277231.690686—
Native 4-ary warm-start (U=379U = 379)2,236,353,0300.13017287891.692247−0.09227%
Minimisers k5-w12-13.txt (OptMini)2,246,214,5440.13074689451.699710−0.530890%
10-minimisers w12_k5.gm (GreedyMini)2,248,978,6200.13090778491.701801−0.653141%
k_extension_k16_w12.csv (GreedyMini)—0.1309081.701804−0.653304%
angle-based (10-minimisers CSV)—0.136221051.770874−4.528138%
one_zero_dna (WABI 2026 spacer)2,357,004,4630.13719571661.783544−5.206391%
abb_plus_dna (WABI 2026 ABB+)2,359,463,9630.13733887831.785405−5.305201%
double decycling (10-minimisers CSV)—0.1396621.815606−6.880345%
decycling (10-minimisers CSV)—0.1397251.816425−6.922332%
open-close-syncmer / miniception / mod—0.1533051.992965−15.167299%

Table 1. Exact and table-listed expected DNA minimizer densities at (w,k)=(12,5)(w, k) = (12, 5) over Σ={A,C,G,T}\Sigma= \{A, C, G, T\}. Exact values denote integer charged contexts out of 417=17,179,869,1844^{17} = 17,179,869,184.

Structural Novelty vs. Binary Lifting. Our cold-start permutation w12_k5_4ary.gm achieves U=314U = 314 active 5-mers (307 non-zero charged ranks and 7 zero-charge prefix ranks: 272, 300, 304, 305, 307, 308, and 310, with all 710 ranks ≥314\ge314 forming a 12-walk-free subgraph), shrinking the active UHS footprint by 29.91% compared to k5-w12-13.txt (14×32=44814 \times32 = 448). Across all three 2+22+2 binary partitions of Σ\Sigma (AC|GT, AG|CT, AT|GC), 32/32 high-bit blocks are broken (0/32 contiguous intervals). Minimizing Hamming distance across all 48 density-preserving DNA 5-mer symmetries (4!4! base relabelings ×2\times2 string orientations), at least 1,020/1,024 ranks differ from k5-w12-13.txt and 1,021/1,024 differ from w12_k5.gm, with near-zero Kendall correlations (τ=+0.015155\tau= +0.015155 and −0.043442-0.043442).

Independent Verification, Storage Cost, and Limitations

All results were independently reproduced by a standalone Python 3 standard-library verifier (check_w12_k5.py) implementing two independent exact transfer-matrix DPs: the M=256M = 256-vertex endpoint DP of Theorem 1 yielding 1,110,221,817 prefix plus 1,124,067,798 suffix equals 2,234,289,615 total charged contexts, and an N=1,024N = 1,024-edge sparse DP matching bit-for-bit; window-change splitting alternatively yields 1,197,205,696 + 1,037,083,919 = 2,234,289,615. Direct sliding-window Monte Carlo simulation using the OrensteinLab/10-minimizers evaluator (n_samples = 10710^7, seed = 0) yields 0.13004324 vs. 0.13076974 for k5-w12-13.txt (−0.55555%) and 0.13089784 for w12_k5.gm (−0.65287%); an independent 20,000,001-window simulation yields 2,601,023/20,000,001 = 0.13005114 (z=−0.02z = -0.02).

Artifact Checksums, Ancillary Files, and Scope. The explicit order is released in standard .gm format (w12_k5_4ary.gm, 8,200 bytes) and companion CSV (w12_k5_4ary.csv, 15,205 bytes), requiring 1,280 bytes when bit-packed at 10 bits/rank:

  • w12_k5_4ary.gm (8,200 bytes, SHA-256): 4a65f48881e7c16ac855f558f4420cef5bce1deee6d5416c71faecda0482e2cf

  • w12_k5_4ary.csv (15,205 bytes, SHA-256): 384f44080f7a777b84a7eb8398e1939571288368d57abbf0a43a888db55e41b1

Both rank tables (w12_k5_4ary.gm, w12_k5_4ary.csv; CC BY 4.0), the Python 3 standard-library verifier (check_w12_k5.py), the cold-start C99 optimizer sources (setcover_4ary.c, opt_4ary_fast.c, exact_lns_insert.c; MIT), and documentation (README.txt) are included as ancillary files with this submission. This is not a constant-space scheme, and global optimality over all 1,024!1{,}024! permutations is not claimed; claims are restricted strictly to expected i.i.d. uniform DNA density under leftmost tie-breaking at (w,k)=(12,5)(w, k) = (12, 5).

References

  1. [1]M. Roberts, W. Hayes, B. R. Hunt, S. M. Mount, and J. A. Yorke. Reducing storage requirements for biological sequence comparison. Bioinformatics, 20(18):3363–3369, 2004.pubmed.ncbi.nlm.nih.gov/15256412
  2. [2]G. Marçais, D. Pellow, D. Bork, Y. Orenstein, R. Shamir, and C. Kingsford. Improving the performance of minimizers and winnowing schemes. Bioinformatics, 33(14):i110–i117, 2017.DOI
  3. [3]S. Golan, I. Tziony, M. Kraus, Y. Orenstein, and A. Shur. GreedyMini: Generating low-density DNA minimizers. Bioinformatics, 41(Supplement_1):i275–i283, 2025.DOI
  4. [4]R. Groot Koerkamp, Y. Liu, and G. E. Pibiri. The open-closed mod-minimizer: an asymptotically optimal minimizer scheme. Algorithms for Molecular Biology, 2025.
  5. [5]A. Shur, I. Tziony, and Y. Orenstein. Generating minimum-density minimizers. bioRxiv, doi:10.64898/2026.01.25.701585v1, 2026. Exact solver and regular-language formulation in A. Shur, On minimizers of minimum density, arXiv:2506.05277, 2025.
  6. [6]A. Shur, I. Tziony, and Y. Orenstein. 10-Minimizers: A promising class of constant-space minimizers. In Workshop on Algorithms in Bioinformatics (WABI 2026), LIPIcs, 2026.DOI

Paper details

vlnc:W_hnxfnxwp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents