{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/method/lookahead","slug":"lookahead","name":"Lookahead","full_name":"Lookahead","full_name_withheld":false,"description_markdown":"**Lookahead** is a type of stochastic optimizer that iteratively updates two sets of weights: \"fast\" and \"slow\". Intuitively, the algorithm chooses a search direction by looking ahead at the sequence of *fast weights* generated by another optimizer.\r\n\r\n\r\n\r\n**Algorithm 1** Lookahead Optimizer\r\n\r\n**Require** Initial parameters $\\phi_0$, objective function $L$ \r\n\r\n**Require** Synchronization period $k$, slow weights step size $\\alpha$, optimizer $A$\r\n\r\n&nbsp;&nbsp;  **for** $t=1, 2, \\dots$\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp; Synchronize parameters $\\theta_{t,0} \\gets \\phi_{t-1}$\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp; **for** $i=1, 2, \\dots, k$\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sample minibatch of data $d \\sim \\mathcal{D}$\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $\\theta_{t,i} \\gets \\theta_{t,i-1} + A(L, \\theta_{t,i-1}, d)$\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp; **endfor**\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp; Perform outer update $\\phi_t \\gets \\phi_{t-1} + \\alpha (\\theta_{t,k} - \\phi_{t-1})$\r\n\r\n&nbsp;&nbsp; **endfor**\r\n\r\n&nbsp;&nbsp; **return** parameters $\\phi$","description_state":"present","introduced_year":null,"introduced_by":{"title":null,"paper":null,"first_author":null,"n_authors":0,"url_abs":null,"archive_paper_url":null},"source":{"url":"https://arxiv.org/abs/1907.08610v2","title":"Lookahead Optimizer: k steps forward, 1 step back","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/jettify/pytorch-optimizer/blob/155246597d66dd774156599be0f07a8c6f7758aa/torch_optimizer/lookahead.py#L13","code_snippet_url_on_a_code_host":true,"categories":[{"area":"General","area_id":"general","collection":"Stochastic Optimization","url":"/methods/category/stochastic-optimization","pwc_aliases":[]}],"n_papers_tagged":21,"archive_num_papers":null,"papers_newest_first":[{"paper":null,"slug":"autochemschematic-ai-a-closed-loop-physics","title":"AutoChemSchematic AI: A Closed-Loop, Physics-Aware Agentic Framework for Auto-Generating Chemical Process and Instrumentation Diagrams","date":"2025-05-30","arxiv_id":"2505.24584","n_code_links":0,"syntology":null},{"paper":null,"slug":"lookahead-q-cache-achieving-more-consistent","title":"Lookahead Q-Cache: Achieving More Consistent KV Cache Eviction via Pseudo Query","date":"2025-05-24","arxiv_id":"2505.20334","n_code_links":0,"syntology":null},{"paper":null,"slug":"chronologically-consistent-large-language","title":"Chronologically Consistent Large Language Models","date":"2025-02-28","arxiv_id":"2502.21206","n_code_links":0,"syntology":null},{"paper":null,"slug":"near-optimal-decision-trees-in-a-split-second","title":"Near Optimal Decision Trees in a SPLIT Second","date":"2025-02-21","arxiv_id":"2502.15988","n_code_links":0,"syntology":null},{"paper":null,"slug":"falcon-faster-and-parallel-inference-of-large","title":"Falcon: Faster and Parallel Inference of Large Language Models through Enhanced Semi-Autoregressive Drafting and Custom-Designed Decoding Tree","date":"2024-12-17","arxiv_id":"2412.12639","n_code_links":0,"syntology":null},{"paper":"/paper/break-the-sequential-dependency-of-llm","slug":"break-the-sequential-dependency-of-llm","title":"Break the Sequential Dependency of LLM Inference Using Lookahead Decoding","date":"2024-02-03","arxiv_id":"2402.02057","n_code_links":1,"syntology":null},{"paper":"/paper/eagle-speculative-sampling-requires","slug":"eagle-speculative-sampling-requires","title":"EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty","date":"2024-01-26","arxiv_id":"2401.15077","n_code_links":1,"syntology":null},{"paper":null,"slug":"alphamaplesat-an-mcts-based-cube-and-conquer","title":"AlphaMapleSAT: An MCTS-based Cube-and-Conquer SAT Solver for Hard Combinatorial Problems","date":"2024-01-24","arxiv_id":"2401.13770","n_code_links":0,"syntology":null},{"paper":"/paper/stable-nonconvex-nonconcave-training-via-1","slug":"stable-nonconvex-nonconcave-training-via-1","title":"Stable Nonconvex-Nonconcave Training via Linear Interpolation","date":"2023-10-20","arxiv_id":"2310.13459","n_code_links":1,"syntology":{"ran":5,"of":5,"n_ran_checked":5,"n_instrument":0,"unverified":0,"pointer_only":5,"phrase":"5 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified","official":{"repos":["LIONS-EPFL/linear-interpolation"],"state":"official (archive's flag): 5 ran","n_ran":5,"n_constructed":0,"n_ran_no_instrument_failure":5,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"using-fine-tuning-and-min-lookahead-beam","title":"Using fine-tuning and min lookahead beam search to improve Whisper","date":"2023-09-19","arxiv_id":"2309.10299","n_code_links":0,"syntology":null},{"paper":null,"slug":"exploring-flat-minima-for-domain","title":"Exploring Flat Minima for Domain Generalization with Large Learning Rates","date":"2023-09-12","arxiv_id":"2309.06337","n_code_links":0,"syntology":null},{"paper":null,"slug":"neurosymbolic-meta-reinforcement-lookahead","title":"Neurosymbolic Meta-Reinforcement Lookahead Learning Achieves Safe Self-Driving in Non-Stationary Environments","date":"2023-09-05","arxiv_id":"2309.02328","n_code_links":0,"syntology":null},{"paper":null,"slug":"on-the-depth-between-beam-search-and","title":"On the Depth between Beam Search and Exhaustive Search for Text Generation","date":"2023-08-25","arxiv_id":"2308.13696","n_code_links":0,"syntology":null},{"paper":"/paper/lookbehind-optimizer-k-steps-back-1-step","slug":"lookbehind-optimizer-k-steps-back-1-step","title":"Lookbehind-SAM: k steps back, 1 step forward","date":"2023-07-31","arxiv_id":"2307.16704","n_code_links":1,"syntology":{"ran":3,"of":3,"n_ran_checked":3,"n_instrument":0,"unverified":0,"pointer_only":0,"phrase":"3 ran (of which 3 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; every one of the 3 samples that ran constructed an object rather than computing a result","official":{"repos":["chandar-lab/lookbehind-sam"],"state":"official (archive's flag): 3 ran","n_ran":3,"n_constructed":3,"n_ran_no_instrument_failure":3,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"judging-adam-studying-the-performance-of","title":"Judging Adam: Studying the Performance of Optimization Methods on ML4SE Tasks","date":"2023-03-06","arxiv_id":"2303.03540","n_code_links":0,"syntology":null},{"paper":null,"slug":"multilayer-lookahead-a-nested-version-of","title":"Multilayer Lookahead: a Nested Version of Lookahead","date":"2021-10-27","arxiv_id":"2110.14254","n_code_links":0,"syntology":null},{"paper":null,"slug":"characterizing-lookahead-dynamics-of-smooth","title":"Characterizing Lookahead Dynamics of Smooth Games","date":"2021-01-01","arxiv_id":null,"n_code_links":0,"syntology":null},{"paper":"/paper/taming-gans-with-lookahead","slug":"taming-gans-with-lookahead","title":"Taming GANs with Lookahead-Minmax","date":"2020-06-25","arxiv_id":"2006.14567","n_code_links":1,"syntology":null},{"paper":"/paper/semg-gesture-recognition-with-a-simple-model","slug":"semg-gesture-recognition-with-a-simple-model","title":"sEMG Gesture Recognition with a Simple Model of Attention","date":"2020-06-05","arxiv_id":"2006.03645","n_code_links":2,"syntology":{"ran":3,"of":3,"n_ran_checked":2,"n_instrument":1,"unverified":0,"pointer_only":3,"phrase":"3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified","official":{"repos":["josephsdavid/semg_repro"],"state":"official: no sample here; runs from other or unrecorded repositories","n_ran":0,"n_constructed":0,"n_ran_no_instrument_failure":0,"n_unverified":0,"ran_from_kinds":["named_in_paper"]}}},{"paper":"/paper/permute-to-train-a-new-dimension-to-training","slug":"permute-to-train-a-new-dimension-to-training","title":"Train-by-Reconnect: Decoupling Locations of Weights from their Values","date":"2020-03-05","arxiv_id":"2003.02570","n_code_links":1,"syntology":{"ran":0,"of":1,"n_ran_checked":0,"n_instrument":0,"unverified":1,"pointer_only":0,"phrase":"0 ran · 1 unverified","official":null}},{"paper":"/paper/lookahead-optimizer-k-steps-forward-1-step","slug":"lookahead-optimizer-k-steps-forward-1-step","title":"Lookahead Optimizer: k steps forward, 1 step back","date":"2019-07-19","arxiv_id":"1907.08610","n_code_links":19,"syntology":null}],"papers_shown":21,"papers_order":"date (newest first), then slug","paper_counts":{"archive_papers_tagged":21,"with_a_code_link":8,"where_syntology_ran_a_sample":3,"not_listed_spam_title":0,"listed":21,"listed_where_code_ran":3,"where_syntology_ran_a_sample_split":{"with_a_run_with_no_instrument_failure":3,"every_run_a_failure_of_syntologys_instrument":0,"listed_with_a_run_with_no_instrument_failure":3,"listed_every_run_a_failure_of_syntologys_instrument":0,"filter":{"states":["a run with no instrument failure","any run, instrument failures included"],"default":"a run with no instrument failure","note":"on the 'only where code ran' pages the default hides, in the browser, the rows where every run was a failure of Syntology's instrument; the second state shows them again. Rows are hidden, never re-ordered; these twins list every row"}},"definition":"distinct papers the archive tags; 'where Syntology ran a sample' counts papers with at least one harvested sample that ran, which is not a correctness claim"},"papers_where_code_ran":3,"papers_where_code_ran_first_page":"/method/lookahead/papers/ran/1","papers_where_code_ran_caption":"We ran code from the paper's repository; we did not isolate this method inside it.","pages":[{"order":"ran","page":1,"of":1,"url":"/method/lookahead/papers/ran/1","json":"/method/lookahead/papers/ran/1.json","rows":3}],"tasks":[{"task":"/task/language-modeling","name":"Language Modeling","papers":2},{"task":"/task/language-modelling","name":"Language Modelling","papers":2},{"task":"/task/machine-translation","name":"Machine Translation","papers":2},{"task":"/task/translation","name":"Translation","papers":2},{"task":"/task/chemical-process","name":"Chemical Process","papers":1},{"task":"/task/code-completion","name":"Code Completion","papers":1},{"task":"/task/code-generation","name":"Code Generation","papers":1},{"task":"/task/deep-learning","name":"Deep Learning","papers":1},{"task":"/task/diversity","name":"Diversity","papers":1},{"task":"/task/domain-generalization","name":"Domain Generalization","papers":1},{"task":"/task/emg-gesture-recognition","name":"EMG Gesture Recognition","papers":1},{"task":"/task/electromyography-emg","name":"Electromyography (EMG)","papers":1},{"task":"/task/gsm8k","name":"GSM8K","papers":1},{"task":"/task/gesture-recognition","name":"Gesture Recognition","papers":1},{"task":"/task/heuristic-search","name":"Heuristic Search","papers":1},{"task":"/task/humaneval","name":"HumanEval","papers":1},{"task":"/task/image-classification","name":"Image Classification","papers":1},{"task":"/task/instruction-following","name":"Instruction Following","papers":1},{"task":"/task/interpretable-machine-learning","name":"Interpretable Machine Learning","papers":1},{"task":"/task/lifelong-learning","name":"Lifelong learning","papers":1}],"tasks_shown":20,"n_tasks":27,"usage_by_year":[{"year":"2019","papers":1},{"year":"2020","papers":3},{"year":"2021","papers":2},{"year":"2023","papers":7},{"year":"2024","papers":4},{"year":"2025","papers":4}],"row_source":"embedded","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/lookahead"},"syntology_read_at":"2026-10-05T00:36:11+00:00","syntology":{"source":"Syntology's have check for this name (the free coverage lookup), read from Syntology's graph","have_url":"https://syntology.ai/api/graph/have?x=Lookahead","read_at":"2026-10-05T00:58:44+00:00","query":"Lookahead","kind":"method","have":"declared_code","tier":"repo_known","verified_implementation":false,"level":null,"level_meaning":"the served verification level, per answer; never summed across methods","resolved_to":{"method":"LOOKAHEAD","origin_arxiv_id":"2002.04809"},"resolution":"case_insensitive","resolved_name_differs":false,"absence_asserted":false,"absence_unchecked":null,"no_code_is_about_this_method":false,"subject":"unknown","archive_paper_arxiv_id":null,"repositories":{"listed":1,"in_graph":1,"list_truncated":false,"strongest_link":"official"},"retrieve_with":null,"name_competition":{"verdict":"outranked","may_be_wrong_sense":true,"bearers_found":2,"served":{"arxiv_id":"2002.04809","citations":null},"leading_other_bearer":{"arxiv_id":"2312.12728","title":"Lookahead: An Inference Acceleration Framework for Large Language Model with Lossless Generation Accuracy","citations":51,"named_by":["title_prefix"],"bearer_name":"Lookahead: An Inference Acceleration Framework for Large Language Model with Lossless Generation Accuracy","ask_with":"have('2312.12728')"},"n_other_bearers_listed":1,"note":"'Lookahead' is ALSO the name of the paper 'Lookahead: An Inference Acceleration Framework for Large Language Model with Lossless Generation Accuracy' (arXiv:2312.12728, 51 citations), which is cited FAR more than the paper this answer is about (citations not recorded). This answer may be about the wrong Lookahead. If you meant the better-known one, ask again with that entry of `also_named`."},"name_competition_text":"The same name also belongs to the paper “Lookahead: An Inference Acceleration Framework for Large Language Model with Lossless Generation Accuracy” (arXiv:2312.12728, 51 citations), which the lookup finds cited far more than the paper this answer is about (citations not recorded), so this answer may be about a different sense of the name.","near_matches":null,"code_nearby":[],"code_nearby_caption":null,"origin_paper":{"arxiv_id":"2002.04809","page":"/paper/lookahead-a-far-sighted-alternative-of-1","syntology_url":"https://syntology.ai/paper/2002.04809","in_graph_layer":true,"samples":10,"ran":8,"n_ran_checked":6,"n_instrument":2,"unverified":2,"phrase":"8 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 6 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified","instrument_means":"failures of Syntology's instrument, not of the code"},"line":"repository known, no verified implementation (declared_code; repositories: 1 listed of 1 in the graph, strongest link: official). The lookup matched 'LOOKAHEAD' ignoring case. The archive credits no paper with an arXiv id for this method, so whether this answer (about arXiv:2002.04809) is about this method is not checked.","level_legend":null},"syntology_have_state":"loaded","record_sha256":"5a86ab8b762db1c8cf2c4a521dea4d122d70514dd1c3a5e1f09bfb6a9bae965a","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}