{"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/stabilizing-linear-passive-aggressive-online","title":"Stabilizing Linear Passive-Aggressive Online Learning with Weighted Reservoir Sampling","arxiv_id":"2410.23601","date":"2024-10-31","proceeding":null,"authors":["Skyler Wu","Fred Lu","Edward Raff","James Holt"],"abstract":"Online learning methods, like the seminal Passive-Aggressive (PA) classifier, are still highly effective for high-dimensional streaming data, out-of-core processing, and other throughput-sensitive applications. Many such algorithms rely on fast adaptation to individual errors as a key to their convergence. While such algorithms enjoy low theoretical regret, in real-world deployment they can be sensitive to individual outliers that cause the algorithm to over-correct. When such outliers occur at the end of the data stream, this can cause the final solution to have unexpectedly low accuracy. We design a weighted reservoir sampling (WRS) approach to obtain a stable ensemble model from the sequence of solutions without requiring additional passes over the data, hold-out sets, or a growing amount of memory. Our key insight is that good solutions tend to be error-free for more iterations than bad solutions, and thus, the number of passive rounds provides an estimate of a solution's relative quality. Our reservoir thus contains $K$ previous intermediate weight vectors with high survival times. We demonstrate our WRS approach on the Passive-Aggressive Classifier (PAC) and First-Order Sparse Online Learning (FSOL), where our method consistently and significantly outperforms the unmodified approach. We show that the risk of the ensemble classifier is bounded with respect to the regret of the underlying online learning method.","url_abs":"https://arxiv.org/abs/2410.23601v1","url_pdf":"https://arxiv.org/pdf/2410.23601v1.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":"stabilizing-linear-passive-aggressive-online","repo_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.23601","atlas_url":"https://app.syntology.ai/?focus=2410.23601","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.23601"}},"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":"deterministic:regex_extraction","url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","reach":{"status":"ok","spdx":"Apache-2.0"}}],"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":"2c2db3fda1561b66","entry":"group_hinge","repo":"FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","repo_kind":"official","path":"WRS/metric_extractors.py","file_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training/blob/HEAD/WRS/metric_extractors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2c2db3fda1561b66"}},{"code_sha256_prefix":"0dd865f3e92610aa","entry":"indiv_acc","repo":"FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","repo_kind":"official","path":"WRS/metric_extractors.py","file_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training/blob/HEAD/WRS/metric_extractors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0dd865f3e92610aa"}},{"code_sha256_prefix":"dbe4d2962c293328","entry":"l","repo":"FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","repo_kind":"official","path":"WRS/metric_extractors.py","file_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training/blob/HEAD/WRS/metric_extractors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbe4d2962c293328"}},{"code_sha256_prefix":"2d6eba062ed054f4","entry":"l","repo":"FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","repo_kind":"official","path":"WRS/utils_v2.py","file_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training/blob/HEAD/WRS/utils_v2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2d6eba062ed054f4"}},{"code_sha256_prefix":"5571533e6ad0bcd7","entry":"load_data","repo":"FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training","repo_kind":"official","path":"WRS/utils_v2.py","file_url":"https://github.com/FutureComputing4AI/Weighted-Reservoir-Sampling-Augmented-Training/blob/HEAD/WRS/utils_v2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5571533e6ad0bcd7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}