{"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/equilibrium-and-non-equilibrium-regimes-in","title":"Equilibrium and non-Equilibrium regimes in the learning of Restricted Boltzmann Machines","arxiv_id":"2105.13889","date":"2021-05-28","proceeding":"NeurIPS 2021 12","authors":["Aurélien Decelle","Cyril Furtlehner","Beatriz Seoane"],"abstract":"Training Restricted Boltzmann Machines (RBMs) has been challenging for a long time due to the difficulty of computing precisely the log-likelihood gradient. Over the past decades, many works have proposed more or less successful training recipes but without studying the crucial quantity of the problem: the mixing time, i.e. the number of Monte Carlo iterations needed to sample new configurations from a model. In this work, we show that this mixing time plays a crucial role in the dynamics and stability of the trained model, and that RBMs operate in two well-defined regimes, namely equilibrium and out-of-equilibrium, depending on the interplay between this mixing time of the model and the number of steps, $k$, used to approximate the gradient. We further show empirically that this mixing time increases with the learning, which often implies a transition from one regime to another as soon as $k$ becomes smaller than this time. In particular, we show that using the popular $k$ (persistent) contrastive divergence approaches, with $k$ small, the dynamics of the learned model are extremely slow and often dominated by strong out-of-equilibrium effects. On the contrary, RBMs trained in equilibrium display faster dynamics, and a smooth convergence to dataset-like configurations during the sampling. Finally we discuss how to exploit in practice both regimes depending on the task one aims to fulfill: (i) short $k$ can be used to generate convincing samples in short learning times, (ii) large $k$ (or increasingly large) is needed to learn the correct equilibrium distribution of the RBM. Finally, the existence of these two operational regimes seems to be a general property of energy based models trained via likelihood maximization.","url_abs":"https://arxiv.org/abs/2105.13889v4","url_pdf":"https://arxiv.org/pdf/2105.13889v4.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":"equilibrium-and-non-equilibrium-regimes-in","repo_url":"https://github.com/AurelienDecelle/TorchRBM","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.13889","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.13889"}},"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/AurelienDecelle/TorchRBM","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":21},"by_repo_kind":{"official":{"samples":21,"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":"b72a6e53e13acc13","entry":"compute_U","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/custom_fn.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/custom_fn.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":"b72a6e53e13acc13"}},{"code_sha256_prefix":"988ee22a5cfe4623","entry":"compute_energy","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/functions.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/functions.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":"988ee22a5cfe4623"}},{"code_sha256_prefix":"7c0b3558a3e52f2f","entry":"compute_gradient","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/grad.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/grad.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":"7c0b3558a3e52f2f"}},{"code_sha256_prefix":"e663927a1fd4a268","entry":"decode_sequence","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/fasta_utils.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/fasta_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":"e663927a1fd4a268"}},{"code_sha256_prefix":"1a53c80144c46b56","entry":"encode_sequence","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/fasta_utils.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/fasta_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":"1a53c80144c46b56"}},{"code_sha256_prefix":"382f6ab51c407594","entry":"get_checkpoints","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/train_rbm.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/train_rbm.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":"382f6ab51c407594"}},{"code_sha256_prefix":"07cd4647fea9a351","entry":"get_checkpoints","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/utils.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/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":"07cd4647fea9a351"}},{"code_sha256_prefix":"ca76906ffea7ac52","entry":"get_correlation_two_points","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/potts/analysis.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/potts/analysis.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":"ca76906ffea7ac52"}},{"code_sha256_prefix":"e9494c740da5d283","entry":"get_eigenvalues_history","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/utils.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/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":"e9494c740da5d283"}},{"code_sha256_prefix":"fc6d84a6b04c2cdb","entry":"get_freq_single_point","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/potts/analysis.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/potts/analysis.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":"fc6d84a6b04c2cdb"}},{"code_sha256_prefix":"655fe87a7cd34456","entry":"get_freq_two_points","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/potts/analysis.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/potts/analysis.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":"655fe87a7cd34456"}},{"code_sha256_prefix":"c051bc08d750fbf0","entry":"get_ortho","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/custom_fn.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/custom_fn.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":"c051bc08d750fbf0"}},{"code_sha256_prefix":"7eff798ee21e285c","entry":"get_tokens","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/fasta_utils.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/fasta_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":"7eff798ee21e285c"}},{"code_sha256_prefix":"62543dbc3abecc1b","entry":"init_chains","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/functions.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/functions.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":"62543dbc3abecc1b"}},{"code_sha256_prefix":"57a08ed97ab994a1","entry":"init_parameters","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/functions.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/functions.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":"57a08ed97ab994a1"}},{"code_sha256_prefix":"5119b421a1e356a4","entry":"load_model","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/io.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/io.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":"5119b421a1e356a4"}},{"code_sha256_prefix":"326a513148daf652","entry":"load_params","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/io.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/io.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":"326a513148daf652"}},{"code_sha256_prefix":"f2786712ec765b2c","entry":"one_hot","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/custom_fn.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/custom_fn.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":"f2786712ec765b2c"}},{"code_sha256_prefix":"cc2b7a54dbdbf7fd","entry":"sample_hiddens","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/sampling.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/sampling.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":"cc2b7a54dbdbf7fd"}},{"code_sha256_prefix":"14fbad21f76df895","entry":"sample_state","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/sampling.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/sampling.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":"14fbad21f76df895"}},{"code_sha256_prefix":"f328caf2bd83dfaa","entry":"sample_visibles","repo":"AurelienDecelle/TorchRBM","repo_kind":"official","path":"rbm/binary/sampling.py","file_url":"https://github.com/AurelienDecelle/TorchRBM/blob/HEAD/rbm/binary/sampling.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":"f328caf2bd83dfaa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}