<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>A near-tight lower bound on the density of forward sampling schemes</title></titleStmt>
			<publicationStmt>
				<publisher>Oxford University Press</publisher>
				<date>12/26/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10586629</idno>
					<idno type="doi">10.1093/bioinformatics/btae736</idno>
					<title level='j'>Bioinformatics</title>
<idno>1367-4811</idno>
<biblScope unit="volume">41</biblScope>
<biblScope unit="issue">1</biblScope>					

					<author>Bryce Kille</author><author>Ragnar Groot_Koerkamp</author><author>Drake McAdams</author><author>Alan Liu</author><author>Todd J Treangen</author><author>Yann Ponty</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<title>Abstract</title> <sec><title>Motivation</title><p>Sampling k-mers is a ubiquitous task in sequence analysis algorithms. Sampling schemes such as the often-used random minimizer scheme are particularly appealing as they guarantee at least one k-mer is selected out of every w consecutive k-mers. Sampling fewer k-mers often leads to an increase in efficiency of downstream methods. Thus, developing schemes that have low density, i.e. have a small proportion of sampled k-mers, is an active area of research. After over a decade of consistent efforts in both decreasing the density of practical schemes and increasing the lower bound on the best possible density, there is still a large gap between the two.</p></sec> <sec><title>Results</title><p>We prove a near-tight lower bound on the density of forward sampling schemes, a class of schemes that generalizes minimizer schemes. For small w and k, we observe that our bound is tight when k≡1(modw). For large w and k, the bound can be approximated by 1w+k⌈w+kw⌉. Importantly, our lower bound implies that existing schemes are much closer to achieving optimal density than previously known. For example, with the current default minimap2 HiFi settings w=19 and k=19, we show that the best known scheme for these parameters, the double decycling-set-based minimizer of Pellow et al. is at most 3% denser than optimal, compared to the previous gap of at most 50%. Furthermore, when k≡1(modw) and the alphabet size σ goes to ∞, we show that mod-minimizers introduced by Groot Koerkamp and Pibiri achieve optimal density matching our lower bound.</p></sec> <sec><title>Availability and implementation</title><p>Minimizer implementations: github.com/RagnarGrootKoerkamp/minimizers ILP and analysis: github.com/treangenlab/sampling-scheme-analysis.</p></sec>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>For over a decade, k-mer sampling schemes have served as a ubiquitous first step in many classes of bioinformatics tasks. By sampling k-mers in a way which ensures that two similar sequences will have similar sets of sampled k-mers, sampling schemes enable methods to bypass the need to compare entire sequences at the base level and instead allow them to work more efficiently using the sampled k-mers.</p><p>Local sampling schemes satisfy a window guarantee that at least one k-mer is selected out of every window of w consecutive k-mers. Most schemes used in practice, such as the random minimizer scheme <ref type="bibr">(Schleimer et al. 2003</ref><ref type="bibr">, Roberts et al. 2004)</ref>, are forward schemes that additionally guarantee that k-mers are sampled in the order in which they appear in the original sequence. These properties are particularly appealing since they guarantee that no region is left unsampled.</p><p>As the purpose of these schemes is to reduce the computational burden of downstream methods while upholding the window guarantee, the primary goal of most new schemes is to minimize the density, i.e. the expected proportion of sampled k-mers. Over the past decade, many new schemes have been proposed that obtain significantly lower densities than the original random minimizer scheme.</p><p>For example, there are schemes based on hitting sets <ref type="bibr">(Orenstein et al. 2016</ref><ref type="bibr">, Marc&#184;ais et al. 2017</ref><ref type="bibr">, 2018</ref><ref type="bibr">, DeBlasio et al. 2019</ref><ref type="bibr">, Ekim et al. 2020</ref><ref type="bibr">, Pellow et al. 2023</ref><ref type="bibr">, Golan et al. 2024)</ref>, schemes that focus on sampling positions rather than k-mers <ref type="bibr">(Loukides and</ref><ref type="bibr">Pissis 2021, Loukides et al. 2023)</ref>, schemes that use an ordering on t-mers (t &lt; k) to decide which k-mer to sample <ref type="bibr">(Zheng et al. 2020, Groot Koerkamp and</ref><ref type="bibr">Pibiri 2024)</ref>, and schemes that aim to minimize density on specific input sequences <ref type="bibr">(Zheng et al. 2021b</ref><ref type="bibr">, Hoang et al. 2022)</ref>. All of these improvements notwithstanding, it is still unknown how close these schemes are to achieving minimum density.</p><p>A trivial lower bound on density given by the window guarantee is 1 w , and recently Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref> improved the bound of <ref type="bibr">Marc&#184;ais et al. (2018)</ref> from</p><p>w &#254; k -0:5 . However, for many practical values of w and k, there is a sizeable gap between these lower bounds and the density of existing schemes. This raises the question whether schemes with density much closer to 1 w exist, but have not been found yet, or whether existing schemes are already very close to optimal and it is the lower bound that needs improvement. Our new lower bound closes most of the gap, and thus answers this question: Indeed, especially for k &#8805; w, the best existing schemes have near-optimal density in many cases. This allows future research to focus on improving other sampling scheme metrics, such as the conservation described by <ref type="bibr">Edgar (2021)</ref> and <ref type="bibr">Shaw and Yu (2022)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Contributions</head><p>Main lower bound theorem. We prove a novel lower bound on the density of forward schemes that is strictly tighter than all previously established lower bounds for all w, k, and alphabet size &#963;: Theorem 1. Let f be a (w, k)-forward sampling scheme and M &#963; &#240;p&#222; count the number of aperiodic necklaces of length p over an alphabet of size &#963;. Then, the density of f is at least</p><p>where the middle inequality is strict for w &gt; 1.</p><p>We prove that this bound can be extended to work for more general classes of sampling schemes, such as the local schemes described by <ref type="bibr">Marc&#184;ais et al. (2018)</ref> and the multi-local schemes described by <ref type="bibr">Kille et al. (2023)</ref>.</p><p>Comparison with optimal schemes for small parameters. We show that our lower bound is tight for some small w, k, and &#963; by using an integer linear program to construct schemes whose density matches our lower bound. This marks the first time that there is an analytical description of a tight minimum density of any forward scheme. We conjecture that when k &#65533; 1&#240;mod w&#222;, there exist schemes with density matching our lower bound.</p><p>Comparison with practical schemes for large parameters. To show that our bound is significantly closer to the density achieved by existing schemes compared to previous lower bounds, we replicate the benchmark from Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref> for a selection of w and k (Fig. <ref type="figure">3</ref>). For example, with the default minimap2 <ref type="bibr">(Li 2018</ref>) HiFi settings w &#188; 19 and k &#188; 19, the lower bound goes up from 50% of the density achieved by the double decycling based method to 97% of the achieved density (Table <ref type="table">1</ref>).</p><p>Analysis of the mod-minimizer. Finally, our new lower bound implies that the mod-minimizer scheme (Groot <ref type="bibr">Koerkamp and Pibiri 2024</ref>) is optimal when k &#65533; 1&#240;mod w&#222; and &#963; is large. Indeed, for the ASCII alphabet (&#963; &#188; 256), the mod-minimizer scheme density is consistently within 1% of the lower bound when k &#65533; 1&#240;mod w&#222; (Supplementary D, Fig. <ref type="figure">S4</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Background</head><p>Notation. We begin by defining some necessary notation, as well as definitions of mathematical concepts that will be used throughout the work. We use &#189;n&#65533; to refer to the set f0; 1; . . . ; n -1g. The alphabet is denoted by &#931; and has size &#963; :&#188; j&#931;j, with &#963; &#188; 4 for DNA. The expression ajb indicates that a divides b. The summation P ajb is over all positive divisors a of b. We use a mod m for the remainder (in &#189;m&#65533;) of a after dividing by m and we use a &#65533; b &#240;mod m&#222; to indicate that a and b have the same remainder modulo m. Given a string W, W&#189;i; j&#222;) refers to the substring of W containing the characters at 0-based positions i up to j -1 inclusive. For two strings X and Y, XY represents the concatenation of X and Y.</p><p>Classes of sampling schemes. There are multiple established classes of sampling schemes. We begin by drawing a distinction between schemes with and without a window guarantee that guarantees that at least one every w k-mers is sampled. While schemes without a window guarantee, such as fracminhash <ref type="bibr">(Irber et al. 2022)</ref>, are often efficient to compute, the lack of a guarantee on the distance between sampled k-mers makes them ineffective or inefficient for certain tasks such as indexing and alignment. Indeed, we only consider schemes with a window guarantee: Definition 1. A (w, k)-local scheme with window guarantee w and k-mer size k on an alphabet &#931; corresponds to a sampling function f :</p><p>In other words, given a window of w &#254; k -1 characters (w consecutive k-mers), the output of the sampling function f (W) is an integer in &#189;w&#65533; which represents the index of the sampled k-mer in W. Recently, <ref type="bibr">Kille et al. (2023)</ref> proposed a generalization of (w, k)-local schemes which samples at least s k-mers out of every w instead of at least 1 and we extend our results to these more general schemes in Supplementary A.</p><p>Local schemes have no restrictions on which of the w kmers can be selected for each window, but forward schemes are a subset of local schemes that enforce the restriction that they never select a k-mer which occurs before a previously selected k-mer.  <ref type="bibr">Koerkamp and Pibiri (2024)</ref> showed that 1:5 w &#254; k -0:5 is also a lower bound, 1 w is tighter for all of the parameter choices in the table. For SSHash (Pibiri 2022), we show parameters used for indexing a single human genome.</p><p>Definition 3. The density d&#240;f &#222; of a sampling scheme f is defined as the expected proportion of sampled positions from an infinite, uniformly random string.</p><p>For a further background on types of sampling schemes, we refer to <ref type="bibr">Shaw and Yu (2022)</ref>, <ref type="bibr">Zheng et al. (2023)</ref>, Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref>, and <ref type="bibr">Ndiaye et al. (2024)</ref>.</p><p>De Bruijn graphs. Let B n;&#963; &#188; &#240;V; E&#222; denote the complete De Bruijn graph of order n, which has as vertices all strings of length n, V &#188; &#931; n , and edges between vertices that overlap in n -1 positions, E &#188; f&#240;X; X&#189;1; n&#222;c&#222;jX 2 V; c 2 &#931;g. When &#963; is clear from the context or irrelevant for a particular discussion, it is omitted. It is worth noting that the vertices of</p><p>For each string s of length n, the n rotations of s induce a pure cycle in B n consisting of (up to) n vertices cyclically connected by edges. Note that when s is repetitive, e.g. a single repeated character or some other repeated string, the length of the cycle will be a divisor of n. These pure cycles are also called necklaces. The set of necklaces of length n corresponds to a partitioning of the vertices of B n into a vertex-disjoint set of pure cycles. We use C n to refer to this set of pure cycles of B n , and for c 2 C n , we write jcj for the number of vertices in the cycle.</p><p>When a string of length n has n unique rotations, the corresponding necklace is said to be aperiodic. The total number of necklaces and the number of aperiodic necklaces of length n are given by Moreau (1872) (and see also <ref type="bibr">Riordan (1957)</ref>) as, respectively,</p><p>where &#966;&#240;p&#222; is Euler's totient function that counts the number of integers in &#189;p&#65533; coprime to p. The formula M &#963; &#240;n&#222; counting aperiodic necklaces follows from the formula for N &#963; &#240;n&#222; via M&#8364; obius inversion (M&#8364; obius 1832), where &#956; is the M&#8364; obius function defined to be 0 if n is divisible by a square (&gt;1) and &#956;&#240;n&#222; &#188; &#240; -1&#222; q otherwise, where q is the number of prime factors of n. Charged contexts. The context of a window of length w &#254; k -1 in a sequence is the set of preceding windows that influences whether the current window samples a new position.</p><p>For a local scheme to select a new position, none of the previous w -1 windows may have selected the same k-mer as the current window. As a result, the context for local schemes consists of 2w &#254; k -2 characters: the current window of w kmers as well as the w -1 windows preceding the current window.</p><p>For a forward scheme, however, as soon as a window samples a different position than the preceding window, this position must be a new position. Thus, one needs only to consider the context of two consecutive windows of w kmers, for a total of w &#254; k characters.</p><p>When a sampling scheme selects a new position for the last window in a context, the context is charged. <ref type="bibr">Marc&#184;ais et al. (2017)</ref> showed that the density of a scheme f can be defined as the proportion of contexts which are charged. In the case of forward schemes, each edge in B w &#254; k -1 represents a context, and the charged contexts are the edges (u, v) for which f &#240;u&#222; 6 &#188; f &#240;v&#222; &#254; 1.</p><p>Universal hitting sets. In 2021, <ref type="bibr">Zheng et al. (2021a)</ref> related the density of forward and local schemes to the concept of universal hitting sets (UHS). A &#240;w; '&#222;-UHS is defined as a set of '-mers U such that any sequence of w adjacent '-mers must contain at least one '-mer from U. Theorem 1 of <ref type="bibr">Zheng et al. (2021a)</ref> showed that when k &#188; 1, one can use the minimum size of a &#240;w; ' &#188; w &#254; k&#222;-UHS to bound the density of &#240;w; k &#188; 1&#222;-forward schemes, and the minimum size of a &#240;w; ' &#188; 2w &#254; k -2&#222;-UHS to bound the density of a &#240;w; k &#188; 1&#222;-local scheme.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Theoretical results</head><p>In this section, we prove our main result: an improved lower bound on the density of forward sampling schemes. We first generalize some existing theorems to arbitrary w and k (Sections 3.1 and 3.2), after which our main theorem follows in Section 3.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">A lower bound on the size of a &#240;w; '&#222;-UHS</head><p>We begin by considering a &#240;w &#188; 2; '&#222;-UHS. A &#240;2; '&#222;-UHS is equivalent to a vertex cover in B ' , i.e., a subset of vertices such that each edge in B ' is adjacent to at least one vertex in the subset. <ref type="bibr">Lichiardopol (2006)</ref> used the fact that for every cycle C, at least djCj=2e of its vertices must be in a vertex cover, and obtained a lower bound on the size of a vertex cover by partitioning B ' into its pure cycles. We naturally extend this argument to obtain a lower bound on the cardinality of a &#240;w; '&#222;-UHS for any w &#8805; 2. Notably, the pure cycle &#240;0011; 0110; 1100; 1001&#222; has three vertices in the UHS, even though the lower bound given by Proposition 4 only requires it have 2. This is an example where the lower bound is not tight.</p><p>For certain values of w and ', such as when ' is prime or w &#188; 2 and ' is odd, Proposition 4 can be simplified to remove the summation and ceil function (Supplementary B).</p><p>Proposition 4 is the core of the proof of Theorem 1 and already has the right structure. The remainder of this section translates this result on universal hitting sets to a result on the density of sampling schemes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">A connection between sampling scheme density and UHS size</head><p>Zheng et al. (2021a, Theorem 1) showed a connection between universal hitting sets and the density of sampling schemes when k &#188; 1. We naturally extend their result to k &#8805; 1 for both local schemes (Lemma 5) and forward schemes (Corollary 6).</p><p>Lemma 5. Let f be a (w, k)-local scheme, and let C f be its corresponding set of charged contexts defined as the set of strings W of length 2w &#254; k -2 for which the last window W&#189;w -</p><p>1&#222;&#222; not selected by any previous window:</p><p>Proof. For the sake of a contradiction, suppose there is a walk of length w in the De Bruijn graph of order &#240;2w &#254; k -2&#222;, say &#240;W 0 ; . . . ; W w -1 &#222;, that avoids cf Let S be the spelling of the walk, i.e., the sequence of length 3w &#254; k -3 such that S&#189;i; i &#254; 2w &#254; k -2&#222; &#188; W i . Since W w -1 6 2 C f and S contains W w -1 , this implies that on the last &#240;w &#254; k -1&#222;-mer of W w -1 (i.e. S&#189;2w -2; 3w &#254; k -3&#222;), f selects an index j &#8805; 2w -2 in S which has already been picked.</p><p>Since 0 &#8804; f &#240;&#65533;&#222; &#8804; w -1 and j &#8805; 2w -2, the first window that selects position j must begin at an index m &#8805; w -1. Therefore, the context</p><p>as f selects a previously unselected position when applied to its last &#240;w &#254; k -1&#222;-mer. By definition, W m -w &#254; 1 2 C f , contradicting our supposition and therefore C f is a &#240;w; 2w &#254; k -2&#222;-UHS.</p><p>w Identically, one can consider contexts for a (w, k)-forward scheme f, which requires only verifying that the selection for a window of length w &#254; k -1 is distinct from the selection for the previous window. Therefore, the length of a context for forward f is only w &#254; k. As above, every w contexts must have at least one charged context, leading to the following conclusion: Corollary 6. If f is a (w, k)-forward scheme and C f is its corresponding set of charged contexts, defined as</p><p>As all contexts of a particular length ' are equally likely to occur in an infinite, uniform random string, the proportion of charged contexts corresponds to the density of the sampling scheme <ref type="bibr">(Marc&#184;ais et al. 2017)</ref>, i.e. d&#240;f &#222; &#188; jC f j=&#963; ' , where ' &#188; w &#254; k for forward schemes and ' &#188; 2w &#254; k -2 for local schemes. An example of the charged contexts of a (2, 2)-forward scheme and the corresponding UHS is depicted in Fig. <ref type="figure">1</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Lower bounds on local and forward scheme density</head><p>We are now ready to state and prove our main theorem.</p><p>Theorem 1. Let f be a (w, k)-forward sampling scheme and M &#963; &#240;p&#222; count the number of aperiodic necklaces of length p over an alphabet of size &#963;. Then, the density of f is at least</p><p>where the middle inequality is strict for w &gt; 1.</p><p>Proof. Due to Corollary 6 and <ref type="bibr">Marc&#184;ais et al. (2017)</ref>, we can see that a (w, k)-forward sampling scheme of density d&#240;f &#222; implies a &#240;w;</p><p>By Proposition 4, this implies that every forward sampling scheme has a density of at least g &#963; &#240;w; k&#222;, and hence d&#240;f &#222; &#8805; g &#963; &#240;w; k&#222; follows. For any p that divides w &#254; k, we haved p w e &#8805; p w &#254; k d w &#254; k w e, with strict inequality when p &#188; 1 and w &gt; 1. Substituting this in g &#963; &#240;w; k&#222;, the middle inequality follows directly using the identity</p><p>that counts the number of strings of length w &#254; k partitioned by their shortest period. The last inequality follows directly from</p><p>As shown in Section 4, g &#963; &#240;w; k&#222; is a tight bound for many small cases. Since its formula is somewhat unwieldy, 1 w &#254; k d w &#254; k w e can be used as an approximation that quickly approaches g &#963; &#240;w; k&#222; (Fig. <ref type="figure">2</ref>). Simple arithmetic shows that both g &#963; &#240;w; k&#222; and 1 w &#254; k d w &#254; k w e improve the previous lower bound of 1:5 w &#254; k -0:5 of Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref>.</p><p>Given a (w, k)-local scheme f k , we can construct a &#240;w; k 0 &#8805; k&#222;-local scheme f k 0 of the same density by ignoring the last k 0 -k characters in each window, i.e. <ref type="bibr">(Zheng et al. 2021a)</ref>. It follows that the minimum density of a (w, k)-local or forward scheme is monotonically decreasing as k increases. However, as can be seen in Fig. <ref type="figure">2</ref>, g &#963; &#240;w; k&#222; is not a monotonically decreasing function. The local maxima appear to be at k &#65533; 1 &#240;mod w&#222;, which motivates the following improved lower bound.</p><p>Theorem 2. For any (w, k)-forward scheme f, an improved lower bound g 0 is given by d&#240;f &#222; &#8805; g 0 &#963; &#240;w; k&#222; :&#188; max&#240;g &#963; &#240;w; k&#222;; g &#963; &#240;w; k 0 &#222;&#222;</p><p>where k 0 is the smallest integer &#8805; k such that k 0 &#65533; 1 &#240;mod w&#222;.</p><p>Remark 7. Similar to Theorem 1, Lemma 5 implies that any (w, k)-local scheme f has density at least d&#240;f &#222; &#8805; g &#963; &#240;w; w &#254; k -2&#222;. As this bound is in terms of g &#963; , the improved bound in Theorem 2 can be applied to local schemes as well, i.e., for any (w, k)-local scheme f, an improved lower bound is given by</p><p>4 Empirical tightness of our bounds</p><p>Here, we compare our bounds g &#963; and g 0 &#963; to existing lower bounds. Further, we show how tight these bounds are for small w, k, and &#963; by searching for optimal schemes via an integer linear programming (ILP) formulation. We also show how close existing sampling scheme densities are to g 0 &#963; for practical choices of w, k, and &#963;. Finally, we show when the recently described mod-minimizer scheme (Groot Koerkamp and Pibiri 2024) achieves optimal density as &#963; ! 1.</p><p>ILP description. We use an ILP to search for minimum density forward sampling schemes. In short, we use a single integer variable x W 2 &#189;w&#65533; for every window W of length w &#254; k -1 (corresponding to a vertex in B w &#254; k -1 ) that indicates the position of the chosen k-mer, and a single boolean variable y &#240;W;W 0 &#222; for each edge in B w &#254; k -1 that indicates whether the corresponding context is charged. On each edge, we require that the scheme be forward. The objective function is to minimize the number of charged edges. To reduce the search space, we add an additional constraint corresponding to our lower bound g &#963; by requiring that for each pure Figure 2. Comparison of forward scheme lower bounds and optimal densities for small w, k, and &#963;. Optimal densities were obtained via the ILP and are plotted as black circles that are solid when the optimal density matches our lower bound, g 0 &#963; , and hollow otherwise. Each column corresponds to a parameter being fixed to the lowest non-trivial value, i.e., &#963; &#188; 2 in the first column, w &#188; 2 in the second column, and k &#188; 1 in the third column. Note that the x-axis in the third column corresponds to w, not k.</p><p>cycle of length jcj in B w &#254; k , at least djcj=we of the corresponding edges in B w &#254; k -1 are charged. Further details, including the ILP formulation for local schemes, can be found in Supplementary C.</p><p>Comparison against optimal schemes for small k. We used Gurobi (Gurobi Optimization, LLC 2024) to solve the ILP for all combinations of w, k, and &#963; such that 1 &#8804; w &#8804; 12; 1 &#8804; k &#8804; 12, and 2 &#8804; &#963; &#8804; 4 for both forward and local schemes and limited the runtime for each instance to 12 h on 128 threads. All results are reported in in Supplementary D, Table <ref type="table">S2</ref>. While the additional constraint on pure cycles corresponding to g &#963; significantly sped up the search, for most large w, k, and &#963;, the ILP failed to terminate with an optimal solution in the allotted time. As a result, we restrict most of our analysis to the following three cases: fixed alphabet size &#963; &#188; 2, fixed window size w &#188; 2, and fixed k-mer size k &#188; 1 (Fig. <ref type="figure">2</ref>).</p><p>For all &#240;w; k; &#963;&#222; where k &#65533; 1 &#240;mod w&#222; (including when k &#188; 1), the minimum density exactly matches our lower bound g &#963; &#240;w; k&#222;. Additionally, when &#963; &#188; 2 and w &#188; 2, the minimum density was equal to g 0 &#963; &#240;w; k&#222;. Comparison against existing schemes for large k. Using a sequence of 10 million random characters over alphabet size &#963; &#188; 4, we approximated the density of recent sampling schemes using the benchmarking implementation from Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref>. To compare each density to the particular proportion of selected k-mers on a genomic sequence, we also ran all sampling schemes on the human Y chromosome <ref type="bibr">(Rhie et al. 2023)</ref> after removing all non-ACTG characters. The densities of the best performing methods, Miniception <ref type="bibr">(Zheng et al. 2020)</ref>, double decycling-set-based minimizers <ref type="bibr">(Pellow et al. 2023)</ref>, and mod-minimizers (Groot <ref type="bibr">Koerkamp and Pibiri 2024)</ref> are plotted in Fig. <ref type="figure">3</ref> along with random minimizers and lower bounds.</p><p>The ratio between the minimum achieved densities and lower bounds for a selection of (w, k) pairs used by existing k-mer-based methods are presented in Table <ref type="table">1</ref>. Additional results for &#963; 2 f2; 256g and w 2 f2; 50g are provided in in Supplementary D, Fig. <ref type="figure">S4</ref>.</p><p>The mod-minimizer has optimal density for large &#963; when w &#65533; k &#240;mod 1&#222;. When w and k are constant and &#963; ! 1, the probability of duplicate characters in a window goes to 0. This implies that we can use t &#188; 1 for the mod-minimizer. When k &#65533; t &#188; 1 &#240;mod w&#222;, the density of the mod-minimizer (Theorem 10 of Groot <ref type="bibr">Koerkamp and Pibiri, 2024)</ref> is given by</p><p>The o&#240;1='&#222; term only accounts for duplicate t-mers, and hence disappears when &#963; ! 1. We get</p><p>Thus, the mod-minimizer has density equal to the lower bound provided by Theorem 1 when &#963; goes to 1 and w and k &#65533; 1 &#240;mod w&#222; are fixed.</p><p>In practice, for &#963; &#188; 256 the mod-minimizer scheme is within 1% from optimal when k &#65533; 1 &#240;mod w&#222; (Supplementary D, Fig. <ref type="figure">S4</ref>). When &#963; &#188; 4 (Fig. <ref type="figure">3</ref>), a t &gt; 1 must be used, causing the density plot to 'shift right' compared to the lower bound. Because of that, the modminimizer does not quite match the lower bound for practical values of &#963;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Discussion</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Conjecture on when our lower bound is tight</head><p>Analytically, it is clear that g 0 &#963; &#240;w; k&#222; is much larger than 1 w . In all cases, g 0 &#963; &#240;w; k&#222; is nearly tight, if not completely. In particular, our bound is tight for all 40 tested parameter sets where k &#65533; 1 &#240;mod w&#222;, leading us to our conjecture: Conjecture 1. For any w and k satisfying k &#65533; 1 &#240;mod w&#222;, there exists a (w, k)-forward sampling scheme f such that d&#240;f &#222; &#188; g &#963; &#240;w; k&#222;.</p><p>While the minimum size of a decycling set, i.e., a &#240;w &#188; 1; '&#222;-UHS, is well known to be N &#963; &#240;'&#222; <ref type="bibr">(Mykkeltveit 1972)</ref>, very little is known about the minimum size of a &#240;w; '&#222;-UHS for finite w. In addition to providing the minimum density of a (w, k)-forward scheme for k &#65533; 1 &#240;mod w&#222;, proving Conjecture 1 would also determine the minimum size of a &#240;w; ' &#188; w &#254; k&#222;-UHS when k &#65533; 1 &#240;mod w&#222;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Existing schemes are nearly optimal when k &#8805; w or &#963; is large</head><p>A natural investigation which follows our proposed lower bound is to determine the gap between g 0 &#963; &#240;w; k&#222; and current forward scheme densities. Previously, the gap between known densities and lower bound was rather large, making it unclear how much more the density could be reduced.</p><p>In Table <ref type="table">1</ref>, we observe that existing schemes are already within 11% from the optimal density for practical values of w and k across different applications, and in many cases are even within 3% of the optimal density. In Fig. <ref type="figure">3</ref>, we see that this difference holds not just for the specific (w, k) in Table <ref type="table">1</ref>, but for most k &#8805; w. This is much more informative than the previous lower bound of 1=w, which implied that most current schemes are at most 50% denser than optimal for many of the parameters in Fig. <ref type="figure">3</ref>.</p><p>For alphabets much larger than DNA &#240;&#963; &#188; 4&#222;, such as the ASCII alphabet (&#963; &#188; 256), we observe that when k &#65533; 1 &#240;mod w&#222;, the mod-minimizer scheme recently proposed by Groot <ref type="bibr">Koerkamp and Pibiri (2024)</ref> is at most 1% denser than optimal and furthermore, we show that it is optimal as &#963; ! 1. This makes the mod-minimizer scheme the first practical scheme for which there exist finite parameters k and w for which it is close to optimal.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3">Tightening the bound for small k</head><p>Our new bound for forward schemes always improves over 1=w and appears tight when k &#65533; 1 &#240;mod w&#222;. This leads to an increasingly close bound for k 6 &#65533; 1 &#240;mod w&#222; as k increases, but leaves a large gap when 1 &lt; k &lt; w. A better understanding of these small cases will be necessary to obtain a tight lower bound for all w and k. Based on Supplementary D, Figs. S3 and S4, one might conjecture that the double decyling-setbased methods of <ref type="bibr">Pellow et al. (2023)</ref> are near-optimal, but subsequent work such as the greedy minimizer <ref type="bibr">(Golan et al. 2024</ref>) has shown better schemes are possible. From Fig. <ref type="figure">2</ref>, we already know that our lower bound is not always tight, so this leaves the question:</p><p>Open problem 1. How close can practical sampling schemes get to the density given by our lower bound?</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.4">Extending the bound to local schemes</head><p>For local schemes, though, our bound appears much less tight. We identified eight sets of &#240;w; k; &#963;&#222; where local schemes can obtain lower densities than their forward counterparts. In all cases, however, the difference between the local and forward densities was minuscule, with the largest difference of being found for &#240;w &#188; 4; k &#188; 2; &#963; &#188; 2&#222; where the density decreased from 0.375 to 0.371 (Supplementary D, Table <ref type="table">S2</ref>). Nevertheless, for some parameters, local schemes are able to achieve densities lower than our g 0 &#963; &#240;w; k&#222; lower bound for forward schemes. Given the trend observed in Supplementary D, Table <ref type="table">S2</ref>, we arrive at our final open problem:</p><p>Open problem 2. How much lower can the density of a (w, k)-local scheme be compared to a (w, k)-forward scheme?</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Downloaded from https://academic.oup.com/bioinformatics/article/41/1/btae736/7922553 by guest on 01 May 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_1"><p> Kille et al.   </p></note>
		</body>
		</text>
</TEI>
