Papers › Posterior Matching for Arbitrary Conditioning

Posterior Matching for Arbitrary Conditioning

28 Jan 2022arXiv:2201.12414archive 2025-07-28

Ryan R. Strauss, Junier B. Oliva

Arbitrary conditioning is an important problem in unsupervised learning, where we seek to model the conditional densities p(xᵤ |xₒ) that underly some data, for all possible non-intersecting subsets o, u ⊂{1, …, d}. However, the vast majority of density estimation only focuses on modeling the joint distribution p(x), in which important conditional dependencies between features are opaque. We propose a simple and general framework, coined Posterior Matching, that enables Variational Autoencoders (VAEs) to perform arbitrary conditioning, without modification to the VAE itself. Posterior Matching applies to the numerous existing VAE-based approaches to joint density estimation, thereby circumventing the specialized models required by previous approaches to arbitrary conditioning. We find that Posterior Matching is comparable or superior to current state-of-the-art methods for a variety of tasks with an assortment of VAEs (e.g. discrete, hierarchical, VaDE).

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 26 code samples harvested from 3 repositories linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 3 where Syntology's instrument failed) · 12 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 10 samples from 1 repository, 1 ran (0 with no instrument failure; 1 where Syntology's instrument failed); found in paper text by Syntology: 16 samples from 2 repositories, 13 ran (11 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

lupalab/posterior-matching officialmentioned in papermentioned on GitHubjaxSyntology: 10 samples, 1 ran (1 instrument-failed) · 9 unverified 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

26 samples harvested: 14 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 3 where Syntology's instrument failed) · 12 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · our draft was wrong
11ran
12unverified

Licence: 12 of the 26 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 3 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. 2 samples whose link to this paper records no repository are listed under one of this paper's own repositories, because identical code was harvested from it for another paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

lupalab/posterior-matching official repository 10 samples, 1 ran (1 instrument-failed) · 9 unverified
pad_channels posterior_matching/models/vdvae.py ran · our draft was wrong no licence file found · pointer only · 10fcb117ffee5145 · report fixture: signature t:ArrayImpl/4/float, width:int/0/int · returned ArrayImpl · level recorded 2026-09-22
Encoder in 278 papers posterior_matching/models/vdvae.py unverified no licence file found · pointer only · 701b897fce8a34e9 · report
LogisticMixture posterior_matching/models/vdvae.py unverified no licence file found · pointer only · a42f907e5c7b7a4d · report
PosteriorMatchingDecoder posterior_matching/models/vdvae.py unverified no licence file found · pointer only · b0f8e415415e8379 · report
PosteriorMatchingDecoderBlock posterior_matching/models/vdvae.py unverified no licence file found · pointer only · 18273b05e6809fa2 · report
PosteriorMatchingVDVAE posterior_matching/models/vdvae.py unverified no licence file found · pointer only · 6e0c276984d84108 · report
_LogisticMixtureDist posterior_matching/models/vdvae.py unverified no licence file found · pointer only · 00c1496a0adf1aa4 · report
get_1x1 posterior_matching/models/vdvae.py unverified no licence file found · pointer only · 93ec9c5f4286cbf7 · report
get_3x3 posterior_matching/models/vdvae.py unverified no licence file found · pointer only · aa70735ae381c2da · report
deepmind/dm-haiku found in paper text by Syntology 14 samples, 11 ran (0 instrument-failed) · 3 unverified
calculate_bias_shape haiku/_src/bias.py ran Apache-2.0 (permissive) · dcfe042d53ba91db · report fixture: signature input_shape:tuple/1/int, bias_dims:tuple/1/int · returned tuple · level recorded 2026-09-24
check_jax_usage haiku/_src/config.py ran Apache-2.0 (permissive) · 60d1392c43f39704 · report fixture: signature enabled:bool/0/bool · returned bool · level recorded 2026-09-24
check_not_none haiku/_src/base.py ran fingerprinted Apache-2.0 (permissive) · 3dcc91ac4323976a · report fixture: signature value:str/0/str, msg:str/0/str · returned str · level recorded 2026-09-24
compute_adjusted_padding haiku/_src/conv.py ran Apache-2.0 (permissive) · 6a0640e81b20a064 · report fixture: signature input_size:int/0/int, output_size:int/0/int, kernel_size:int/0/int, stride:int/0/int, padding:str/0/str, dilation:int/0/int · returned tuple · level recorded 2026-09-24
module_auto_repr haiku/_src/config.py ran Apache-2.0 (permissive) · 533c7323fed6b625 · report fixture: signature enabled:bool/0/bool · returned bool · level recorded 2026-09-24
multinomial haiku/_src/basic.py ran Apache-2.0 (permissive) · c2aac7a3368f16d4 · report fixture: signature rng:ArrayImpl/1/int, logits:ArrayImpl/2/float, num_samples:int/0/int · returned ArrayImpl · level recorded 2026-09-24
ndim_at_least haiku/_src/basic.py ran Apache-2.0 (permissive) · 71a177ba7a67e972 · report fixture: signature x:ArrayImpl/3/float, num_dims:int/0/int · returned bool · level recorded 2026-09-24
one_hot in 150 papers
census: 18 implementations from 25 papers, 10 distinct outputs across 6 buckets, one shared input per bucket
haiku/_src/basic.py ran Apache-2.0 (permissive) · f6f51ced321b0151 · report fixture: signature x:ArrayImpl/2/int, num_classes:int/0/int, dtype:callable/0/? · returned ArrayImpl · level recorded 2026-09-24
rng_reserve_size haiku/_src/config.py ran fingerprinted Apache-2.0 (permissive) · de4b41a490b3f147 · report fixture: signature size:int/0/int · returned int · level recorded 2026-09-24
to_dimension_numbers haiku/_src/conv.py ran Apache-2.0 (permissive) · d53951146fe6a788 · report fixture: signature num_spatial_dims:int/0/int, channels_last:bool/0/bool, transpose:bool/0/bool · returned ConvDimensionNumbers · level recorded 2026-09-24
to_haiku_dict haiku/_src/data_structures.py ran Apache-2.0 (permissive) · 93a365e0dfc01f8c · report fixture: signature structure:dict/0/? · returned dict · level recorded 2026-09-24
safe_get_module_name haiku/_src/base.py unverified Apache-2.0 (permissive) · 9fb0c6433beb4e20 · report
to_immutable_dict haiku/_src/data_structures.py unverified Apache-2.0 (permissive) · 96c9cc45cd31b59c · report
to_mutable_dict haiku/_src/data_structures.py unverified Apache-2.0 (permissive) · dce7b6e14066c25e · report
openai/vdvae found in paper text by Syntology 2 samples, 2 ran (2 instrument-failed) · 0 unverified
get_width_settings vae.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran · our draft was wrong fingerprinted licence of this copy not recorded · 9419abf027f0115d · report fixture: signature width:int/0/int, s:str/0/str · returned defaultdict · level recorded 2026-09-22
parse_layer_string vae.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran · our draft was wrong licence of this copy not recorded · 95d3df9fe1921426 · report fixture: signature s:str/0/str · returned list · level recorded 2026-09-22

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Posterior Matching (graph method: Posterior Matching). 12 bricks; individually on a fixture: 3 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 9 unverified. The assembly has not been run end-to-end.

  1. PosteriorMatchingVDVAE entry · level 0 · unverified · 6e0c276984d84108
  2. Encoder model · level 0 · unverified · 701b897fce8a34e9
  3. PosteriorMatchingDecoder model · level 0 · unverified · b0f8e415415e8379
  4. Block model · level 0 · unverified · 4086bb07fed39601
  5. get_3x3 helper · level 0 · unverified · aa70735ae381c2da
  6. get_width_settings helper · level 1 · ran · our draft was wrong · 9419abf027f0115d
  7. pad_channels helper · level 1 · ran · our draft was wrong · 10fcb117ffee5145
  8. parse_layer_string helper · level 1 · ran · our draft was wrong · 95d3df9fe1921426
  9. LogisticMixture model · level 0 · unverified · a42f907e5c7b7a4d
  10. PosteriorMatchingDecoderBlock model · level 0 · unverified · 18273b05e6809fa2
  11. get_1x1 helper · level 0 · unverified · 93ec9c5f4286cbf7
  12. _LogisticMixtureDist model · level 0 · unverified · 00c1496a0adf1aa4

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2201.12414") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Density Estimation

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