Papers
Topics
Authors
Recent
Search
2000 character limit reached

Bootstrap Your Generator (ByG) Overview

Updated 4 July 2026
  • ByG is a bootstrapping paradigm that uses internally generated training signals to improve generative models in math and visual tasks.
  • It employs diverse augmentation strategies like rephrasing, backward reasoning, and AnsAug to enrich problem-solving and reasoning diversity.
  • In visual editing, ByG integrates flow matching, cycle consistency, and gradient routing to enable effective unpaired image and video editing.

Bootstrap Your Generator (ByG) denotes a bootstrapping paradigm in which a generator produces additional training signals that are then used to improve the generator itself or a closely related model. In the mathematical reasoning setting of MetaMath, ByG is operationalized by rewriting seed math problems from multiple perspectives, filtering the generated variants for correctness, curating MetaMathQA, and fine-tuning LLaMA-2 so that its own reasoning improves (Yu et al., 2023). In unpaired visual editing with flow matching, ByG is a general framework for training image and video editing models from unpaired data by combining instruction-following cues extracted from a frozen base model, cycle consistency for structure preservation, and a gradient-routing mechanism that evaluates losses on clean predictions while training at noisy states (Tewel et al., 2 Jun 2026). The term therefore refers not to a single architecture, but to a recurring strategy: exploit an existing generator or base generative prior to synthesize intrinsically supervised training data in regimes where paired supervision is costly or sparse.

1. Conceptual scope and shared structure

ByG appears in two distinct but structurally related formulations. In MetaMath, the generator is initially GPT-3.5-Turbo for synthesis and ultimately the fine-tuned MetaMath model; the bootstrap signal comes from synthetically generated question diversity, especially multi-perspective rewriting, and the target capability is mathematical reasoning (Yu et al., 2023). In flow-matching visual editing, the trainable component is an editing model adapted from a pretrained text-to-image or text-to-video base model, and the bootstrap signal comes from intrinsic cues extracted from the frozen base model together with reversibility constraints (Tewel et al., 2 Jun 2026).

The common pattern is the replacement of expensive external supervision with internally generated or internally extracted supervision. In MetaMath, the bottleneck is high-quality math problems and diverse reasoning paths, which are costly to author and sparse. ByG addresses this by generating new variants of existing questions, including rephrased, backward, and forward forms, thereby increasing distributional diversity and coverage of reasoning directions without external domain knowledge (Yu et al., 2023). In visual editing, the bottleneck is paired “before–after” data in the exact edit domain, which is tractable for common edits but impractical for long-tail transformations and prohibitively expensive for video. ByG addresses this by extracting instruction-following cues from a frozen text-to-image or text-to-video model and enforcing cycle consistency, again without external reward or guidance models (Tewel et al., 2 Jun 2026).

A frequent misunderstanding is to treat ByG as synonymous with naive self-augmentation. The evidence reported in MetaMath is narrower and more specific: accuracy saturates with naive AnsAug, but keeps increasing with question bootstrapping, particularly rephrasing and backward reasoning (Yu et al., 2023). The visual editing framework makes a parallel distinction: bootstrapping is not merely noising the source or running a zero-shot editor, because bootstrapping noisy inputs via EMA rollouts is described as crucial, and removing bootstrapping degrades both edit success and source preservation (Tewel et al., 2 Jun 2026).

2. ByG in MetaMath: mathematical question bootstrapping

MetaMath was proposed to bridge the gap between open-source LLMs and satisfactory mathematical problem solving. The problem framing is explicit: mathematical problems require symbolic, multi-step reasoning, precise calculation, and generalization across forms such as forward, backward, and compositional steps; pretrained open-source models like LLaMA-2 are not trained on enough math-specific reasoning traces, underperform on GSM8K and MATH even with chain-of-thought prompting, and struggle with backward or “reversal” tasks (Yu et al., 2023).

The ByG formulation in MetaMath begins from seed sets drawn from the GSM8K and MATH training sets. It then creates multiple, diverse problem variants that probe different reasoning directions, solves and filters those variants to ensure correctness, curates a large dataset called MetaMathQA, and fine-tunes LLaMA-2 on that dataset (Yu et al., 2023). This is a single-pass bootstrapping pipeline rather than an iterated self-play loop. The paper emphasizes that one well-designed pass suffices for the reported gains.

MetaMathQA is composed of four augmentation streams. Answer Augmentation (AnsAug) samples multiple correct reasoning paths and answers for each original question using few-shot CoT prompting with temperature sampling on GPT-3.5-Turbo, retaining only outputs with the ground-truth answer. Rephrasing generates new questions stating the same problem from different linguistic angles, then solves each rephrased problem and retains only those whose answer matches the original ground truth. Backward Reasoning via Self-Verification (SV) rewrites a question and its answer into a declarative statement, appends a backward query asking for an unknown quantity, and accepts the output if plugging the predicted value back into the original problem recomputes the original answer. Backward Reasoning via FOBAR avoids the declarative rewrite by appending the known final answer directly to the question and asking for the unknown variable, again accepting only verifiably consistent outputs (Yu et al., 2023).

The motivation for these streams is differentiated. AnsAug increases path diversity without changing the question. Rephrasing diversifies surface forms and reasoning triggers without adding knowledge. SV and FOBAR introduce backward questions that train models to reason from the answer back to inputs, thereby addressing the underrepresentation of backward reasoning in typical math datasets and combating the “reversal curse,” summarized as the failure to generalize from learning ABA \rightarrow B to BAB \rightarrow A (Yu et al., 2023).

3. MetaMathQA construction, objective, and empirical behavior

The curated dataset scale is reported explicitly. MetaMathQA-GSM8K contains 240K examples, approximately 80K AnsAug, 80K Rephrasing, 40K SV, and 40K FOBAR. MetaMathQA-MATH contains 155K examples, approximately 75K AnsAug, 50K Rephrasing, 15K SV, and 15K FOBAR. The total MetaMathQA corpus contains 395K items and spans forward and backward perspectives with strong linguistic diversity from rephrasing (Yu et al., 2023).

The pipeline consists of generation, filtering and selection, dataset curation, fine-tuning, evaluation, and possible iteration. During curation, the four data subsets are merged, formatting is standardized with CoT and the suffix “The answer is: …”, duplicates are removed, and diversity is checked. Fine-tuning uses supervised maximum-likelihood training on reasoning traces conditioned on questions:

L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).

The equivalent token-level cross-entropy form is also given:

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).

To quantify added diversity from new data DnewD_{\text{new}} relative to a base set DbaseD_{\text{base}}, the paper defines

dgain=1MxiDnewminxjDbasef(xi)f(xj)22,d_{\text{gain}}=\frac{1}{M}\sum_{x_i\in D_{\text{new}}}\min_{x_j\in D_{\text{base}}}\|f(x_i)-f(x_j)\|_2^2,

with ff as a text embedding function, instantiated in the paper by text-embedding-ada-002 (Yu et al., 2023).

The base models are LLaMA-2 7B, 13B, and 70B. Full fine-tuning is used for 7B and 13B, while 70B uses QLoRA due to resource limits. The full fine-tuning configuration is AdamW for 3 epochs, batch size 128, 8×A100 GPUs, learning rate 2×1052\times 10^{-5}, and 3% warmup. The 70B QLoRA configuration uses LoRA rank 96, α=16\alpha = 16, dropout 0.05 on attention and MLP, and AdamW with learning rate BAB \rightarrow A0 and no warmup. Training uses Alpaca-style instruction-response prompts, with the question placed in the instruction and the response ending in “The answer is: {gold}”. Evaluation is zero-shot with “Let’s think step by step.” and temperature BAB \rightarrow A1 for the fine-tuned LLaMA models (Yu et al., 2023).

On the reported benchmarks, Base LLaMA-2-7B achieves 14.6% on GSM8K and 2.5% on MATH, whereas MetaMath-7B reaches 66.5% on GSM8K and 19.8% on MATH, reported elsewhere as approximately 66.4% and 19.4%. The gains over same-size open-source baselines are +11.6% on GSM8K relative to WizardMath 54.9 and +9.1% on MATH relative to WizardMath 10.7. MetaMath-13B reaches 72.3% on GSM8K and 22.4% on MATH. MetaMath-70B reaches 82.3% on GSM8K and 26.6% on MATH, slightly better than GPT-3.5-Turbo on GSM8K at 80.8% (Yu et al., 2023).

The ablation narrative is central to the ByG interpretation. AnsAug or rephrasing alone performs better than SFT; combining AnsAug and rephrasing helps slightly; adding SV and FOBAR yields another approximately 4% GSM8K improvement and larger MATH gains. Adding 20K rephrasing, SV, or FOBAR samples increased diversity gain and accuracy with Pearson 0.972 correlation. By contrast, naive AnsAug saturates quickly with low diversity gain. The paper also reports a “less is more” effect: merging external RFT data with MetaMathQA hurt performance consistently across model sizes, indicating that quality and diversity matter more than sheer volume. A further non-obvious result is that training on a matched-size set of incorrect-answer CoT traces still beat SFT on GSM8K, 43.6% versus 41.6%, which the paper attributes to the utility of correct intermediate steps and process supervision (Yu et al., 2023).

4. ByG in unpaired visual editing with flow matching

The 2026 ByG framework addresses a different setting: unpaired training of flow-matching image and video editing models. The motivating claim is that modern generative models possess strong visual understanding, but training them for editing typically requires massive paired datasets, which limits scalability and is especially restrictive for video editing (Tewel et al., 2 Jun 2026). ByG is proposed as a general framework for unpaired training of flow matching editing models that leverages the base model’s knowledge without any external signal.

The base models differ by modality. For images, a pretrained FLUX.1-dev text-to-image model serves both as the initialization for the editing network, finetuned with LoRA rank 64, and as a frozen prior expert that provides semantic velocity signals for instruction following. For video, a pretrained Wan2.2 text-to-video model is adapted similarly and the same objectives are applied to video latents. The frozen components are the base text-to-image or text-to-video model used for prior velocities and an EMA copy of the editing model that is treated as frozen when generating pseudo-targets during training; the trainable parameters are the editing model’s LoRA weights (Tewel et al., 2 Jun 2026).

The editing architecture is a velocity network BAB \rightarrow A2 that takes noisy image or video latents BAB \rightarrow A3 and conditions on source content BAB \rightarrow A4 together with an edit instruction BAB \rightarrow A5 or inverse instruction BAB \rightarrow A6. For video, source tokens share positional encodings with input tokens to align space-time features. The formulation uses flow matching or rectified flows with linear interpolation

BAB \rightarrow A7

where BAB \rightarrow A8 and BAB \rightarrow A9. Multi-step integration from L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).0 to L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).1 yields clean outputs (Tewel et al., 2 Jun 2026).

The intrinsic supervision consists of two components. First, instruction-following cues are extracted from the frozen base model by contrasting its velocities for the target caption L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).2 and source caption L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).3 at the same noisy state. The difference L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).4 is used as a semantic edit-direction signal. Second, cycle consistency enforces structure preservation by using the forward edit’s prediction as the condition for the reverse edit under the inverse instruction, requiring reconstruction of the source. This pairing prevents the editor from drifting away from source content (Tewel et al., 2 Jun 2026).

The framework is explicitly positioned against approaches that depend on external reward or guidance models. The paper states that no external reward or CLIP/LLM scoring is used for the instruction-following cues; instead, the frozen base model’s own semantics provide the prior supervision. It is also positioned relative to supervised methods such as Kontext, Ditto, and Qwen-Image-Edit, and relative to unpaired or diffusion-based families such as CycleGAN, UNIT-DDPM-style works, FlowEdit, and NP-Edit. The specific claim is that ByG tailors flow matching to unpaired editing with EMA bootstrapping and STE-style gradient routing, while NP-Edit uses an external VLM reward and ByG removes external supervision by leveraging the frozen base model’s own semantics and cycle consistency (Tewel et al., 2 Jun 2026).

5. Losses, gradient routing, and train–inference alignment

The central technical contribution in the visual framework is gradient routing from clean predictions to noisy training states. The stated problem is a train–inference gap: inference uses many-step denoising to produce clean outputs, but training losses computed at noisy steps require conditioning on clean images to maintain fidelity. One-step predictions at large L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).5 are blurry, and conditioning the reverse pass on such degraded images causes the model to ignore the condition (Tewel et al., 2 Jun 2026).

The prior loss combines direction-only alignment and magnitude anchoring. With forward velocity

L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).6

and frozen base velocities L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).7 and L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).8, the directional term is

L(θ)=(q,r,a)DMetaMathQAlogPθ(rq).L(\theta)=\sum_{(q,r,a)\in D_{\text{MetaMathQA}}}\log P_\theta(r\mid q).9

the magnitude term is

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).0

and the prior loss is

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).1

The cycle-consistency loss uses the one-step prediction

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).2

a noised source

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).3

and reverse velocity

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).4

to define

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).5

An identity loss is also added:

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).6

The total objective is

L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).7

To bridge the train–inference gap, the reverse pass is conditioned on a clean estimate L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).8 obtained by running the frozen EMA model from L(θ)=(x,y)Dtlogpθ(yty<t,x).L(\theta)=-\sum_{(x,y)\in D}\sum_t \log p_\theta(y_t\mid y_{<t},x).9 to DnewD_{\text{new}}0, while gradients are routed through the one-step prediction using

DnewD_{\text{new}}1

The derivative DnewD_{\text{new}}2 is therefore the identity, so downstream gradients flow through DnewD_{\text{new}}3 and then to DnewD_{\text{new}}4 via DnewD_{\text{new}}5 (Tewel et al., 2 Jun 2026).

Training details are given separately for images and video. Image training uses FLUX.1-dev with LoRA rank 64, AdamW with weight decay DnewD_{\text{new}}6, learning rate DnewD_{\text{new}}7, batch size 8, and 30,000 steps; the reported loss weights are DnewD_{\text{new}}8, DnewD_{\text{new}}9, and DbaseD_{\text{base}}0, with a 200-step identity warmup, random identity steps with 15% probability, and 10 EMA integration steps to produce DbaseD_{\text{base}}1. Video training uses learning rate DbaseD_{\text{base}}2, 8×H100 GPUs, batch size 8, 750 steps, resolution DbaseD_{\text{base}}3, identity probability 10%, logit-normal timestep sampling with shift DbaseD_{\text{base}}4, and UniPC inference at DbaseD_{\text{base}}5. The reported per-step cost is about DbaseD_{\text{base}}6 supervised training, 2.9s versus 0.97s, but useful edits appear after approximately 1,000 steps (Tewel et al., 2 Jun 2026).

6. Evaluation, limitations, and broader significance

The visual ByG paper reports results on video editing, long-tail style editing, general image editing, and ablations. On the video benchmark spanning cartoon↔photorealistic editing, including OOD 3D-CGI inputs, the supervised baseline is Ditto trained on one million video editing pairs on WAN-VACE. In the user study with 8 participants, 238 votes, and 119 tasks, ByG wins 70.0%±5.4% on cartoon targets, 80.5%±2.9% on photorealistic targets, and 75.3%±2.2% overall, with binomial test DbaseD_{\text{base}}7, Fleiss’ DbaseD_{\text{base}}8, and 85% wins on OOD CGI inputs. Quantitative metrics show CLIP directional similarity 0.104±0.005 versus 0.091±0.007, DINO per-frame similarity 0.718±0.012 versus 0.536±0.017, and Motion Fidelity 0.715±0.020 versus 0.616±0.020 in favor of ByG; the VBench scores are mixed, with Dynamic Degree 0.597±0.045 versus 0.560±0.048, Aesthetic 0.574±0.007 versus Ditto 0.585±0.007, and Temporal Flicker 0.967±0.003 versus Ditto 0.972±0.003 (Tewel et al., 2 Jun 2026).

On long-tail style editing across 12 directions and 487 edits, the baselines are FLUX-Kontext, Qwen-Image-Edit, and FlowEdit. ByG achieves the best VIEScore/Qwen2.5-VL-72B overall scores in both Style→Photorealistic and Photorealistic→Style. On GEdit-Bench, ByG outperforms Kontext on motion change, human edits, and style change, while Kontext excels on subject removal and text manipulation, which the paper attributes to the benefits of explicit paired supervision (Tewel et al., 2 Jun 2026). The ablations also expose the role of each component. Removing gradient routing or cycle loss increases edit strength but harms preservation; removing the regularization loss causes identity collapse; removing bootstrapping degrades both edit success and source preservation (Tewel et al., 2 Jun 2026).

Both ByG formulations report limitations that bound the scope of their claims. MetaMath notes limited coverage of very advanced competition math and tool-usage tasks such as formal proofs and program synthesis. It also notes that backward generation for complex word problems can be tricky because SV rewriting can introduce errors, although FOBAR mitigates this. Rephrasing may introduce stylistic biases from GPT-3.5-Turbo, and rigorous deduplication and leakage checks are required for test integrity (Yu et al., 2023). The visual ByG framework inherits the knowledge and biases of the base model; if the base model does not understand the target domain, edits will be weak. Object removal and text edits are weaker because the target caption typically omits entities instead of explicitly encoding absence, which reduces the strength of the directional prior for removal (Tewel et al., 2 Jun 2026).

Taken together, these two lines of work suggest a broader interpretation of ByG as a family of intrinsic-supervision strategies. In MetaMath, question diversity and backward reasoning are the crucial ingredients for bootstrapping mathematical intelligence. In flow-matching visual editing, pseudo-target rollouts, semantic cue extraction from a frozen base model, cycle consistency, and gradient routing are the crucial ingredients for unpaired editing. The shared implication is not that generators can improve without constraints, but that a carefully designed bootstrap process can convert existing generative competence into new supervised structure when direct annotation is scarce (Yu et al., 2023).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Bootstrap Your Generator (ByG).