{"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/arxiv-2609-01839","title":"Import What You Need: Learning When and How to Augment EHR Graphs with External Knowledge","arxiv_id":"2609.01839","date":"2026-09-01","proceeding":null,"authors":["Chen Chen","Mohsen Nayebi Kerdabadi","Dongjie Wang","Mei Liu","Zijun Yao"],"abstract":"Longitudinal prediction from electronic health records (EHRs) is limited by the sparsity and irregularity in patient trajectories, and knowledge augmentation with external knowledge graphs (KGs) offers a promising way to alleviate these issues. However, most existing methods perform fixed, context-agnostic topology augmentation by adding the same KG nodes and edges regardless of a patient's evolving state. We propose ReTA, a Reinforcement learning-based dynamic Topology Augmentation framework that casts KG import as a per-visit, budget-aware policy. ReTA first constructs an offline refined pool of KG-grounded templates, then learns a policy to select one augment action per visit from three options: Soft Import, which enriches node features without modifying graph topology, Hard Import, which grafts a compact KG subgraph onto the visit graph to create message-passing shortcuts, and Skip, which leaves the visit unaugmented when the base encoder is already confident. To stabilize learning, ReTA employs a decoupled encoder that processes semantic and structural signals in separate channels and fuses them via adaptive gating. Experiments on MIMIC-III and MIMIC-IV across diagnosis prediction, mortality, and readmission show that ReTA consistently outperforms strong baselines while remaining efficient, transfers across datasets and knowledge graphs, and yields interpretable augmentation patterns. The robust gains under sparse supervision highlight the advantage of ReTA's dynamic decision to import knowledge, boosting accuracy while curbing costs.","url_abs":"https://arxiv.org/abs/2609.01839","url_pdf":"https://arxiv.org/pdf/2609.01839","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2609.01839","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2609.01839"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/ChenC2002/ReTA","reach":{"status":"ok"}}],"summary":{"unverified":25},"by_repo_kind":{"found_in_text":{"samples":25,"ran":0,"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":25,"samples":[{"code_sha256_prefix":"4af954ef22780642","entry":"acc_at_k","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/inference.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/inference.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":"4af954ef22780642"}},{"code_sha256_prefix":"331c0cf328786519","entry":"action_size","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/policy.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/policy.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":"331c0cf328786519"}},{"code_sha256_prefix":"8327da2731c7e966","entry":"auprc_micro","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/inference.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/inference.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":"8327da2731c7e966"}},{"code_sha256_prefix":"2c318594ce37a820","entry":"build_pyg_data","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/model.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/model.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":"2c318594ce37a820"}},{"code_sha256_prefix":"d0339f88d7581ecf","entry":"canonicalize_ccs_id","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/filtering.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/filtering.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":"d0339f88d7581ecf"}},{"code_sha256_prefix":"6b21382ae6a4a71b","entry":"ccs_token_to_label_index","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/model.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/model.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":"6b21382ae6a4a71b"}},{"code_sha256_prefix":"572dff0376dd05ea","entry":"decode_action","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/policy.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/policy.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":"572dff0376dd05ea"}},{"code_sha256_prefix":"fec8f63398ac2478","entry":"encode_action","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/policy.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/policy.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":"fec8f63398ac2478"}},{"code_sha256_prefix":"46993e5330d5b9bc","entry":"filter_artifact_objects","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/filtering.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/filtering.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":"46993e5330d5b9bc"}},{"code_sha256_prefix":"fdecf911bb51d56e","entry":"l2_normalize","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/clustering.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/clustering.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":"fdecf911bb51d56e"}},{"code_sha256_prefix":"2c60e196931224b2","entry":"labels_to_multihot_from_ccs_tokens","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/model.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/model.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":"2c60e196931224b2"}},{"code_sha256_prefix":"3a6418ccb448876e","entry":"load_concepts_csv","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/distill.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/distill.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":"3a6418ccb448876e"}},{"code_sha256_prefix":"ee9d2565c5d60abf","entry":"load_config","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/runtime.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/runtime.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":"ee9d2565c5d60abf"}},{"code_sha256_prefix":"c7fcf02385773f30","entry":"load_json_object_strict","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/runtime.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/runtime.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":"c7fcf02385773f30"}},{"code_sha256_prefix":"7680fc92c386e025","entry":"load_responses_jsonl","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/distill.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/distill.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":"7680fc92c386e025"}},{"code_sha256_prefix":"0b64df57e6173100","entry":"main","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/release.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/release.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":"0b64df57e6173100"}},{"code_sha256_prefix":"c820d4125a1fca71","entry":"micro_f1","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/inference.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/inference.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":"c820d4125a1fca71"}},{"code_sha256_prefix":"e4048f693e3311ce","entry":"normalize_mention","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/filtering.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/filtering.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":"e4048f693e3311ce"}},{"code_sha256_prefix":"96226b9dbce27f64","entry":"project_to_dim","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/clustering.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/clustering.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":"96226b9dbce27f64"}},{"code_sha256_prefix":"65d18fa01fd20af3","entry":"strict_json_loads","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/pool.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/pool.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":"65d18fa01fd20af3"}},{"code_sha256_prefix":"98f05746bab21cb5","entry":"validate_config","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/learning/runtime.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/learning/runtime.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":"98f05746bab21cb5"}},{"code_sha256_prefix":"211df013347b0e99","entry":"validate_grounded_template","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/pool.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/pool.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":"211df013347b0e99"}},{"code_sha256_prefix":"9996a47ef5f9d844","entry":"validate_knowledge_template","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/pool.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/pool.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":"9996a47ef5f9d844"}},{"code_sha256_prefix":"bb9dd6011082c1d1","entry":"validate_response","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/distill.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/distill.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":"bb9dd6011082c1d1"}},{"code_sha256_prefix":"744de9a762977aac","entry":"verify_release","repo":"ChenC2002/ReTA","repo_kind":"found_in_text","path":"reta/knowledge/release.py","file_url":"https://github.com/ChenC2002/ReTA/blob/HEAD/reta/knowledge/release.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":"744de9a762977aac"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_daily_20260903.json"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}