Papers › Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Survey

Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Survey

26 Sep 2024arXiv:2409.18169archive 2025-07-28

Tiansheng Huang, Sihao Hu, Fatih Ilhan, Selim Furkan Tekin, Ling Liu

Recent research demonstrates that the nascent fine-tuning-as-a-service business model exposes serious safety concerns -- fine-tuning over a few harmful data uploaded by the users can compromise the safety alignment of the model. The attack, known as harmful fine-tuning attack, has raised a broad research interest among the community. However, as the attack is still new, \textbf{we observe that there are general misunderstandings within the research community.} To clear up concern, this paper provide a comprehensive overview to three aspects of harmful fine-tuning: attacks setting, defense design and evaluation methodology. Specifically, we first present the threat model of the problem, and introduce the harmful fine-tuning attack and its variants. Then we systematically survey the existing literature on attacks/defenses/mechanical analysis of the problem. Finally, we introduce the evaluation methodology and outline future research directions that might contribute to the development of the field. Additionally, we present a list of questions of interest, which might be useful to refer to when reviewers in the peer review process question the realism of the experiment/attack/defense setting. A curated list of relevant papers is maintained and made accessible at: https://github.com/git-disl/awesome_LLM-harmful-fine-tuning-papers.

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

Code

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

By repository: community (archive-listed): 9 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.

git-disl/awesome_llm-harmful-fine-tuning-papers officialmentioned in papermentioned on GitHub report
git-disl/booster mentioned 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

9 samples harvested; 6 ran; 1 honoured the contract we drafted; 3 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 · honoured contract
3ran · our draft was wrong
2ran
3unverified

Licence: 0 of the 9 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 git-disl/booster. “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.

adapt_dimension_b2a git-disl/booster/loss_func/repnoise_loss.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · 175778f00233af46 · report
coherence_check git-disl/booster/poison/evaluation/eval_sentiment.py community (archive-listed) ran Apache-2.0 (permissive) · 1e9e4d30c8f0cc73 · report
extract_answer_number git-disl/booster/gsm8k/pred_eval.py community (archive-listed) ran fingerprinted Apache-2.0 (permissive) · c9b7e712eaf8afe1 · report
jload git-disl/booster/utils.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · d07d04439cd1d44f · report
masked_token_ce_loss git-disl/booster/loss_func/repnoise_loss.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · dbc0448520ee9257 · report
register_activation_hook git-disl/booster/loss_func/repnoise_loss.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · c605efc9460b6c33 · report
calculate_drift2first_embedding git-disl/booster/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 5f4323e1e87dc83b · report
get_leaf_modules_with_grad git-disl/booster/trainer.py community (archive-listed) unverified Apache-2.0 (permissive) · 88c8a24923c625a1 · report
track_embedding git-disl/booster/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · bda772180d04ada3 · report

Tasks

Safety Alignment

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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