{"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/low-variance-off-policy-evaluation-with-state","title":"Low Variance Off-policy Evaluation with State-based Importance Sampling","arxiv_id":"2212.03932","date":"2022-12-07","proceeding":null,"authors":["David M. Bossens","Philip S. Thomas"],"abstract":"In many domains, the exploration process of reinforcement learning will be too costly as it requires trying out suboptimal policies, resulting in a need for off-policy evaluation, in which a target policy is evaluated based on data collected from a known behaviour policy. In this context, importance sampling estimators provide estimates for the expected return by weighting the trajectory based on the probability ratio of the target policy and the behaviour policy. Unfortunately, such estimators have a high variance and therefore a large mean squared error. This paper proposes state-based importance sampling estimators which reduce the variance by dropping certain states from the computation of the importance weight. To illustrate their applicability, we demonstrate state-based variants of ordinary importance sampling, weighted importance sampling, per-decision importance sampling, incremental importance sampling, doubly robust off-policy evaluation, and stationary density ratio estimation. Experiments in four domains show that state-based methods consistently yield reduced variance and improved accuracy compared to their traditional counterparts.","url_abs":"https://arxiv.org/abs/2212.03932v5","url_pdf":"https://arxiv.org/pdf/2212.03932v5.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":"low-variance-off-policy-evaluation-with-state","repo_url":"https://github.com/bossdm/importancesampling","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"density-ratio-estimation","task_name":"Density Ratio Estimation"},{"task_slug":"off-policy-evaluation","task_name":"Off-policy evaluation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2212.03932","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.03932"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bossdm/importancesampling","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"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":"4e57bb6562992e41","entry":"INCRIS","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/INCRIS.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/INCRIS.py","link_basis":"harvester_set","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":"4e57bb6562992e41"}},{"code_sha256_prefix":"f7e6d65af241b4a6","entry":"convert_trajectories","repo":"bossdm/importancesampling","repo_kind":"official","path":"IM_domain.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/IM_domain.py","link_basis":"harvester_set","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":"f7e6d65af241b4a6"}},{"code_sha256_prefix":"73beaa6b578bd82e","entry":"get_A_B_r","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/INCRIS.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/INCRIS.py","link_basis":"harvester_set","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":"73beaa6b578bd82e"}},{"code_sha256_prefix":"cb98bd3c05ea55b7","entry":"get_DR_model","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/DoublyRobust.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/DoublyRobust.py","link_basis":"harvester_set","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":"cb98bd3c05ea55b7"}},{"code_sha256_prefix":"ed4c6ad06021ea63","entry":"get_DR_params","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/DoublyRobust.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/DoublyRobust.py","link_basis":"harvester_set","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":"ed4c6ad06021ea63"}},{"code_sha256_prefix":"c0357ab665e6b496","entry":"get_MSE","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/INCRIS.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/INCRIS.py","link_basis":"harvester_set","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":"c0357ab665e6b496"}},{"code_sha256_prefix":"39936a9ef2687641","entry":"get_model","repo":"bossdm/importancesampling","repo_kind":"official","path":"importance_sampling/DoublyRobust.py","file_url":"https://github.com/bossdm/importancesampling/blob/HEAD/importance_sampling/DoublyRobust.py","link_basis":"harvester_set","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":"39936a9ef2687641"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}