{"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/pragmatic-radiology-report-generation","title":"Pragmatic Radiology Report Generation","arxiv_id":"2311.17154","date":"2023-11-28","proceeding":null,"authors":["Dang Nguyen","Chacha Chen","He He","Chenhao Tan"],"abstract":"When pneumonia is not found on a chest X-ray, should the report describe this negative observation or omit it? We argue that this question cannot be answered from the X-ray alone and requires a pragmatic perspective, which captures the communicative goal that radiology reports serve between radiologists and patients. However, the standard image-to-text formulation for radiology report generation fails to incorporate such pragmatic intents. Following this pragmatic perspective, we demonstrate that the indication, which describes why a patient comes for an X-ray, drives the mentions of negative observations and introduce indications as additional input to report generation. With respect to the output, we develop a framework to identify uninferable information from the image as a source of model hallucinations, and limit them by cleaning groundtruth reports. Finally, we use indications and cleaned groundtruth reports to develop pragmatic models, and show that they outperform existing methods not only in new pragmatics-inspired metrics (+4.3 Negative F1) but also in standard metrics (+6.3 Positive F1 and +11.0 BLEU-2).","url_abs":"https://arxiv.org/abs/2311.17154v1","url_pdf":"https://arxiv.org/pdf/2311.17154v1.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":"pragmatic-radiology-report-generation","repo_url":"https://github.com/chicagohai/llm_radiology","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-to-text","task_name":"Image to text"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.17154","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.17154"}},"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/chicagohai/llm_radiology","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"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":10,"samples":[{"code_sha256_prefix":"b59ac1362f3babba","entry":"compute_f1","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"CXRMetric/radgraph_evaluate_model.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/CXRMetric/radgraph_evaluate_model.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":"b59ac1362f3babba"}},{"code_sha256_prefix":"d07d04439cd1d44f","entry":"jload","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"utils_finetune.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/utils_finetune.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d07d04439cd1d44f"}},{"code_sha256_prefix":"901146a5701ee1fc","entry":"labels_to_eng","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"format_llama_input.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/format_llama_input.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":"901146a5701ee1fc"}},{"code_sha256_prefix":"94b4f8f928186191","entry":"load_preprocessed_data","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"image_model/utils.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/image_model/utils.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":"94b4f8f928186191"}},{"code_sha256_prefix":"d0bf828601477d5a","entry":"normalize","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"image_model/utils.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/image_model/utils.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":"d0bf828601477d5a"}},{"code_sha256_prefix":"71d87fbd996af446","entry":"parse_entity_relation","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"CXRMetric/radgraph_evaluate_model.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/CXRMetric/radgraph_evaluate_model.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":"71d87fbd996af446"}},{"code_sha256_prefix":"817d5f759487007d","entry":"preprocess","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/finetune.py","link_basis":"harvester_set","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":"817d5f759487007d"}},{"code_sha256_prefix":"94711428e0791fe9","entry":"format_input","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"format_llama_input.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/format_llama_input.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":"94711428e0791fe9"}},{"code_sha256_prefix":"ebb1cebbcdf9c443","entry":"openai_completion","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"utils_finetune.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/utils_finetune.py","link_basis":"harvester_set","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":"ebb1cebbcdf9c443"}},{"code_sha256_prefix":"254c1775d00406f6","entry":"write_report","repo":"chicagohai/llm_radiology","repo_kind":"official","path":"pragmatic_llama_inference.py","file_url":"https://github.com/chicagohai/llm_radiology/blob/HEAD/pragmatic_llama_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":"254c1775d00406f6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}