{"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/transformer-based-time-to-event-prediction","title":"Transformer-based Time-to-Event Prediction for Chronic Kidney Disease Deterioration","arxiv_id":"2306.05779","date":"2023-06-09","proceeding":null,"authors":["Moshe Zisser","Dvir Aran"],"abstract":"Deep-learning techniques, particularly the transformer model, have shown great potential in enhancing the prediction performance of longitudinal health records. While previous methods have mainly focused on fixed-time risk prediction, time-to-event prediction (also known as survival analysis) is often more appropriate for clinical scenarios. Here, we present a novel deep-learning architecture we named STRAFE, a generalizable survival analysis transformer-based architecture for electronic health records. The performance of STRAFE was evaluated using a real-world claim dataset of over 130,000 individuals with stage 3 chronic kidney disease (CKD) and was found to outperform other time-to-event prediction algorithms in predicting the exact time of deterioration to stage 5. Additionally, STRAFE was found to outperform binary outcome algorithms in predicting fixed-time risk, possibly due to its ability to train on censored data. We show that STRAFE predictions can improve the positive predictive value of high-risk patients by 3-fold, demonstrating possible usage to improve targeting for intervention programs. Finally, we suggest a novel visualization approach to predictions on a per-patient basis. In conclusion, STRAFE is a cutting-edge time-to-event prediction algorithm that has the potential to enhance risk predictions in large claims datasets.","url_abs":"https://arxiv.org/abs/2306.05779v1","url_pdf":"https://arxiv.org/pdf/2306.05779v1.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":"transformer-based-time-to-event-prediction","repo_url":"https://github.com/dviraran/strafe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"survival-analysis","task_name":"Survival Analysis"},{"task_slug":"time-to-event-prediction","task_name":"Time-to-Event Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.05779","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.05779"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dviraran/strafe","reach":null}],"summary":{"ran_fixture":2,"ran_draft_wrong":2},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":4,"samples":[{"code_sha256_prefix":"c9c2a9d6ba3d2fb4","entry":"evaluate_risk_by_surv","repo":"dviraran/strafe","repo_kind":"official","path":"surv.py","file_url":"https://github.com/dviraran/strafe/blob/HEAD/surv.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c9c2a9d6ba3d2fb4"}},{"code_sha256_prefix":"e86ec096fad35866","entry":"get_batches","repo":"dviraran/strafe","repo_kind":"official","path":"prediction_preprocess.py","file_url":"https://github.com/dviraran/strafe/blob/HEAD/prediction_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e86ec096fad35866"}},{"code_sha256_prefix":"6e6ce18ab514b2a5","entry":"get_dict","repo":"dviraran/strafe","repo_kind":"official","path":"prediction_preprocess.py","file_url":"https://github.com/dviraran/strafe/blob/HEAD/prediction_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6e6ce18ab514b2a5"}},{"code_sha256_prefix":"a88b7d3db6372d55","entry":"survival_pre_process","repo":"dviraran/strafe","repo_kind":"official","path":"surv.py","file_url":"https://github.com/dviraran/strafe/blob/HEAD/surv.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a88b7d3db6372d55"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}