{"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/2408-01933","title":"DiReCT: Diagnostic Reasoning for Clinical Notes via Large Language Models","arxiv_id":"2408.01933","date":"2024-08-04","proceeding":null,"authors":["Bowen Wang","Jiuyang Chang","Yiming Qian","Guoxin Chen","JunHao Chen","Zhouqiang Jiang","Jiahao Zhang","Yuta Nakashima","Hajime Nagahara"],"abstract":"Large language models (LLMs) have recently showcased remarkable capabilities, spanning a wide range of tasks and applications, including those in the medical domain. Models like GPT-4 excel in medical question answering but may face challenges in the lack of interpretability when handling complex tasks in real clinical settings. We thus introduce the diagnostic reasoning dataset for clinical notes (DiReCT), aiming at evaluating the reasoning ability and interpretability of LLMs compared to human doctors. It contains 511 clinical notes, each meticulously annotated by physicians, detailing the diagnostic reasoning process from observations in a clinical note to the final diagnosis. Additionally, a diagnostic knowledge graph is provided to offer essential knowledge for reasoning, which may not be covered in the training data of existing LLMs. Evaluations of leading LLMs on DiReCT bring out a significant gap between their reasoning ability and that of human doctors, highlighting the critical need for models that can reason effectively in real-world clinical scenarios.","url_abs":"https://arxiv.org/abs/2408.01933v4","url_pdf":"https://arxiv.org/pdf/2408.01933v4.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":"2408-01933","repo_url":"https://github.com/wbw520/direct","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diagnostic","task_name":"Diagnostic"},{"task_slug":null,"task_name":"Medical Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.01933","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.01933"}},"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/wbw520/DiReCT","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wbw520/direct","reach":{"status":"ok"}}],"summary":{"ran_fixture":2,"ran":8,"ran_violates":1,"unverified":2},"by_repo_kind":{"official":{"samples":13,"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":13,"samples":[{"code_sha256_prefix":"b47d48e431b34acd","entry":"apply_rotary_emb","repo":"wbw520/DiReCT","repo_kind":"official","path":"llama/model.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b47d48e431b34acd"}},{"code_sha256_prefix":"25a265296a382e27","entry":"cal_a_json","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_analysis.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_analysis.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":"25a265296a382e27"}},{"code_sha256_prefix":"8c024efc9f977616","entry":"count_words","repo":"wbw520/DiReCT","repo_kind":"official","path":"statistics.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/statistics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c024efc9f977616"}},{"code_sha256_prefix":"b976befb11609a23","entry":"deduction_assemble","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_analysis.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_analysis.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":"b976befb11609a23"}},{"code_sha256_prefix":"01feb38b3d96545e","entry":"gen_disease_diagnose","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_extraction.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_extraction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"01feb38b3d96545e"}},{"code_sha256_prefix":"dac01963d15ab8b0","entry":"gen_reasoning_advanced","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_extraction.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_extraction.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":"dac01963d15ab8b0"}},{"code_sha256_prefix":"ef16c1fb9ab307dc","entry":"gen_reasoning_initial","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_extraction.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_extraction.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":"ef16c1fb9ab307dc"}},{"code_sha256_prefix":"02283ca71ba62f66","entry":"get_name","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/data_analysis.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/data_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"02283ca71ba62f66"}},{"code_sha256_prefix":"e93cc5b705c2eb3b","entry":"precompute_freqs_cis","repo":"wbw520/DiReCT","repo_kind":"official","path":"llama/model.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e93cc5b705c2eb3b"}},{"code_sha256_prefix":"70bf6ebaafd266c4","entry":"reshape_for_broadcast","repo":"wbw520/DiReCT","repo_kind":"official","path":"llama/model.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/llama/model.py","link_basis":"harvester_set","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":"70bf6ebaafd266c4"}},{"code_sha256_prefix":"83cc3c258873fe88","entry":"sample_top_p","repo":"wbw520/DiReCT","repo_kind":"official","path":"llama/generation.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/llama/generation.py","link_basis":"plan_row","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":"83cc3c258873fe88"}},{"code_sha256_prefix":"1e8b760756a9188b","entry":"AskChatGPT","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/gpt_call.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/gpt_call.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":"1e8b760756a9188b"}},{"code_sha256_prefix":"5afc9234874b9087","entry":"AskGPTAzure","repo":"wbw520/DiReCT","repo_kind":"official","path":"utils/gpt_call.py","file_url":"https://github.com/wbw520/DiReCT/blob/HEAD/utils/gpt_call.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":"5afc9234874b9087"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}