Papers › Optimal Scaling for Locally Balanced Proposals in Discrete Spaces

Optimal Scaling for Locally Balanced Proposals in Discrete Spaces

16 Sep 2022arXiv:2209.08183archive 2025-07-28

Haoran Sun, Hanjun Dai, Dale Schuurmans

Optimal scaling has been well studied for Metropolis-Hastings (M-H) algorithms in continuous spaces, but a similar understanding has been lacking in discrete spaces. Recently, a family of locally balanced proposals (LBP) for discrete spaces has been proved to be asymptotically optimal, but the question of optimal scaling has remained open. In this paper, we establish, for the first time, that the efficiency of M-H in discrete spaces can also be characterized by an asymptotic acceptance rate that is independent of the target distribution. Moreover, we verify, both theoretically and empirically, that the optimal acceptance rates for LBP and random walk Metropolis (RWM) are $0.574$ and $0.234$ respectively. These results also help establish that LBP is asymptotically O(N²3) more efficient than RWM with respect to model dimension N. Knowledge of the optimal acceptance rate allows one to automatically tune the neighborhood size of a proposal distribution in a discrete space, directly analogous to step-size control in continuous spaces. We demonstrate empirically that such adaptive M-H sampling can robustly improve sampling in a variety of target distributions in discrete spaces, including training deep energy based models.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2209.08183")

Code

Syntology Ran 4 of 10 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ha0ransun/lbp_scale officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 4 ran; 1 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran
6unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ha0ransun/lbp_scale. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

conv3x3 ha0ransun/lbp_scale/lbp/model/dnn.py official repository ran MIT (permissive) · a01b6bf3d5c907c2 · report
conv_transpose_3x3 ha0ransun/lbp_scale/lbp/model/dnn.py official repository ran MIT (permissive) · abe28c18ca27abc1 · report
identity ha0ransun/lbp_scale/lbp/data_util/data_loader.py official repository ran · honoured contract fingerprinted MIT (permissive) · 9910e2fc297f8665 · report
mlp_ebm ha0ransun/lbp_scale/lbp/model/dnn.py official repository ran MIT (permissive) · 646a9f9fd82940a8 · report
get_binary_data_loader ha0ransun/lbp_scale/lbp/data_util/data_loader.py official repository unverified MIT (permissive) · d14e95b9443ebb30 · report
get_rate_stats ha0ransun/lbp_scale/lbp/common/rate_stats.py official repository unverified MIT (permissive) · 443e30fa4cee1ada · report
load_dynamic_mnist ha0ransun/lbp_scale/lbp/data_util/raw_dataset.py official repository unverified MIT (permissive) · 10ec5dcad59f3e85 · report
load_omniglot ha0ransun/lbp_scale/lbp/data_util/raw_dataset.py official repository unverified MIT (permissive) · fe47fc8dbdb874c4 · report
load_static_mnist ha0ransun/lbp_scale/lbp/data_util/raw_dataset.py official repository unverified MIT (permissive) · 41c71b384e5548f7 · report
process_categorical_data ha0ransun/lbp_scale/lbp/data_util/data_loader.py official repository unverified MIT (permissive) · 16f406586bb9e7d2 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections