Add standalone IntaRNA 4.0 implementation - #231
Open
Alexander-Mitrofanov wants to merge 1 commit into
Open
Conversation
Introduce IntaRNAnew as an isolated C++23 implementation with native tools, correctness oracles, Legacy parity gates, benchmark fixtures, and an output-aware exact predictor optimized for ranked boundary and energy output.
Member
|
sorry @Alexander-Mitrofanov , didnt remember correctly, there is no dev branch... 🙄 |
Comment on lines
+253
to
+261
| ### 5.4 Scope | ||
|
|
||
| Equation (6) is exact for additive-pair noncrossing matchings with unit weights for allowed unpaired positions. It is used by: | ||
|
|
||
| - NativeAccessibility; and | ||
| - base-pair folding when noLP=false and noGUend=false. | ||
|
|
||
| It is **not** directly valid for Turner loop energies, noLP, or noGU-end, where a pair token has grammar state. Those cases retain the existing stateful/per-interval recurrence. A future extension must carry pair, stack, multiloop, and outside state indices. | ||
|
|
Member
There was a problem hiding this comment.
so is the speeup for turner energies or for some adapted energy model?
Comment on lines
+418
to
+433
| ### 9.2 Confirmed remaining defects | ||
|
|
||
| These findings affect both Legacy and Next unless marked otherwise. They were audited but not modified in this task. | ||
|
|
||
| | Status | Finding | Consequence | | ||
| |---|---|---| | ||
| | reproduced, source-confirmed | Heuristic noLP counts the direct stacked continuation and also admits the equivalent w1=w2=1 loop continuation, violating Equation (16). | Base-pair examples: length 4 exact Eall=-5.30 vs heuristic -5.46; length 5 exact -6.50 vs heuristic -6.73. The heuristic improperly has more weight than the exact recurrence. | | ||
| | reproduced, source-confirmed | Ensemble updateZ bypasses the base predictor's noGU-end and maxED filters and directly increments Zall. | One-base G/U reports Eall=-1 with noGU-end both false and true, although the true ensemble is empty; unchecked arithmetic can also overflow or propagate non-finite weights. | | ||
| | source-confirmed | Base-pair \(E_S\) uses full \(Q\), although its API defines substructures with at least one intramolecular pair. | Correct substructure energy is \(E_S=-RT\log(Q-1)\); whole-monomer energy remains \(-RT\log Q\). | | ||
| | reproduced, source-confirmed | PredictorMfeEns retains an unordered map keyed by all four site boundaries while the exact 2-D matrix is advertised as \(O(n_1n_2)\). | Retained space is \(O(n_1n_2L_1L_2)\), quartic at full length. Complementary toys used 9.6 MiB at n=20 and 106.2 MiB at n=50. | | ||
| | source-confirmed | Some seed predictors return before initZ on reuse. | Z/site state can leak from an earlier prediction. | | ||
| | source-confirmed | Out-of-range Nussinov getQb returns one rather than zero. | An invalid paired state contributes multiplicative identity. | | ||
| | source-confirmed, Legacy only | Seed extension adds independent Boltzmann factors instead of multiplying them; also duplicates adjacent noLP stacks and contains unsigned-overlap, one-past-end, and energy-vs-partition comparison faults. | Incorrect seed ensemble weights and boundary behavior. These seed defects were corrected in Next. | | ||
|
|
||
| For exact no-seed Legacy/Next prediction, each four-boundary site is completed once. A proposed optimization is to stream its energy directly into the top-k and Zall accumulators rather than retain the entire site map. This should restore the advertised \(O(n_1n_2)\) DP-space scale, but it has not been implemented here. | ||
|
|
Member
There was a problem hiding this comment.
nice, some of these bug can be easy fixed in the old code already..
Comment on lines
+540
to
+544
| ## 12. Remaining work | ||
|
|
||
| Priorities after this audit are: | ||
|
|
||
| 1. generalize output-aware compact prediction to nearest-neighbor energy, supported constraints, and on-demand traceback without weakening exact semantics; |
Member
There was a problem hiding this comment.
so this seems to be level 1 so far.. 😜
Member
|
Hi Alex, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IntaRNAnew/.Scope
This pull request adds only the
IntaRNAnew/directory. No existing Legacy source, build, documentation, or repository-root file is modified. Generated binaries, object files, archives, and profiling artifacts are excluded.Compatibility and performance
All 17 fixture configurations pass byte-for-byte comparison with IntaRNA Legacy. The three bounded biological workloads also pass byte-for-byte before timing. On the documented GCC 13.3 / AMD Ryzen 5 7530U single-thread benchmark, the optimized output-aware path achieved:
The benchmark methodology and its applicability limits are documented in
IntaRNAnew/benchmarks/README.md.Validation
IntaRNAnew 4.0.0.