Papers › Composed Fine-Tuning: Freezing Pre-Trained Denoising Autoencoders for Improved Generalization

Composed Fine-Tuning: Freezing Pre-Trained Denoising Autoencoders for Improved Generalization

29 Jun 2020arXiv:2006.16205archive 2025-07-28

Sang Michael Xie, Tengyu Ma, Percy Liang

We focus on prediction problems with structured outputs that are subject to output validity constraints, e.g. pseudocode-to-code translation where the code must compile. While labeled input-output pairs are expensive to obtain, "unlabeled" outputs, i.e. outputs without corresponding inputs, are freely available (e.g. code on GitHub) and provide information about output validity. We can capture the output structure by pre-training a denoiser to denoise corrupted versions of unlabeled outputs. We first show that standard fine-tuning after pre-training destroys some of this structure. We then propose composed fine-tuning, which fine-tunes a predictor composed with the pre-trained denoiser, which is frozen to preserve output structure. For two-layer ReLU networks, we prove that composed fine-tuning significantly reduces the complexity of the predictor, thus improving generalization. Empirically, we show that composed fine-tuning improves over standard fine-tuning on two pseudocode-to-code translation datasets (3% and 6% relative). The improvement from composed fine-tuning is magnified on out-of-distribution (OOD) examples (4% and 25% relative).

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

Code

Syntology Ran 2 of 14 code samples harvested from 2 repositories linked to this paper; 12 have no recorded run. Of those that ran: 2 ran · our draft was wrong.

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

p-lambda/composed_finetuning officialmentioned in papermentioned on GitHubpytorch report
p-lambda/unlabeled_outputs officialmentioned on GitHubpytorchMIT 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

14 samples harvested; 2 ran; 0 honoured the contract we drafted; 12 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
12unverified

Licence: 0 of the 14 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

concat_code p-lambda/composed_finetuning/code/evaluate_full.py official repository ran · our draft was wrong MIT (permissive) · c60712bd3a0d1e33 · report
parse_preds p-lambda/composed_finetuning/code/evaluate_full.py official repository ran · our draft was wrong MIT (permissive) · 60931bcb2604c46d · report
add_newlines p-lambda/unlabeled_outputs/code/pretty_print.py official repository unverified MIT (permissive) · e22284ad0b102063 · report
concat_code p-lambda/unlabeled_outputs/code/run_spoc.py official repository unverified MIT (permissive) · 49d63b429e4a4074 · report
concat_text p-lambda/unlabeled_outputs/code/run_spoc.py official repository unverified MIT (permissive) · 459ab85d861ca156 · report
encode p-lambda/unlabeled_outputs/code/run_synthetic.py official repository unverified MIT (permissive) · 465db07d479dc049 · report
fix_char_string_tok p-lambda/unlabeled_outputs/code/format_pairs.py official repository unverified MIT (permissive) · a0d03dc853adfbd0 · report
get_lens p-lambda/unlabeled_outputs/code/fairseq_modules/criterion.py official repository unverified MIT (permissive) · cd0dc7e8ddbce005 · report
pad p-lambda/unlabeled_outputs/code/fairseq_modules/criterion.py official repository unverified MIT (permissive) · 245dba3efa0406c1 · report
pad_before p-lambda/unlabeled_outputs/code/fairseq_modules/criterion.py official repository unverified MIT (permissive) · b9c973b50d3ba0a3 · report
parse_pred_file p-lambda/unlabeled_outputs/code/run_synthetic.py official repository unverified MIT (permissive) · 8f8d509260110fb3 · report
strip_ext p-lambda/unlabeled_outputs/code/run_spoc.py official repository unverified MIT (permissive) · 18e78e1f6ef94f00 · report
tokenize_code p-lambda/unlabeled_outputs/code/format_pairs.py official repository unverified MIT (permissive) · f4e1ee0459a1e883 · report
tokenize_text p-lambda/unlabeled_outputs/code/format_pairs.py official repository unverified MIT (permissive) · 6708dda8d2ddd583 · report

Tasks

Code TranslationDenoisingImage GenerationTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformer

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