Papers › LLM-CXR: Instruction-Finetuned LLM for CXR Image Understanding and Generation

LLM-CXR: Instruction-Finetuned LLM for CXR Image Understanding and Generation

19 May 2023arXiv:2305.11490archive 2025-07-28

Suhyeon Lee, Won Jun Kim, Jinho Chang, Jong Chul Ye

Following the impressive development of LLMs, vision-language alignment in LLMs is actively being researched to enable multimodal reasoning and visual IO. This direction of research is particularly relevant to medical imaging because medical image analysis and generation consist of reasoning based on a combination of visual features and prior knowledge. Many recent works have focused on training adapter networks that serve as an information bridge between image processing networks and LLMs; but presumably, in order to achieve maximum reasoning potential of LLMs on visual information as well, visual and language features should be allowed to interact more freely. This is especially important in the medical domain because understanding and generating medical images such as chest X-rays (CXR) require not only accurate visual and language-based reasoning but also a more intimate mapping between the two modalities. Thus, taking inspiration from previous work on the transformer and VQ-GAN combination for bidirectional image and text generation, we build upon this approach and develop a method for instruction-tuning an LLM pre-trained only on text to gain vision-language capabilities for medical images. Specifically, we leverage a pretrained LLM's existing question-answering and instruction-following abilities to teach it to understand visual inputs by instructing it to answer questions about image inputs and, symmetrically, output both text and image responses appropriate to a given query by tuning the LLM with diverse tasks that encompass image-based text-generation and text-based image-generation. We show that our model, LLM-CXR, trained in this approach shows better image-text alignment in both CXR understanding and generation tasks while being smaller in size compared to previously developed models that perform a narrower range of tasks. The code is at https://github.com/hyn2028/llm-cxr.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2305.11490")

Code

Syntology Ran 3 of 12 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hyn2028/llm-cxr officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 3 ran; 0 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran
9unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hyn2028/llm-cxr. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_special_token_id hyn2028/llm-cxr/training/generate.py official repository ran Apache-2.0 (permissive) · 5ac6edd1d97f00b5 · report
load_config hyn2028/llm-cxr/encode_cxr_all.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 4b147e0a54c3fa04 · report
load_config hyn2028/llm-cxr/decode_cxr_all.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 0222cdbcd972e8d5 · report
dicom_id_to_report_path hyn2028/llm-cxr/generate_eval.py official repository unverified Apache-2.0 (permissive) · c9c680550106172a · report
generate_response hyn2028/llm-cxr/training/generate.py official repository unverified Apache-2.0 (permissive) · 4ccce24e2e7398f3 · report
get_extract_vq_fun hyn2028/llm-cxr/training/mimiccxr_vq_dataset.py official repository unverified Apache-2.0 (permissive) · dc4f9e2e74c110e6 · report
get_inject_vq_fun hyn2028/llm-cxr/training/mimiccxr_vq_dataset.py official repository unverified Apache-2.0 (permissive) · a046345fa6ca4654 · report
is_contain_none hyn2028/llm-cxr/decode_cxr_all.py official repository unverified Apache-2.0 (permissive) · dc20a4a36d758c8a · report
load_model_tokenizer_for_generate hyn2028/llm-cxr/training/generate.py official repository unverified Apache-2.0 (permissive) · 2361a7cb0adc20ba · report
load_report hyn2028/llm-cxr/generate_eval.py official repository unverified Apache-2.0 (permissive) · 231c74d79d27f5c7 · report
load_training_dataset hyn2028/llm-cxr/training/trainer.py official repository unverified Apache-2.0 (permissive) · 43e5f30e3d4b5947 · report
parse_report_fi hyn2028/llm-cxr/generate_eval.py official repository unverified Apache-2.0 (permissive) · 4e8d51a19a596de2 · report

Tasks

Image GenerationInstruction FollowingMedical Image AnalysisMultimodal ReasoningQuestion AnsweringText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Adapter

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections