{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/rfold-towards-simple-yet-effective-rna","title":"Deciphering RNA Secondary Structure Prediction: A Probabilistic K-Rook Matching Perspective","arxiv_id":"2212.14041","date":"2022-12-02","proceeding":null,"authors":["Cheng Tan","Zhangyang Gao","Hanqun Cao","Xingran Chen","Ge Wang","Lirong Wu","Jun Xia","Jiangbin Zheng","Stan Z. Li"],"abstract":"The secondary structure of ribonucleic acid (RNA) is more stable and accessible in the cell than its tertiary structure, making it essential for functional prediction. Although deep learning has shown promising results in this field, current methods suffer from poor generalization and high complexity. In this work, we reformulate the RNA secondary structure prediction as a K-Rook problem, thereby simplifying the prediction process into probabilistic matching within a finite solution space. Building on this innovative perspective, we introduce RFold, a simple yet effective method that learns to predict the most matching K-Rook solution from the given sequence. RFold employs a bi-dimensional optimization strategy that decomposes the probabilistic matching problem into row-wise and column-wise components to reduce the matching complexity, simplifying the solving process while guaranteeing the validity of the output. Extensive experiments demonstrate that RFold achieves competitive performance and about eight times faster inference efficiency than the state-of-the-art approaches. The code and Colab demo are available in (http://github.com/A4Bio/RFold).","url_abs":"https://arxiv.org/abs/2212.14041v5","url_pdf":"https://arxiv.org/pdf/2212.14041v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"rfold-towards-simple-yet-effective-rna","repo_url":"https://github.com/a4bio/rfold","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"prediction","task_name":"Prediction"}],"methods":[{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.14041","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.14041"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/A4Bio/RFold","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/a4bio/rfold","reach":null}],"summary":{"ran":5,"ran_fixture":2,"ran_honours":1,"ran_violates":1,"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"official":{"samples":16,"ran":11,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":16,"samples":[{"code_sha256_prefix":"bc824e2712a77b8d","entry":"Attn","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bc824e2712a77b8d"}},{"code_sha256_prefix":"0d6146adbe3206db","entry":"Encoder","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d6146adbe3206db"}},{"code_sha256_prefix":"7b4da453e72285da","entry":"OffsetScale","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7b4da453e72285da"}},{"code_sha256_prefix":"fcbdfa01af751180","entry":"Seq2Map","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fcbdfa01af751180"}},{"code_sha256_prefix":"a8a4b0c4e2ef17bd","entry":"constraint_matrix","repo":"A4Bio/RFold","repo_kind":"official","path":"colab_utils.py","file_url":"https://github.com/A4Bio/RFold/blob/HEAD/colab_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a8a4b0c4e2ef17bd"}},{"code_sha256_prefix":"6a624c6fa3c672fc","entry":"constraint_matrix","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a624c6fa3c672fc"}},{"code_sha256_prefix":"c8db3b7816ada110","entry":"conv_block","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c8db3b7816ada110"}},{"code_sha256_prefix":"9b299e0707723f56","entry":"cuda","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b299e0707723f56"}},{"code_sha256_prefix":"4d122e4bd4ea1cd8","entry":"evaluate_result","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d122e4bd4ea1cd8"}},{"code_sha256_prefix":"172830c85c7ba81a","entry":"row_col_argmax","repo":"A4Bio/RFold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/A4Bio/RFold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"172830c85c7ba81a"}},{"code_sha256_prefix":"86c9fd8a8f60416b","entry":"row_col_softmax","repo":"A4Bio/RFold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/A4Bio/RFold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"86c9fd8a8f60416b"}},{"code_sha256_prefix":"d751f74cab53faf4","entry":"Decoder","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d751f74cab53faf4"}},{"code_sha256_prefix":"ce8e74a24e0f0310","entry":"RFold","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce8e74a24e0f0310"}},{"code_sha256_prefix":"ca851900b4c92cfa","entry":"RFold_Model","repo":"a4bio/rfold","repo_kind":"official","path":"rfold.py","file_url":"https://github.com/a4bio/rfold/blob/HEAD/rfold.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca851900b4c92cfa"}},{"code_sha256_prefix":"d7ea5f3a8a5fc962","entry":"base_matrix","repo":"A4Bio/RFold","repo_kind":"official","path":"colab_utils.py","file_url":"https://github.com/A4Bio/RFold/blob/HEAD/colab_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d7ea5f3a8a5fc962"}},{"code_sha256_prefix":"e99bcac3fb72f44a","entry":"sequence2onehot","repo":"A4Bio/RFold","repo_kind":"official","path":"colab_utils.py","file_url":"https://github.com/A4Bio/RFold/blob/HEAD/colab_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"OPAQUE_PARAMS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e99bcac3fb72f44a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}