{"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/learning-the-optimal-stopping-for-early","title":"Learning the Optimal Stopping for Early Classification within Finite Horizons via Sequential Probability Ratio Test","arxiv_id":"2501.18059","date":"2025-01-29","proceeding":null,"authors":["Akinori F. Ebihara","Taiki Miyagawa","Kazuyuki Sakurai","Hitoshi Imaoka"],"abstract":"Time-sensitive machine learning benefits from Sequential Probability Ratio Test (SPRT), which provides an optimal stopping time for early classification of time series. However, in finite horizon scenarios, where input lengths are finite, determining the optimal stopping rule becomes computationally intensive due to the need for backward induction, limiting practical applicability. We thus introduce FIRMBOUND, an SPRT-based framework that efficiently estimates the solution to backward induction from training data, bridging the gap between optimal stopping theory and real-world deployment. It employs density ratio estimation and convex function learning to provide statistically consistent estimators for sufficient statistic and conditional expectation, both essential for solving backward induction; consequently, FIRMBOUND minimizes Bayes risk to reach optimality. Additionally, we present a faster alternative using Gaussian process regression, which significantly reduces training time while retaining low deployment overhead, albeit with potential compromise in statistical consistency. Experiments across independent and identically distributed (i.i.d.), non-i.i.d., binary, multiclass, synthetic, and real-world datasets show that FIRMBOUND achieves optimalities in the sense of Bayes risk and speed-accuracy tradeoff. Furthermore, it advances the tradeoff boundary toward optimality when possible and reduces decision-time variance, ensuring reliable decision-making. Code is publicly available at https://github.com/Akinori-F-Ebihara/FIRMBOUND","url_abs":"https://arxiv.org/abs/2501.18059v1","url_pdf":"https://arxiv.org/pdf/2501.18059v1.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":"learning-the-optimal-stopping-for-early","repo_url":"https://github.com/akinori-f-ebihara/firmbound","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"density-ratio-estimation","task_name":"Density Ratio Estimation"},{"task_slug":"early-classification","task_name":"Early  Classification"}],"methods":[{"method_slug":"gaussian-process","method_name":"Gaussian Process"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2501.18059","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.18059"}},"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":"deterministic:regex_extraction","url":"https://github.com/Akinori-F-Ebihara/FIRMBOUND","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/akinori-f-ebihara/firmbound","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":2,"ran_violates":1,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":"61d33dbc0647c14f","entry":"G_st","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61d33dbc0647c14f"}},{"code_sha256_prefix":"bc9c95cd0ae7e727","entry":"conditional_expectation_G_given_lmbda","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc9c95cd0ae7e727"}},{"code_sha256_prefix":"e1acdf086039d22b","entry":"get_upper_triangle","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e1acdf086039d22b"}},{"code_sha256_prefix":"db081f74285f8953","entry":"initialize_Gaussian_process_model","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"db081f74285f8953"}},{"code_sha256_prefix":"96b1d9ff0aeefc1c","entry":"retrieve_posteriors_from_llrm","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96b1d9ff0aeefc1c"}},{"code_sha256_prefix":"7bd697acf5186bd8","entry":"GPModel","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","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":"7bd697acf5186bd8"}},{"code_sha256_prefix":"4b98560231473fe6","entry":"backward_induction","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","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":"4b98560231473fe6"}},{"code_sha256_prefix":"e76952a6c06e3205","entry":"stochastic_variational_ELBO_maximization","repo":"akinori-f-ebihara/firmbound","repo_kind":"official","path":"models/backward_induction_utils.py","file_url":"https://github.com/akinori-f-ebihara/firmbound/blob/HEAD/models/backward_induction_utils.py","link_basis":"first_harvest_node","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":"e76952a6c06e3205"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}