Skip to content

Add IntaRNAkix kinetic seed-extension personality - #254

Merged
martin-raden merged 7 commits into
masterfrom
feat/kinetic-seed-extension
Oct 7, 2026
Merged

martin-raden merged 7 commits into
masterfrom
feat/kinetic-seed-extension

Conversation

@Alexander-Mitrofanov

@Alexander-Mitrofanov Alexander-Mitrofanov commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Adds IntaRNAkix (kinetic seed extension), available as an installed executable link or IntaRNA --personality=IntaRNAkix. It defaults to --model=X --mode=K --outNoLP=true. For each handler-provided seed, the predictor compares complete energy changes at both ends, accepts only strictly downhill moves, and retains visited structures for energy-ranked reporting and traceback.

Extensions add one stacked pair, two stacked pairs, or a loop-closing pair plus its outward stack. Two-pair moves are atomic. Handler-provided seeds and their energies are trusted, including explicit seeds with lonely pairs. Direct mode K calls promote a missing/false noLP flag with an INFO message. --kineticScore=A|B|C selects energy-change or distance-normalized ranking with deterministic ties. GU, loop/span, region, output and overlap constraints apply; equilibrium partition/probability requests are rejected.

Per-end candidate tables reuse complementarity checks and local energies. Full energies are refreshed at both ends, including accessibility and both weighted dangles. Only committed paths are reported. This is a greedy energy heuristic without a global-optimum guarantee, calibrated rates or a physical time axis; retained-path memory scales with the sum of path lengths.

README and CLI help document the personality, and the new SVG recursion diagram covers initialization, allowed moves, selection and stopping. Out-of-tree installations now discover personality declarations through srcdir, so they create the executable links.

The preliminary benchmark compares default IntaRNA and IntaRNAkix on three tutorial RNA pairs, each with and without --outNoGUend=true, using one warm-up and five timed single-thread runs. It records wall time, peak RSS, reported minimum energy and interaction length max(target span, query span), with signed Kix-minus-default deviations. The review's “noGU” is interpreted as outNoGUend; seedNoGU remains false. Default IntaRNA keeps its default outNoLP=false, so differences reflect both search and noLP defaults.

Across these six small comparisons, Kix takes 0.11–0.68 times the default runtime; median peak RSS differs by less than 2%. Energy deviations range from 0 to +4.40 kcal/mol and length deviations from −42 to 0 nt. These are preliminary observations, not a general performance or biological-accuracy claim. The reproduction script and raw measurements are included with the input fixtures.

Validation:

  • Full make tests -j2 passes in GCC 14.4 release and debug with ViennaRNA 2.7.2, Boost 1.85 and Kokkos mdspan: 75,709 assertions in 68 API cases, 6/6 suite entries in each build.
  • Independent whole-chain oracle covers scores/ties, single/double stacks, loop rescue, strict stopping, nonmonotone accessibility, GU/span/range constraints, retained paths, trusted seeds, cache reuse and repeated calls.
  • CLI regressions cover executable-name and option personality selection, defaults and explicit overrides, noLP INFO logging, incompatible requests, and independent --rri reevaluation. All benchmark structures also independently reevaluate to their reported energies.
  • Clean staged installation creates IntaRNAkix; modified public headers compile standalone and an installed pkg-config consumer links and predicts the expected energy.
  • make dist contains the final source, tests, SVG, benchmark script/results and tutorial fixtures; git diff --check passes.

@martin-raden

Copy link
Copy Markdown
Member

@Alexander-Mitrofanov

thanks and please revise:

1 - alway no lonely pairs for this predictor

  • make the "noLP" strategy a central part of the new predictor
    • if the "--noLP" argument is not given or not true, provide a respective INFO that it is now set to "true"
    • consider only no-LP extensions, i.e
      • single base pair stacking extension ie. "|SEED"
      • two base pair stack extension i.e. "||SEED"
      • two base pair (stacked) interior loop extension i.e. "//.SEED"

2 - more efficient candidate storage and update

evaluate the following ideas for its performance impact and implement suitable ideas

  • use a tabular storage for all possible candidate loop combinations with a "two-base pair stack" extension
    • store therein whether the loop is possible/allowed (either via E != E_Inf or a dedicated boolean flag)
    • when checking all candidate extensions for one side, first do all complementarity checks to identify whether both extension base pairs are possible. do this in an order that minimizes redundant complementarity checks (maybe store within the candidate information individually whether a base pair can be formed such that partial formations can be looked up by neighbored/overlapping candidates)
    • afterwards, update respective energies and keep an updated reference to the best candidate so far (to avoid another traversal to identify it)
  • after picking the best candidate "Cb" from both sides (with delta energy < 0)
    • only recompute and check candidates of the same side as "Cb" (which are now invalid)
    • only update the energies for all candidates from the other side (and thus avoid additional complementarity checks etc.)

3 - no seed check

  • take any seed the seed handler provides (assuming it incoporates all constraints given so far)
  • do not check seed for lonely base pairs etc, they might be allowed in seeds eg. when the seed is user-provided

4 - pruning heuristic

the major goal of this predictor is to be

  • very fast (early pruning and reduced redundant computations),
  • inspired by the kinetic processes of interaction "zippering",
  • deterministic in its results (steepest decent)

reinvestigate whether the pruning heuristic without explicit energy (and complementarity) checks has the potential for speedup. the idea is to reduce the expensive energy evaluation that requires a lot of complementarity checks and sequence lookups. Thus, a lower energy bound for an extension is statically precomputed (and tabularized) for all possible interaction-end base pairs that can root an extension and is during extension checking compared with the ED costs for a respective extension. the lower bound can also incorporate estimates of respective "best-case" dangling end contributions etc. or use a reasonable static replacement value. it might be also fine to just ignore them, since this predictor implements a heuristic.

when using a strictly ordered lower bound estimate, it should be possible to prune larger loop extensions if the current loop extension is already positive, since the ED will only grow or stay the same with growing loop size.

if your analyses suggest only minor potential or central problems, implement a subclass of the current predictor that implements the sketched and revised strategy for later benchmarking with real world data and make it available via "--mode=L".

@Alexander-Mitrofanov Alexander-Mitrofanov changed the title Add deterministic kinetic seed extension mode Add deterministic kinetic seed extension with optional pruning Oct 5, 2026
@martin-raden

martin-raden commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

@Alexander-Mitrofanov

thanks, please revise:

(1) remove experimental pruned version

  • since the pruning was shown to be inferior, remove its implementation, referencing, benchmarking and documentation

(2) "IntaRNAkix" personality = "kinetic (seed) extension"

  • enable the "IntaRNAkix" personality in the commandlineparsing
    • sets default
      • "noLP=true"
  • add documentation in README.md
  • add "recursion" depiction in SVG format to "doc/recursions" to complement existing visualizations

(3) preliminary benchmark

  • do a small preliminary benchmark the new IntaRNAx personality against default IntaRNA
    • do for both with and without "noGU" for both
  • compare time and memory peak
  • compare minE deviation of IntaRNAkix from respective IntaRNA results
  • compare interaction length deviation (max subsequence length in query or target covered by interaction) of mfe of IntaRNAkix vs. respective IntaRNA call

@Alexander-Mitrofanov Alexander-Mitrofanov changed the title Add deterministic kinetic seed extension with optional pruning Add IntaRNAkix kinetic seed-extension personality Oct 5, 2026
@martin-raden
martin-raden merged commit d66b359 into master Oct 7, 2026
3 checks passed
@martin-raden
martin-raden deleted the feat/kinetic-seed-extension branch October 7, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants