Papers
Topics
Authors
Recent
Search
2000 character limit reached

Scale-Aware Prompt Decoder

Updated 7 December 2025
  • Scale-Aware Prompt Decoder is a lightweight, inference-time module that adaptively selects optimal classifier-free guidance scales for each prompt.
  • It leverages a data-driven synthetic oracle and a compact multi-layer perceptron to model prompt-semantics and guide quality predictions without retraining the backbone.
  • Empirical validation on image and audio tasks shows enhanced generative fidelity, improved alignment, and superior perceptual quality compared to fixed guidance scales.

A Scale-Aware Prompt Decoder is a lightweight, inference-time module that predicts and selects the optimal classifier-free guidance scale (CFG scale) for each input prompt in text-to-image or text-to-audio diffusion models. Traditional CFG uses a fixed guidance scale, which has limited ability to generalize across prompts of varying semantic complexity. A scale-aware approach adaptively chooses the guidance strength per prompt, enhancing generative fidelity, prompt alignment, and perceptual quality without additional backbone retraining. The methodology is underpinned by modeling the dependence of multi-metric generation quality on both prompt semantics and the guidance scale, realized through a fully data-driven synthetic oracle and a trained multi-layer perceptron predictor (Zhang et al., 25 Sep 2025).

1. Construction of the Synthetic Oracle Dataset

To capture the relationship between prompt, guidance scale, and generation quality, a synthetic dataset is constructed as follows:

  • Prompt Pool: For image tasks, approximately 8,000 prompts are randomly sampled from MSCOCO 2014 captions. For audio tasks, about 6,000 from AudioCaps.
  • Guidance Scales (S={s1,,sK}S=\{s_1,\ldots,s_K\}): A discrete set of candidate scales (e.g., $1.0$ to $10.0$ in $0.5$ steps, with K19K\approx19).
  • Sample Generation: For each prompt pp and each scale sSs\in S, a pretrained diffusion model (SDXL for images or AudioLDM2 for audio) is run NgN_g times (e.g., Ng=4N_g=4) under CFG with guidance weight ss, generating outputs $1.0$0.
  • Quality Metric Evaluation:
    • Images: Metrics $1.0$1 include KID, CLIP, ImageReward, Precision, Recall.
    • Audio: Metrics $1.0$2 include AudioBox-Aesthetics, and optionally FAD and CLAP score.
  • Oracle Aggregation: For each metric $1.0$3,

$1.0$4

with $1.0$5 the oracle quality vector for prompt/scale pair.

This dataset forms the empirical basis for supervised training of the predictor.

2. Architecture of the Lightweight Predictor

The scale-aware decoder is a compact, feed-forward multi-layer perceptron with the following components:

  • Inputs:
    • Semantic embedding $1.0$6: Extracted from a frozen vision-language encoder (CLIP for images, $1.0$7; CLAP for audio, $1.0$8).
    • Complexity features $1.0$9: Metrics such as prompt length, token entropy, perplexity, modifier diversity, punctuation count; projected via $10.0$0, with $10.0$1.
    • Scale $10.0$2 (normalized to $10.0$3).
    • Concatenated vector: $10.0$4.
  • Network:
    • 2–3 fully connected layers (hidden sizes $10.0$5), ReLU activations, optional dropout ($10.0$6).
    • Output layer returns $10.0$7 estimated metric values.
  • Output:
    • $10.0$8, per-metric.

The total parameter count is $10.0$9–4 million, reflecting a lightweight profile suitable for inference.

3. Mathematical Formulation and Guidance Scale Selection

Key formulations underlying the scale selection process:

$0.5$2

and the distribution is reweighted: $0.5$3.

  • Multi-Metric Quality Curves:

$0.5$4

The predictor estimates $0.5$5.

  • Utility Function and Scale Optimization: Nonnegative metric weights $0.5$6 and quadratic regularization centered at anchor $0.5$7 (default scale) are used:

$0.5$8

4. Training Procedure

  • Dataset: All $0.5$9 pairs from the synthetic oracle are used.
  • Inputs: K19K\approx190; Targets: K19K\approx191 (multi-metric oracle).
  • Loss Function:

K19K\approx192

with K19K\approx193.

  • Optimization: Adam, learning rate K19K\approx194, batch size K19K\approx195, K19K\approx196 epochs, early stopping on validation set.
  • Regularization: Optional label-smoothing or target noise.

This regime ensures the predictor generalizes multi-metric quality as a function of prompt and scale.

5. Inference Workflow

The deployment process is as follows:

  1. Feature Extraction: For incoming prompt K19K\approx197, extract K19K\approx198 and K19K\approx199, compute pp0.
  2. Metric Prediction: For each guidance scale pp1, concatenate pp2, compute pp3.
  3. Utility Maximization: Compute pp4, select pp5.
  4. Sample Generation: Run the diffusion model under CFG with pp6 to generate the final sample.

This workflow eliminates the need for run-time grid-search, selecting the optimal scale per-prompt.

6. Empirical Validation and Performance

Experiments on MSCOCO 2014 (images, SDXL backbone; 3,000 validation captions) and AudioCaps (audio, AudioLDM2 backbone; 1,000 validation captions) demonstrate quantifiable improvements:

Image Generation (Table 1)

Method FID CLIP↑
No guidance (pp7) 62.44 0.27
Vanilla CFG (default pp8) 31.04 0.31
Prompt-aware (pp9) 30.74 0.33

Audio Generation (Table 2)

Method CE↑ CU↑ PC↑ PQ↑
No guidance (sSs\in S0) 3.62 5.18 3.13 5.76
Vanilla CFG (default sSs\in S1) 3.66 5.25 3.04 5.79
Prompt-aware (sSs\in S2) 3.68 5.22 3.16 5.81
  • Ablation: Using all four training metrics (KID, CLIP, ImageReward, Precision) outperforms KID+CLIP or vanilla CFG, with FID 30.74 versus 31.81 (KID+CLIP only) and 31.04 (CFG default).
  • Perceptual Preference: Human raters prefer prompt-aware outputs over vanilla CFG in approximately 60% of comparisons.

7. Trade-offs and Parameter Tuning

  • Scale Dynamics: Increasing guidance scale sSs\in S3 generally increases semantic alignment (CLIP, Audio-CLAP) but can reduce diversity (Recall) and, past a mid-range sSs\in S4, lead to fidelity loss via over-sharpening.
  • Quadratic Penalty: The regularizer sSs\in S5 discourages extreme scale choices when predicted utility gains are marginal.
  • Utility Weights:
    • Increase sSs\in S6 for alignment-sensitive tasks.
    • For highly detailed prompts, use lower sSs\in S7 and higher sSs\in S8 to mitigate over-guidance.
    • Dev-set sweeps allow empirical setting of sSs\in S9 and NgN_g0 to match task priorities.

These mechanisms enable controlled trade-off navigation across fidelity, alignment, and diversity in prompt-conditional generation.


By directly modeling prompt-scale dependencies with a learned Quality Curve Predictor and utility-based scale selection, the Scale-Aware Prompt Decoder provides a practical, computationally efficient enhancement over fixed CFG weighting, delivering improved generation metrics and perceptual outcomes across diverse prompts (Zhang et al., 25 Sep 2025).

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

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 Scale-Aware Prompt Decoder.