We have completed an analysis comparing CFG to SOTA Baselines, as you suggested. Thank you so much for the comments, would appreciate it if you could re-evaluate.
Dear Reviewer RjYY,
Thank you so much for your review! We appreciate your insights, they have made this paper stronger.
> The \gamma values in one context are poorly suited for another context, making CFG tricky in practice.
We do find that gamma values transfer across models and across benchmark tasks, with values of ~2 being optimal for all LLaMA, Pythia, and GPT-2 models on all standards language model benchmarks we test (other than Winogrande, where CFG doesn't seem to help at all). This is shown in Fig. 5-7. We will be clearer about this, as a general recommendation to practitioners.
> Have you explored this method in controllable NLG tasks or constraint-decoding tasks, or compared it with SOTA methods?
We appreciate your suggestion. We have updated the paper with an experiment comparing CFG to one of the dominant baselines in controlled NLG, which is a classifier-guided text generation framework called FUDGE [1].
In short, we prompt GPT2 + FUDGE and GPT2 + CFG with 500 prompts, taken from the IMDB dataset [2] and measure the sentiment of the output. We run FUDGE with a sentiment classifier [a] for guidance and CFG with the following positive prompt: “That was a good movie!”.
We evaluate the output with a separate sentiment classifier [b] and compare each against vanilla GPT2 outputs for the same prompt. (Both sentiment classifiers were reported to get held-out f1 > .9). FUDGE increases the sentiment of the output by .065 points (using the author-recommended control parameter, 1) whereas CFG increases the output by significantly more (0.312) using our default control strength, mentioned above.
FUDGE faces other limitations: it is extremely slow. It takes over 100x more to generate each prompt, because at each step, classifier-guidance needs to be applied to potential candidate words. It requires a trained classifier. Other methods, like NADO [3], Gedi [4] and CTRL [5] additionally require expensive training, whereas CFG does not.
Constrained-decoding tasks, like [6], are not quite appropriate in this setting. CFG makes no claim to restrict the output to single words.
> Compared with text-to-image generation, the optimal \gamma value in the language modelling seems to be small (<2), while large \gamma value leads to poor performance. Have any observations on it?
There are many reasons why text-to-image models might have higher \gamma values.
In text-to-image generation the pixel range is (-1, 1), whereas the range for logits in language modeling is a lot larger.
In text-to-image generation, the values are independent but in text-to-text there's a softmax, and thus changing the maximum logit value dramatically alters the whole distribution.
The conditional and unconditional outputs may be more different in text-to-text than in text-to-image, leading to greater chances of output text degenerating.
In text-to-image diffusion models, after a very small number of iterations, the differences between the conditional probability and the unconditional probability should be negligible, so a stronger strength might be required.
We would be really appreciative if you were to consider these additional experiments, and if you are satisfied, to please consider raising the score on your review. Do you have any other comments or feedback? Thank you so much, again, as your comments have greatly improved the quality of this paper.
[1] Yang, Kevin, and Dan Klein. "FUDGE: Controlled text generation with future discriminators." arXiv preprint arXiv:2104.05218 (2021).
[2] https://huggingface.co/datasets/imdb
[3] Meng, Tao, et al. "Controllable text generation with neurally-decomposed oracle." Advances in Neural Information Processing Systems 35 (2022): 28125-28139
[4] Krause, Ben, et al. "Gedi: Generative discriminator guided sequence generation." arXiv preprint arXiv:2009.06367 (2020).
[5] Keskar, Nitish Shirish, et al. "Ctrl: A conditional transformer language model for controllable generation." arXiv preprint arXiv:1909.05858 (2019).
[6] Lu, Ximing, et al. "Neurologic a* esque decoding: Constrained text generation with lookahead heuristics." arXiv preprint arXiv:2112.08726 (2021).
[a] https://huggingface.co/stevhliu/my_awesome_model
[b] https://huggingface.co/bhadresh-savani/distilbert-base-uncased-emotion