Papers › MedAdapter: Efficient Test-Time Adaptation of Large Language Models towards Medical Reasoning

MedAdapter: Efficient Test-Time Adaptation of Large Language Models towards Medical Reasoning

5 May 2024arXiv:2405.03000archive 2025-07-28

Wenqi Shi, ran Xu, Yuchen Zhuang, Yue Yu, Haotian Sun, Hang Wu, Carl Yang, May D. Wang

Despite their improved capabilities in generation and reasoning, adapting large language models (LLMs) to the biomedical domain remains challenging due to their immense size and corporate privacy. In this work, we propose MedAdapter, a unified post-hoc adapter for test-time adaptation of LLMs towards biomedical applications. Instead of fine-tuning the entire LLM, MedAdapter effectively adapts the original model by fine-tuning only a small BERT-sized adapter to rank candidate solutions generated by LLMs. Experiments demonstrate that MedAdapter effectively adapts both white-box and black-box LLMs in biomedical reasoning, achieving average performance improvements of 25.48% and 11.31%, respectively, without requiring extensive computational resources or sharing data with third parties. MedAdapter also yields superior performance when combined with train-time adaptation, highlighting a flexible and complementary solution to existing adaptation methods. Faced with the challenges of balancing model performance, computational resources, and data privacy, MedAdapter provides an efficient, privacy-preserving, cost-effective, and transparent solution for adapting LLMs to the biomedical domain.

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="2405.03000")

Code

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

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

wshi83/medadapter officialmentioned in papermentioned on GitHubpytorch 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

16 samples harvested; 6 ran; 0 honoured the contract we drafted; 10 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.

1ran · our draft was wrong
5ran
10unverified

Licence: 16 of the 16 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 wshi83/medadapter. “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.

bioasq_judge wshi83/medadapter/eval_fn/bioasq_eval.py official repository ran fingerprinted no licence file found · pointer only · 998b73ea2c529621 · report
medmcqa_judge wshi83/medadapter/eval_fn/medmcqa_eval.py official repository ran fingerprinted no licence file found · pointer only · fc2923ceeac1f499 · report
medqa_judge wshi83/medadapter/eval_fn/medqa_eval.py official repository ran fingerprinted no licence file found · pointer only · fd06b5e606986d89 · report
mmlu_judge wshi83/medadapter/eval_fn/mmlu_eval.py official repository ran fingerprinted no licence file found · pointer only · e30a72d4f5561a07 · report
prepare_prompts wshi83/MedAdapter/reward_model/orm/orm_guide.py official repository ran · our draft was wrong no licence file found · pointer only · a5c4afa103aa6d76 · report
pubmedqa_judge wshi83/medadapter/eval_fn/pubmedqa_eval.py official repository ran fingerprinted no licence file found · pointer only · 62f83829e4fb5a25 · report
bioasq_metrics wshi83/medadapter/eval_fn/bioasq_eval.py official repository unverified no licence file found · pointer only · 80b367feb77c593c · report
generate wshi83/MedAdapter/reward_model/orm/orm_guide.py official repository unverified no licence file found · pointer only · 7fe7aafc5afb6d9b · report
get_datasets wshi83/MedAdapter/reward_model/orm/orm_guide.py official repository unverified no licence file found · pointer only · ee2a47559197dba0 · report
load_model wshi83/medadapter/generator/vanilla_trainer.py official repository unverified no licence file found · pointer only · 3ceed634ac6ca1d2 · report
load_prompts wshi83/MedAdapter/reward_model/orm/orm_guide.py official repository unverified no licence file found · pointer only · 537590c07503fa34 · report
medmcqa_metrics wshi83/medadapter/eval_fn/medmcqa_eval.py official repository unverified no licence file found · pointer only · 44cf71f1d0538dbd · report
medqa_metrics wshi83/medadapter/eval_fn/medqa_eval.py official repository unverified no licence file found · pointer only · 19fe01ffbad9b874 · report
mmlu_metrics wshi83/medadapter/eval_fn/mmlu_eval.py official repository unverified no licence file found · pointer only · a181c5f5aa10d4e4 · report
orm_guided_generation wshi83/MedAdapter/reward_model/orm/orm_guide.py official repository unverified no licence file found · pointer only · 5954c78296a000d6 · report
pubmedqa_metrics wshi83/medadapter/eval_fn/pubmedqa_eval.py official repository unverified no licence file found · pointer only · f76f5726f4c301f8 · report

Tasks

Privacy PreservingTest-time Adaptation

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