CS Paper Radar

One partition function call to rule them all: Efficiently computing the equilibrium landscape of multiple nucleic acid strands

Ahmed Shalaby, Damien Woods

cs.DS ·submitted 2026-11-20 18:17 UTC · v1

Abstract

In the nearest neighbour model of DNA/RNA binding, the partition function (PF) is a sum of Boltzmann-weighted free energies of the exponentially large set of secondary structures. Dirks et al. [SIAM review, 2007] gave a polynomial time PF algorithm for $O(1)$ strands, generalising McCaskill [Biopolymers, 1990] single-stranded case. Despite the intuition that PF may somehow encode the entire state space, thus far different approaches were required to solve various energy-landscape prediction problems. For example: finding the minimum free energy (MFE), structure(s) for $O(1)$ strands was open since 2007, and we recently solved [ICALP, 2025] via new techniques. We asked if there is a magnifiable PF algorithm [DNA31, 2025], which we answer here in the affirmative. We give an $O(N^3(c-1)!)$ time, $O(N^2)$ space algorithm, for $c=O(1)$ strands of $N$ bases, the same overhead as Dirks et al. (non-magnifiable) algorithm. However, we show that magnification allows for efficient decoding of the entire landscape, concretely: a single call to the magnifiable PF efficiently solves and improves upon a large number of problems, giving: - MFE in $O(N^3(c-1)!)$ time, $O(N^2)$ space; a considerable improvement over our $O(N^4(c-1)!)$ time, $O(N^4)$ space result [ICALP 2025]. - The first polynomial time algorithm for the multi-stranded density of states problem, in time $O(N^3(c-1)!),O(N^2)$ space. - The first polynomial time algorithm outputting the entire list of energy levels occupied by at least one structure (in time $O(N^3(c-1)!),O(N^2)$ space), and the first algorithms for various energy landscape and counting problems. Our approach unifies the field of energy landscape prediction showing that a single, general, algorithmic framework neatly unifies a large collection of problems that practitioners care about, and required distinct techniques with worse time bounds.

Closest papers

Nearest neighbours by meaning across the whole index.

LinearKnot: Linear-Time Approximation of the Pseudoknot Partition Function

cs.DS ·2026-11-12 ·Milan Gautam, David H. Mathews, Liang Huang
code/data similarity 0.58
Abstract

Pseudoknots, where two or more helices cross, are central to many functional RNAs, including frameshifting signals, telomerase RNA, riboswitches and viral genomes. With arbitrary pseudoknots, finding the minimum free energy structure is NP-hard, so most RNA secondary structure prediction tools only consider pseudoknot-free structures. Dirks and Pierce (DP03) pioneered the first pseudoknot partition function, which underlies NUPACK's pseudoknot model, but it takes $O(n^5)$ time and $O(n^4)$ memory, making it practical only for very short sequences. Linear-time approximate dynamic programming, as in LinearFold and LinearPartition, does not transfer easily to DP03: a partial pseudoknot leaves a gap filled by its crossing partner, whose complementary sequence may still lie ahead of the scan, so it cannot be ranked by its inside weight. We present LinearKnot, a linear-time approximation of DP03 in three passes: (a) LinearPartition gives pseudoknot-free weights; (b) a second pass builds tables that estimate each partial stem's crossing partner; and (c) a third scans a left-to-right reformulation of DP03 that reserves the 5' nucleotides in the pseudoknot helix for subsequent pairing, keeping the states with the largest estimated contribution. Without pruning, this reformulation computes DP03's pseudoknot recursion exactly, so the only approximation is which states the beam keeps. End-to-end, time grows linearly ($n^{1.01}$) and memory marginally above linear ($n^{1.15}$) from 1,000 to 9,392 nt. LinearKnot folds the 9,392 nt Rous sarcoma virus genome in 2.4 hours and 90.5 GB, where exact DP03 would need an estimated 40,000 years and 54 million GB, and matches exact DP03 base-pair probabilities on 418 PseudoBase RNAs with a median RMSD of $9.2\times10^{-7}$. Our code is available at https://github.com/gautammilan/LinearKnot.

0.38

Critical Mass: Structure-Disjoint Splits Drift With the Libraries They Are Built On

cs.LG cs.CE ·2026-10-08 ·Tomo Oga, Devesh Shah, Cailum M. K. Stienstra, Gabriel Asher, Antonio H. de O. Fonseca +2 more
published similarity 0.57
Abstract · Accepted at 40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: AI Data Readiness for Scientific Discovery

Molecular machine learning evaluates out-of-distribution performance with structure disjoint splits, a construction rule fixed once at the scale its library happened to have: threshold a pairwise distance, then assign whole connected components to folds. For predicting structures from mass spectra, the field has converged on single-linkage clustering under the myopic Maximum Common Edge Subgraph (MCES) distance at a threshold of 10. This convention was set on 29,000 molecules but public libraries now hold 227,690 molecules. MCES is NP-hard per pair over a quadratically growing set, and so the criterion has never been evaluated at that scale. We propose an optimized version of this criterion, allowing for computationally feasible application on the public libraries: Admissible bounds and a union-find skip reduce $2.6 \times 10^{10}$ molecular pairs to only $1.15 \times 10^{7}$ integer programs, a $2{,}259\times$ saving, while provably producing the lossless partition. We find that at this scale the graph percolates. A single component holds $95.5\%$ of the library, capping any test set at $4.5\%$. What remains is not merely smaller, but systematically different: a held-out compound outweighs a training compound 88.1\% of the time, because a fixed absolute budget is a tighter relative tolerance on a larger molecule. Large library benchmarks using this splitting rule naively therefore conflate structural novelty with extrapolation to larger, more complex chemistry.

0.48

Hardness, Approximation, and Parameterized Algorithms for Asynchronous Border Minimization

cs.DS ·2026-11-12 ·Giulian Buzatu, Adrian Miclăuş, Alexandru Popa
theory similarity 0.54
Abstract

In the Asynchronous Border Minimization Problem (BMP), a set of DNA probe strings is placed on a grid and synthesized using a common sequence of nucleotide-deposition steps. At each step, every cell may accept or skip the offered nucleotide. The cost is the total number of disagreements between neighboring cells over all steps. We study both free placement, where the probes may be rearranged, and fixed placement, where their positions are given. We show that free-placement BMP on a square grid is NP-complete over three symbols. For one-dimensional BMP, we prove APX-hardness over a binary alphabet, and NP-completeness even when every probe has length two. We also obtain an $8/7$-approximation for the latter restriction. For square grids, we give a randomized $O(n^{1/4}\log n)$-approximation, improving the earlier $O(n^{1/4}\log^2 n)$ guarantee. Both free- and fixed-placement BMP on rectangular grids are fixed-parameter tractable when parameterized only by the allowed border cost.

0.23

Simulated Annealing with Topological Spatial Chunking for De Novo Protein Sequence Design

cs.CE cs.NEmath.OCq-bio.PE ·2026-11-14 ·Kandula Eswara Sai Kumar
similarity 0.53
Abstract

The inverse protein folding problem, designing a discrete amino acid sequence that spontaneously folds into a predefined macroscopic structure, remains a phenomenally demanding combinatorial challenge central to synthetic drug discovery. While algorithms like SA offer a baseline approach for navigating dense biomolecular energy landscapes, applying SA heuristics to large sequences is inherently frustrated by exponentially large search spaces and deep local energy minima. This study proposes a scalable sequence design architecture, Topological Spatial Chunking Simulated Annealing, based on a localized, exact-solving heuristic embedded within a global simulated-annealing wrapper. To fundamentally circumvent exponential scaling walls, we deploy a dynamic solver that segments the global molecular target into shallow, k-variable algorithmic windows. Crucially, rather than partitioning natively by sequential 1D chronology, we introduce topological spatial chunking, which dynamically groups discrete variables based on Euclidean spatial proximity to preserve critical non-local thermodynamic correlations. The spatially localized sub-problems are solved deterministically via exact enumeration, while the global traversal is securely regulated by an exterior simulated annealing governor augmented by dynamic reheating and continuous elitism caching. We comprehensively benchmarked this classical architecture on the standard HP biophysical lattice against targeted 20-merA, 25-mer, 50-mer, and 64-mer geometries. Most notably, when evaluating the computationally exhaustive 50-mer and 64-mer topologies, the framework successfully bypassed widely accepted heuristic boundaries. By leveraging deterministic exact solving to vault classical energy traps, the system algorithmically resolved a novel, ultra-dense sequence-packing configuration for the 50-mer, defining a new theoretical global optimum.

0.14

Massively Parallel Algorithms for Huffman Coding

cs.DS ·2026-10-06 ·Masoud Seddighin, Saeed Seddighin
similarity 0.51
Abstract

Huffman coding is one of the oldest and most fundamental problems in computer science. Given a string of length $\TextLength$ over a general alphabet, the goal is to assign a binary codeword to each character so that no codeword is a prefix of another and the total encoded length of the string is minimized. Huffman coding is widely used in practical compression systems, including file compression. As modern datasets continue to grow, it is natural to study whether a Huffman code can be constructed efficiently in the massively parallel computation (\MPC) model. The celebrated Huffman coding algorithm admits two straightforward \MPC implementations: for any constant $ε\in(0,1)$, one uses $O(\TextLength^ε)$ memory per machine but requires $Θ(\log \TextLength)$ rounds, while the other runs in $O(1)$ rounds but requires $Θ(\sqrt{\TextLength})$ memory per machine. We give the first nontrivial \MPC algorithm for Huffman coding that bypasses both limitations. For every constant $ε>0$, our algorithm uses $O_ε(\log\log \TextLength)$ rounds and $\softO(\TextLength^ε)$ memory per machine, while its total memory and total computation are $\softO(\TextLength)$. {\color{black}Although our framework is tailored to the \MPC model, we show that it has applications in the \PRAM setting as well. Specifically, we show that the same algorithm can be implemented in the \PRAM model with total work close to linear. In particular, whenever the text length is at most $2^{O\left(\left(\frac{\log \AlphabetSize}{\log\log \AlphabetSize}\right)^2\right)}$ (slightly superpolynomial), where $\AlphabetSize$ is the alphabet size, our parallel running time is asymptotically better than that of all previously known \PRAM algorithms and is essentially optimal.}

0.26

2-Adic Tree Embeddings: A Modeling and Optimization Framework for Computational Phylogenetics

cs.DM q-bio.PE ·2026-10-10 ·Pavel Skums
similarity 0.51
Abstract

Phylogenetic inference is a fundamental problem in computational biology, with applications ranging from epidemiology and oncology to developmental biology and comparative genomics. Many major phylogenetic problems are NP-hard; consequently, existing methods often explore tree space using local search or MCMC based on a limited repertoire of combinatorial rearrangements. However, the size and ruggedness of tree space make it difficult for such heuristics to reliably reach optimal or near-optimal solutions. Recently, there has been growing interest in alternative approaches that embed trees into numerical spaces and apply numerical optimization techniques. However, such methods are still limited in practical applicability. We propose a new approach to phylogenetic inference based on embeddings of trees into the non-Archimedean space of $2$-adic numbers. The hierarchical organization of $2$-adic space naturally encodes tree topologies, while its rich topological, algebraic, and measure-theoretic structure provides a natural foundation for a coherent theory of tree calculus and optimization. Here, we introduce 2-adic tree embedding, establish their basic topological, probabilistic, and algebraic properties, and show that they support natural representations of tree distributions, algebraic operations, and broad classes of tree rearrangements extending standard operations such as NNI, SPR, and TBR. Building on these results, we introduce a general local search framework in which tree neighborhoods are generated by parametric families of $2$-adic polynomials. We show that even infinitely many transformations induce only quadratically many distinct neighboring trees, which can be generated in polynomial time. These results suggest a new mathematically rigorous and flexible approach to representing and exploring tree space.

0.20

Structural Corrections to the Bethe Approximation of the Permanent

cs.DS math.CO ·2026-08-31 ·Ijay Narang, Will Perkins
hot direction similarity 0.50
Abstract

We study deterministic approximation algorithms for the permanent of a nonnegative matrix through the Bethe permanent, an approximation computable in polynomial time. The tight analysis of Anari and Rezaei gives a universal comparison between the permanent and the Bethe permanent within a factor $(\sqrt 2)^n$. The simple example of the unweighted $4$-cycle $C_4$ (or a union of disjoint $C_4$'s) shows that this bound is tight. We show that such $4$-cycle obstructions can be identified and exploited algorithmically. Given a Bethe optimizer, our algorithm identifies nearly isolated weighted $2\times2$ blocks and peels off a vertex-disjoint family of them. If the total weighted correction is large, we can improve the Bethe approximation; if it is small, we show that the Bethe permanent is within a factor of $(\sqrt2 - \varepsilon)^n$ of the truth. Combining these facts, we obtain a deterministic polynomial time $(\sqrt2-\varepsilon)^n$-approximation algorithm for the permanent of an arbitrary nonnegative $n\times n$ matrix, where $\varepsilon>0$ is some absolute constant.

0.45

Tree Edit Distance: Near-Linear-Time Approximate, Sublinear, and Dynamic

cs.DS ·2026-10-15 ·Bingbing Hu, Tomasz Kociumaka, Jakob Nogler, Barna Saha
published similarity 0.50
Abstract · SODA 2027

Tree edit distance (TED), the analog of string edit distance (ED) for hierarchical data, is the minimum number of node insertions, deletions, and substitutions transforming one labeled rooted ordered tree into another. We narrow polynomial gaps between TED and ED in near-linear-time approximation, sublinear algorithms, and dynamic algorithms. We give an $n^{o(1)}$-approximation in $O(n)$ time and, for every $0<δ<1$, a $(\log n)^{O(1/δ)}$-approximation in $O(n^{1+δ})$ time. This improves the previous near-linear-time $O(\sqrt n)$-approximation [Boroujeni et al., STOC'19] and brings TED to parity with ED in this regime up to polylogarithmic factors. With query access to the balanced-parentheses (Euler-tour) representation of the input trees, we give the first sublinear-time TED algorithm: for every $τ\in[1,n]$, it computes a $τn^{o(1)}$-approximation of $1+\mathrm{ted}$ in $O(n/τ)$ time. For dynamic TED, we give an exact algorithm with amortized update time $\tilde{O}(k^7)$ and a $(1+\varepsilon)$-approximation with amortized update time $\tilde{O}_{\varepsilon}(k)$, where $k$ caps the distance that must be reported. The exact algorithm is the first to beat recomputation in a nontrivial parameter regime. The approximation improves prior dynamic guarantees [Das et al., FOCS'25] and cannot be significantly improved in any parameter regime without a breakthrough for static $(1+\varepsilon)$-approximation of ED. All results use dynamic programming on a new hierarchical tree decomposition, analogous to partitioning strings into blocks of geometrically decreasing sizes. It combines structural properties previously achieved only in isolation, providing a framework for transferring algorithmic ideas from ED to TED, with additional ingredients addressing the obstacles in each computational setting.

0.34