{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/language-model-decoding-as-likelihood-utility","title":"Language Model Decoding as Likelihood-Utility Alignment","arxiv_id":"2210.07228","date":"2022-10-13","proceeding":null,"authors":["Martin Josifoski","Maxime Peyrard","Frano Rajic","Jiheng Wei","Debjit Paul","Valentin Hartmann","Barun Patra","Vishrav Chaudhary","Emre Kiciman","Boi Faltings","Robert West"],"abstract":"A critical component of a successful language generation pipeline is the decoding algorithm. However, the general principles that should guide the choice of a decoding algorithm remain unclear. Previous works only compare decoding algorithms in narrow scenarios, and their findings do not generalize across tasks. We argue that the misalignment between the model's likelihood and the task-specific notion of utility is the key factor to understanding the effectiveness of decoding algorithms. To structure the discussion, we introduce a taxonomy of misalignment mitigation strategies (MMSs), providing a unifying view of decoding as a tool for alignment. The MMS taxonomy groups decoding algorithms based on their implicit assumptions about likelihood--utility misalignment, yielding general statements about their applicability across tasks. Specifically, by analyzing the correlation between the likelihood and the utility of predictions across a diverse set of tasks, we provide empirical evidence supporting the proposed taxonomy and a set of principles to structure reasoning when choosing a decoding algorithm. Crucially, our analysis is the first to relate likelihood-based decoding algorithms with algorithms that rely on external information, such as value-guided methods and prompting, and covers the most diverse set of tasks to date. Code, data, and models are available at https://github.com/epfl-dlab/understanding-decoding.","url_abs":"https://arxiv.org/abs/2210.07228v2","url_pdf":"https://arxiv.org/pdf/2210.07228v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"language-model-decoding-as-likelihood-utility","repo_url":"https://github.com/epfl-dlab/understanding-decoding","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.07228","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.07228"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/epfl-dlab/understanding-decoding","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"76a9f4646a0f6ac5","entry":"get_confidence_interval","repo":"epfl-dlab/understanding-decoding","repo_kind":"official","path":"src/evaluation_from_file_pipeline.py","file_url":"https://github.com/epfl-dlab/understanding-decoding/blob/HEAD/src/evaluation_from_file_pipeline.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"76a9f4646a0f6ac5"}},{"code_sha256_prefix":"cfaef4c55ff6fd63","entry":"get_model_and_tokenizer","repo":"epfl-dlab/understanding-decoding","repo_kind":"official","path":"detoxify/src/utils.py","file_url":"https://github.com/epfl-dlab/understanding-decoding/blob/HEAD/detoxify/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cfaef4c55ff6fd63"}},{"code_sha256_prefix":"13e44254a817a756","entry":"get_score_from_metric","repo":"epfl-dlab/understanding-decoding","repo_kind":"official","path":"src/evaluation_from_file_pipeline.py","file_url":"https://github.com/epfl-dlab/understanding-decoding/blob/HEAD/src/evaluation_from_file_pipeline.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"13e44254a817a756"}},{"code_sha256_prefix":"cf777f7fd5f4d38c","entry":"get_score_from_scores_per_datapoint","repo":"epfl-dlab/understanding-decoding","repo_kind":"official","path":"src/evaluation_from_file_pipeline.py","file_url":"https://github.com/epfl-dlab/understanding-decoding/blob/HEAD/src/evaluation_from_file_pipeline.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf777f7fd5f4d38c"}},{"code_sha256_prefix":"f1ef1b0e36849908","entry":"move_to","repo":"epfl-dlab/understanding-decoding","repo_kind":"official","path":"detoxify/src/utils.py","file_url":"https://github.com/epfl-dlab/understanding-decoding/blob/HEAD/detoxify/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f1ef1b0e36849908"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}