{"id":"https://openalex.org/W4393158884","doi":"https://doi.org/10.1609/aaai.v38i1.27798","title":"Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Models","display_name":"Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Models","publication_year":2024,"publication_date":"2024-03-24","ids":{"openalex":"https://openalex.org/W4393158884","doi":"https://doi.org/10.1609/aaai.v38i1.27798"},"language":"en","primary_location":{"id":"doi:10.1609/aaai.v38i1.27798","is_oa":true,"landing_page_url":"https://doi.org/10.1609/aaai.v38i1.27798","pdf_url":"https://ojs.aaai.org/index.php/AAAI/article/download/27798/27628","source":{"id":"https://openalex.org/S4210191458","display_name":"Proceedings of the AAAI Conference on Artificial Intelligence","issn_l":"2159-5399","issn":["2159-5399","2374-3468"],"is_oa":true,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/P4310320058","host_organization_name":"Association for the Advancement of Artificial Intelligence","host_organization_lineage":["https://openalex.org/P4310320058"],"host_organization_lineage_names":["Association for the Advancement of Artificial Intelligence"],"type":"conference"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"Proceedings of the AAAI Conference on Artificial Intelligence","raw_type":"journal-article"},"type":"article","indexed_in":["crossref"],"open_access":{"is_oa":true,"oa_status":"diamond","oa_url":"https://ojs.aaai.org/index.php/AAAI/article/download/27798/27628","any_repository_has_fulltext":false},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5102421790","display_name":"Yuqi Zhu","orcid":"https://orcid.org/0009-0007-1299-1744"},"institutions":[],"countries":[],"is_corresponding":true,"raw_author_name":"Yuqi Zhu","raw_affiliation_strings":["Academy of Military Sciences, China"],"affiliations":[{"raw_affiliation_string":"Academy of Military Sciences, China","institution_ids":[]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5101755477","display_name":"Jia Li","orcid":"https://orcid.org/0000-0002-9411-971X"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Jia Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","School of Computer Science, Peking University, Beijing, China"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100447682","display_name":"Ge Li","orcid":"https://orcid.org/0000-0002-5828-0186"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Ge Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","School of Computer Science, Peking University, Beijing, China"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5013517389","display_name":"Yunfei Zhao","orcid":"https://orcid.org/0000-0001-7505-145X"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"YunFei Zhao","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","School of Computer Science, Peking University, Beijing, China"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5101755477","display_name":"Jia Li","orcid":"https://orcid.org/0000-0002-9411-971X"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Jia Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","School of Computer Science, Peking University, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5049100391","display_name":"Zhi Jin","orcid":"https://orcid.org/0000-0003-1087-226X"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Zhi Jin","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","School of Computer Science, Peking University, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5100633784","display_name":"Hong Mei","orcid":"https://orcid.org/0000-0003-2380-3976"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]},{"id":"https://openalex.org/I4210096250","display_name":"Beijing Institute of Big Data Research","ror":"https://ror.org/00s1sz824","country_code":"CN","type":"facility","lineage":["https://openalex.org/I20231570","https://openalex.org/I37796252","https://openalex.org/I4210096250"]},{"id":"https://openalex.org/I4210092262","display_name":"Ministry of Education","ror":"https://ror.org/00dh5gw98","country_code":"RO","type":"funder","lineage":["https://openalex.org/I2799732796","https://openalex.org/I4210092262"]},{"id":"https://openalex.org/I4210128818","display_name":"Institute of Software","ror":"https://ror.org/033dfsn42","country_code":"CN","type":"facility","lineage":["https://openalex.org/I19820366","https://openalex.org/I4210128818"]}],"countries":["CN","RO"],"is_corresponding":false,"raw_author_name":"Hong Mei","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China\nAdvanced Institute of Big Data, Beijing, China","School of Computer Science, Peking University, Beijing, China\nAdvanced Institute of Big Data, Beijing, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education"],"affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China\nAdvanced Institute of Big Data, Beijing, China","institution_ids":["https://openalex.org/I4210092262","https://openalex.org/I4210128818"]},{"raw_affiliation_string":"School of Computer Science, Peking University, Beijing, China\nAdvanced Institute of Big Data, Beijing, China","institution_ids":["https://openalex.org/I4210096250","https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education","institution_ids":["https://openalex.org/I20231570"]}]}],"institutions":[],"countries_distinct_count":2,"institutions_distinct_count":7,"corresponding_author_ids":["https://openalex.org/A5102421790"],"corresponding_institution_ids":[],"apc_list":null,"apc_paid":null,"fwci":3.722,"has_fulltext":true,"cited_by_count":26,"citation_normalized_percentile":{"value":0.95302013,"is_in_top_1_percent":false,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":98,"max":100},"biblio":{"volume":"38","issue":"1","first_page":"437","last_page":"445"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10181","display_name":"Natural Language Processing Techniques","score":0.9882000088691711,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},"topics":[{"id":"https://openalex.org/T10181","display_name":"Natural Language Processing Techniques","score":0.9882000088691711,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10028","display_name":"Topic Modeling","score":0.978600025177002,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10201","display_name":"Speech Recognition and Synthesis","score":0.9128000140190125,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}}],"keywords":[{"id":"https://openalex.org/keywords/code","display_name":"Code (set theory)","score":0.5892700552940369},{"id":"https://openalex.org/keywords/sampling","display_name":"Sampling (signal processing)","score":0.5603919625282288},{"id":"https://openalex.org/keywords/computer-science","display_name":"Computer science","score":0.4576590955257416},{"id":"https://openalex.org/keywords/programming-language","display_name":"Programming language","score":0.28035885095596313},{"id":"https://openalex.org/keywords/telecommunications","display_name":"Telecommunications","score":0.09351438283920288}],"concepts":[{"id":"https://openalex.org/C2776760102","wikidata":"https://www.wikidata.org/wiki/Q5139990","display_name":"Code (set theory)","level":3,"score":0.5892700552940369},{"id":"https://openalex.org/C140779682","wikidata":"https://www.wikidata.org/wiki/Q210868","display_name":"Sampling (signal processing)","level":3,"score":0.5603919625282288},{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.4576590955257416},{"id":"https://openalex.org/C199360897","wikidata":"https://www.wikidata.org/wiki/Q9143","display_name":"Programming language","level":1,"score":0.28035885095596313},{"id":"https://openalex.org/C76155785","wikidata":"https://www.wikidata.org/wiki/Q418","display_name":"Telecommunications","level":1,"score":0.09351438283920288},{"id":"https://openalex.org/C94915269","wikidata":"https://www.wikidata.org/wiki/Q1834857","display_name":"Detector","level":2,"score":0.0},{"id":"https://openalex.org/C177264268","wikidata":"https://www.wikidata.org/wiki/Q1514741","display_name":"Set (abstract data type)","level":2,"score":0.0}],"mesh":[],"locations_count":1,"locations":[{"id":"doi:10.1609/aaai.v38i1.27798","is_oa":true,"landing_page_url":"https://doi.org/10.1609/aaai.v38i1.27798","pdf_url":"https://ojs.aaai.org/index.php/AAAI/article/download/27798/27628","source":{"id":"https://openalex.org/S4210191458","display_name":"Proceedings of the AAAI Conference on Artificial Intelligence","issn_l":"2159-5399","issn":["2159-5399","2374-3468"],"is_oa":true,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/P4310320058","host_organization_name":"Association for the Advancement of Artificial Intelligence","host_organization_lineage":["https://openalex.org/P4310320058"],"host_organization_lineage_names":["Association for the Advancement of Artificial Intelligence"],"type":"conference"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"Proceedings of the AAAI Conference on Artificial Intelligence","raw_type":"journal-article"}],"best_oa_location":{"id":"doi:10.1609/aaai.v38i1.27798","is_oa":true,"landing_page_url":"https://doi.org/10.1609/aaai.v38i1.27798","pdf_url":"https://ojs.aaai.org/index.php/AAAI/article/download/27798/27628","source":{"id":"https://openalex.org/S4210191458","display_name":"Proceedings of the AAAI Conference on Artificial Intelligence","issn_l":"2159-5399","issn":["2159-5399","2374-3468"],"is_oa":true,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/P4310320058","host_organization_name":"Association for the Advancement of Artificial Intelligence","host_organization_lineage":["https://openalex.org/P4310320058"],"host_organization_lineage_names":["Association for the Advancement of Artificial Intelligence"],"type":"conference"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"Proceedings of the AAAI Conference on Artificial Intelligence","raw_type":"journal-article"},"sustainable_development_goals":[{"score":0.6499999761581421,"display_name":"Quality Education","id":"https://metadata.un.org/sdg/4"}],"awards":[{"id":"https://openalex.org/G1884936576","display_name":null,"funder_award_id":"61832009","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G3446613798","display_name":null,"funder_award_id":"62192730","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G4308740167","display_name":null,"funder_award_id":"62332012","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G5393181860","display_name":null,"funder_award_id":"62072007","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G5482656022","display_name":null,"funder_award_id":"62192731","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G8449925957","display_name":null,"funder_award_id":"62192733","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"}],"funders":[{"id":"https://openalex.org/F4320321001","display_name":"National Natural Science Foundation of China","ror":"https://ror.org/01h0zpd94"}],"has_content":{"grobid_xml":false,"pdf":true},"content_urls":{"pdf":"https://content.openalex.org/works/W4393158884.pdf"},"referenced_works_count":26,"referenced_works":["https://openalex.org/W1881604308","https://openalex.org/W2149741699","https://openalex.org/W2938704169","https://openalex.org/W2963096510","https://openalex.org/W2983962589","https://openalex.org/W3102516861","https://openalex.org/W3137269947","https://openalex.org/W3177813494","https://openalex.org/W4224060952","https://openalex.org/W4226485558","https://openalex.org/W4255825300","https://openalex.org/W4287270774","https://openalex.org/W4307932749","https://openalex.org/W4311887664","https://openalex.org/W4320854285","https://openalex.org/W4361866100","https://openalex.org/W4362508616","https://openalex.org/W4376312043","https://openalex.org/W4384345649","https://openalex.org/W4387724059","https://openalex.org/W6660690085","https://openalex.org/W6680571093","https://openalex.org/W6682264535","https://openalex.org/W6750305986","https://openalex.org/W6761551260","https://openalex.org/W6798182279"],"related_works":["https://openalex.org/W2748952813","https://openalex.org/W2390279801","https://openalex.org/W2358668433","https://openalex.org/W2376932109","https://openalex.org/W2001405890","https://openalex.org/W2382290278","https://openalex.org/W2478288626","https://openalex.org/W4391913857","https://openalex.org/W2350741829","https://openalex.org/W2530322880"],"abstract_inverted_index":{"Recently,":[0],"Large":[1],"Language":[2,21],"Models":[3],"(LLMs)":[4],"have":[5],"shown":[6],"impressive":[7],"abilities":[8],"in":[9,63],"code":[10,42,64,73,78,113],"generation.":[11,65],"However,":[12],"existing":[13],"LLMs'":[14],"decoding":[15,39,60,138,196],"strategies":[16],"are":[17,89],"designed":[18],"for":[19,41,148,162],"Natural":[20],"(NL)":[22],"generation,":[23],"overlooking":[24],"the":[25,53,103,109,117,134,166],"differences":[26],"between":[27],"NL":[28],"and":[29,93,181],"programming":[30],"languages":[31],"(PL).":[32],"Due":[33],"to":[34,57,91,153,176],"this":[35,49],"oversight,":[36],"a":[37,59,112,122,143,159],"better":[38],"strategy":[40,61],"generation":[43],"remains":[44],"an":[45,67],"open":[46],"question.":[47],"In":[48],"paper,":[50],"we":[51,75,120],"conduct":[52,182],"first":[54],"systematic":[55],"study":[56],"explore":[58,154],"specialized":[62],"With":[66],"analysis":[68],"of":[69,72,111,168],"loss":[70],"distributions":[71],"tokens,":[74,150],"find":[76],"that":[77,88,96,190],"tokens":[79,87,95,105,164],"can":[80,97],"be":[81,98],"divided":[82],"into":[83],"two":[84,185],"categories:":[85],"challenging":[86,104,149],"difficult":[90],"predict":[92],"confident":[94,163],"easily":[99],"inferred.":[100],"Among":[101],"them,":[102],"mainly":[106],"appear":[107],"at":[108],"beginning":[110],"block.":[114],"Inspired":[115],"by":[116],"above":[118],"findings,":[119],"propose":[121],"simple":[123],"yet":[124],"effective":[125],"method:":[126],"Adaptive":[127],"Temperature":[128],"(AdapT)":[129],"sampling,":[130],"which":[131],"dynamically":[132],"adjusts":[133],"temperature":[135,145,161],"coefficient":[136],"when":[137,146],"different":[139,179],"tokens.":[140],"We":[141,157,172],"apply":[142,173],"larger":[144],"sampling":[147,175,192],"allowing":[151],"LLMs":[152,177],"diverse":[155],"choices.":[156],"employ":[158],"smaller":[160],"avoiding":[165],"influence":[167],"tail":[169],"randomness":[170],"noises.":[171],"AdapT":[174,191],"with":[178],"sizes":[180],"evaluations":[183],"on":[184],"popular":[186],"datasets.":[187],"Results":[188],"show":[189],"significantly":[193],"outperforms":[194],"state-of-the-art":[195],"strategy.":[197]},"counts_by_year":[{"year":2026,"cited_by_count":3},{"year":2025,"cited_by_count":18},{"year":2024,"cited_by_count":5}],"updated_date":"2026-04-23T09:07:50.710637","created_date":"2025-10-10T00:00:00"}
