{"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/old-dog-learns-new-tricks-randomized-ucb-for","title":"Old Dog Learns New Tricks: Randomized UCB for Bandit Problems","arxiv_id":"1910.04928","date":"2019-10-11","proceeding":null,"authors":["Sharan Vaswani","Abbas Mehrabian","Audrey Durand","Branislav Kveton"],"abstract":"We propose $\\tt RandUCB$, a bandit strategy that builds on theoretically derived confidence intervals similar to upper confidence bound (UCB) algorithms, but akin to Thompson sampling (TS), it uses randomization to trade off exploration and exploitation. In the $K$-armed bandit setting, we show that there are infinitely many variants of $\\tt RandUCB$, all of which achieve the minimax-optimal $\\widetilde{O}(\\sqrt{K T})$ regret after $T$ rounds. Moreover, for a specific multi-armed bandit setting, we show that both UCB and TS can be recovered as special cases of $\\tt RandUCB$. For structured bandits, where each arm is associated with a $d$-dimensional feature vector and rewards are distributed according to a linear or generalized linear model, we prove that $\\tt RandUCB$ achieves the minimax-optimal $\\widetilde{O}(d \\sqrt{T})$ regret even in the case of infinitely many arms. Through experiments in both the multi-armed and structured bandit settings, we demonstrate that $\\tt RandUCB$ matches or outperforms TS and other randomized exploration strategies. Our theoretical and empirical results together imply that $\\tt RandUCB$ achieves the best of both worlds.","url_abs":"https://arxiv.org/abs/1910.04928v2","url_pdf":"https://arxiv.org/pdf/1910.04928v2.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":"old-dog-learns-new-tricks-randomized-ucb-for","repo_url":"https://github.com/vaswanis/randucb","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"thompson-sampling","task_name":"Thompson Sampling"}],"methods":[{"method_slug":"ts","method_name":"TS"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1910.04928","atlas_url":"https://app.syntology.ai/?focus=1910.04928","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1910.04928"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/vaswanis/randucb","reach":null}],"summary":{"ran_draft_wrong":3,"ran_honours":3},"by_repo_kind":{"official":{"samples":6,"ran":6,"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":6,"samples":[{"code_sha256_prefix":"8e52fdb9893d7108","entry":"evaluate","repo":"vaswanis/randucb","repo_kind":"official","path":"MAB.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/MAB.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e52fdb9893d7108"}},{"code_sha256_prefix":"ee1db4340aaa0804","entry":"evaluate","repo":"vaswanis/randucb","repo_kind":"official","path":"Lin-Bandit.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/Lin-Bandit.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ee1db4340aaa0804"}},{"code_sha256_prefix":"4d71f5b15c873567","entry":"evaluate_one","repo":"vaswanis/randucb","repo_kind":"official","path":"MAB.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/MAB.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d71f5b15c873567"}},{"code_sha256_prefix":"3b64a75a9bd4e1f3","entry":"randomize_confidence","repo":"vaswanis/randucb","repo_kind":"official","path":"MAB.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/MAB.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3b64a75a9bd4e1f3"}},{"code_sha256_prefix":"82e8b174aecb61bb","entry":"randomize_confidence","repo":"vaswanis/randucb","repo_kind":"official","path":"Lin-Bandit.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/Lin-Bandit.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82e8b174aecb61bb"}},{"code_sha256_prefix":"7218b6e0cccc592a","entry":"randomize_confidence","repo":"vaswanis/randucb","repo_kind":"official","path":"GenLin-Bandit.py","file_url":"https://github.com/vaswanis/randucb/blob/HEAD/GenLin-Bandit.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7218b6e0cccc592a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}