Contrastive Decoding: Open-ended Text Generation as Optimization
The DOI matches its DataCite record; 1 of the 1 references it cites were found in a registry or an index.
Abstract
Given a language model (LM), maximum probability is a poor decoding objective for open-ended generation, because it produces short and repetitive text. On the other hand, sampling can often produce incoherent text that drifts from the original topics. We propose contrastive decoding (CD), a reliable decoding approach that optimizes a contrastive objective subject to a plausibility constraint. The contrastive objective returns the difference between the likelihood under a large LM (called the expert, e.g. OPT-13B) and a small LM (called the amateur, e.g. OPT-125M), and the constraint ensures that the outputs are plausible. CD is inspired by the fact that the failures of larger LMs (e.g., repetition, incoherence) are even more prevalent in smaller LMs, and that this difference signals which texts should be preferred. CD requires zero additional training, and produces higher quality text than decoding from the larger LM alone. It also works across model scales (OPT-13B and GPT2-1.5B) and significantly outperforms four strong decoding algorithms (e.g., nucleus, top-k) in automatic and human evaluations across wikipedia, news and story domains.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“LLMs can exhibit biases from their pretraining corpora that impact task performance.”
From Dual Debiasing for Noisy In-Context Learning for Text Generation (2025) · cites this paper as Li et al., 2022
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., et al. (2016) · arXiv · doi:10.48550/arxiv.1609.08144 · Cited by 5,319 · cited 1×
“Another common approach is to search for the most likely text sequence via greedy decoding or beam search (Wu et al., 2016); but this leads to repetition and tedious outputs.”
Background
Cited by
Huang, L., Yu, W., Ma, W., Zhong, W., Feng, Z., Wang, H., Chen, Q., Peng, W., Feng, X., Qin, B., et al. (2025) · ACM Transactions on Information Systems · doi:10.1145/3703155 · Cited by 4,688
Huang, L., Yu, W., Ma, W., Zhong, W., Feng, Z., Wang, H., Chen, Q., Peng, W., Feng, X., Qin, B., et al. (2023) · arXiv · doi:10.48550/arxiv.2311.05232 · Cited by 2,516
Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding
Leng, S., Zhang, H., Chen, G., Li, X., Lu, S., Miao, C., & Bing, L. (2023) · arXiv · doi:10.48550/arxiv.2311.16922 · Cited by 199
Self-citationMitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding
Leng, S., Zhang, H., Chen, G., Li, X., Lu, S., Miao, C., & Bing, L. (2024) · 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52733.2024.01316 · Cited by 199
“To address this issue, we follow Li et al. [37] to implement an adaptive plausibility constraint that is contingent upon the confidence level associated with the output distribution with original visual inputs: where V is the output vocabulary of LVLMs and β is a hyperparameter in [0 , 1] for…”
BackgroundMethodSelf-citationAnh-Hoang, D., Tran, V., & Nguyen, L.-M. (2025) · Frontiers in Artificial Intelligence · doi:10.3389/frai.2025.1622292 · Cited by 146
“• Fine-tuning methods incorporating retrieved factual context (Li et al., 2022).”
Survey on Factuality in Large Language Models: Knowledge, Retrieval and Domain-Specificity
Wang, C., Liu, X., Yue, Y., Tang, X., Zhang, T., Jiayang, C., Yao, Y., Gao, W., Hu, X., Qi, Z., et al. (2023) · arXiv · doi:10.48550/arxiv.2310.07521 · Cited by 61
Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLP
Khattab, O., Santhanam, K., Li, X. L., Hall, D., Liang, P., Potts, C., & Zaharia, M. (2022) · arXiv · doi:10.48550/arxiv.2212.14024 · Cited by 52
Self-citationHallucination of Multimodal Large Language Models: A Survey
Bai, Z., Wang, P., Xiao, T., He, T., Han, Z., Zhang, Z., & Shou, M. Z. (2024) · arXiv · doi:10.48550/arxiv.2404.18930 · Cited by 38
“The lack of standardized benchmarks and evaluation metrics poses significant challenges in assessing the degree of hallucination in MLLMs.”
Grounding Language Models to Images for Multimodal Inputs and Outputs
Koh, J. Y., Salakhutdinov, R., & Fried, D. (2023) · arXiv · doi:10.48550/arxiv.2301.13823 · Cited by 38
Self-citationBigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions
Zhuo, T. Y., Vu, M. C., Chim, J., Hu, H., Yu, W., Widyasari, R., Yusuf, I. N. B., Zhan, H., He, J., Paul, I., et al. (2024) · arXiv · doi:10.48550/arxiv.2406.15877 · Cited by 29
Self-citationEvaluating Large Language Models on Controlled Generation Tasks
Sun, J., Tian, Y., Zhou, W., Xu, N., Hu, Q., Gupta, R., Wieting, J., Peng, N., & Ma, X. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.190 · Cited by 29
DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models
Chuang, Y.-S., Xie, Y., Luo, H., Kim, Y., Glass, J., & He, P. (2023) · arXiv · doi:10.48550/arxiv.2309.03883 · Cited by 29
“, 2023) (7B, 13B, 33B, 65B) and compare them with three baselines: 1) original decoding (greedy decoding or sampling depending on the tasks), 2) Contrastive Decoding (CD) (Li et al., 2022), where LLaMA-7B serves as the amateur model, while LLaMA13B/33B/65B act as expert models, and 3) Inference Time Intervention (ITI).”
BackgroundStay on topic with Classifier-Free Guidance
Sanchez, G., Fan, H., Spangher, A., Levi, E., Ammanamanchi, P. S., & Biderman, S. (2023) · arXiv · doi:10.48550/arxiv.2306.17806 · Cited by 8
Trusting Your Evidence: Hallucinate Less with Context-aware Decoding
Shi, W., Han, X., Lewis, M., Tsvetkov, Y., Zettlemoyer, L., & Yih, S. W.-T. (2023) · arXiv · doi:10.48550/arxiv.2305.14739 · Cited by 6
“This provides a new form of contrastive decoding (Li et al., 2022), which effectively downweights the prior knowledge when more relevant contextual information is provided.”
BackgroundMethodInfluentialSelf-citationLi, H., Lan, T., Fu, Z., Cai, D., Liu, L., Collier, N., Watanabe, T., & Su, Y. (2023) · Advances in Neural Information Processing Systems 36 · doi:10.52202/075280-3187 · Cited by 4
Creativity in AI: Progresses and Challenges
Ismayilzada, M., Paul, D., Bosselut, A., & van der Plas, L. (2024) · arXiv · doi:10.48550/arxiv.2410.17218 · Cited by 3
Dual Debiasing for Noisy In-Context Learning for Text Generation
Liang, S., Ahn, S., Dhillon, P., & Zhou, J. (2025) · Findings of the Association for Computational Linguistics: ACL 2025 · doi:10.18653/v1/2025.findings-acl.665 · Cited by 2
Dual Debiasing for Noisy In-Context Learning for Text Generation
Liang, S., Ahn, S., Dhillon, P. S., & Zhou, J. (2025) · arXiv · doi:10.48550/arxiv.2506.00418 · Cited by 2
RAID: A Shared Benchmark for Robust Evaluation of Machine-Generated Text Detectors
Dugan, L., Hwang, A., Trhlik, F., Ludan, J. M., Zhu, A., Xu, H., Ippolito, D., & Callison-Burch, C. (2024) · arXiv · doi:10.48550/arxiv.2405.07940 · Cited by 1
“There are many possible penalties and decoding strategies one could use when generating text such as contrastive decoding (Li et al., 2023), eta and epsilon decoding (Hewitt et al., 2022 Table 5: Accuracy Score at FPR=5% for all detectors across model groups and sampling strategies.”
MethodSavani, Y., Trockman, A., Feng, Z., Xu, Y. E., Schwarzschild, A., Robey, A., Finzi, M., & Kolter, J. Z. (2025) · arXiv · doi:10.48550/arxiv.2504.13146 · Cited by 1
“Existing approaches in this domain include using contrastive objectives to enhance generation quality [40], reformulating constrained decoding as an optimization problem [41], and incorporating energy-based constraints [42].”
Evaluating Large Language Models on Controlled Generation Tasks
Sun, J., Tian, Y., Zhou, W., Xu, N., Hu, Q., Gupta, R., Wieting, J. F., Peng, N., & Ma, X. (2023) · arXiv · doi:10.48550/arxiv.2310.14542 · Cited by 1
Avoidance Decoding for Diverse Multi-Branch Story Generation
Park, K., Yang, N., & Jung, K. (2025) · arXiv · doi:10.48550/arxiv.2509.02170
The Consensus Game: Language Model Generation via Equilibrium Search
Jacob, A. P., Shen, Y., Farina, G., & Andreas, J. (2023) · arXiv · doi:10.48550/arxiv.2310.09139
Semantic Probabilistic Control of Language Models
Ahmed, K., Belem, C. G., Smyth, P., & Singh, S. (2025) · arXiv
“…distributions of different LMs with opposing behaviors, such as a toxic expert and a non-toxic expert (Schick et al., 2021; Liu et al., 2021; Li et al., 2023; Dekoninck et al., 2024), and using an attribute discriminator ( i.e. , constraint verifier) to reweigh the base LM conditional…”
From Illusion to Insight: A Taxonomic Survey of Hallucination Mitigation Techniques in LLMs
Kazlaris, I., Antoniou, E., Diamantaras, K., & Bratsas, C. (2025) · doi:10.20944/preprints202508.1942.v1 · Cited by 13
Turning up the heat: Min-p sampling for creative and coherent llm outputs
Nguyen, M. N., Baker, A., Neo, C., Roush, A., Kirsch, A., & Shwartz-Ziv, R. (2024) · arXiv · doi:10.48550/arxiv.2407.01082 · Cited by 1
Kang, H., Ni, J., & Yao, H. (2023) · arXiv · doi:10.48550/arxiv.2311.09114
Metadata
- Authors
- Li, X. L., Holtzman, A., Fried, D., Liang, P., Eisner, J., Hashimoto, T., Zettlemoyer, L., & Lewis, M.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2022
- arXiv
- 2210.15097
- References
- 1
- Type
- Preprint
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.