
Statistical attribute alignment for black-box generative AI via output post-processing
This arXiv paper addresses aligning the distribution of an attribute in a black-box generative AI model's outputs, such as fairness attributes or synthetic data representativeness, with a user-specified target distribution, using only repeated query access without model internals. The authors develop query-minimizing post-processing algorithms for exact and approximate alignment across multiple generated outputs, proving asymptotic optimality, and validate the approach on text-to-image generation and geocoded persona generation tasks.
What it claims
The paper defines statistical attribute alignment (SAA): make the joint distribution of a categorical attribute across m returned outputs match a target law. The attribute is labelled by an annotator ϕ, for example perceived gender in a generated headshot. The methods are source-rate-free, meaning they never need to know how often the model naturally produces each attribute. Three algorithms are given:
- Random demand coupon collector (RDC). It is universally exact: the output attribute law equals the target exactly. Among exact source-rate-free algorithms it minimizes expected model calls, up to first-order terms as m→∞.
- Thresholded anytime RDC (TA-RDC). It reaches any user-chosen level of statistical alignment discrepancy. When the target is a product law and discrepancy is measured by forward KL, it is first-order optimal in model calls.
- A count-conditional algorithm. It minimizes discrepancy given the attribute counts actually observed in a single generated batch. It is aimed at curating one synthetic dataset, and it upper-bounds the overall discrepancy (Theorem 15).
How it works
flowchart LR
P[Prompt x] --> G[Black-box generator]
G --> A[Annotator ϕ]
A --> S{Stop rule met?}
S -- no --> G
S -- yes --> F[Select m outputs without replacement]
F --> O[Returned outputs]- Two kinds of sampling. Each model query is an M-sample, which is the expensive part. Any extra randomness used for selection is an E-sample, which is cheap.
- Cost measure. Efficiency is the M-cost, the expected number of model calls N, where N is a stopping time.
- How outputs are chosen. The returned outputs are a subset of the observed generations. Because they are real samples, the distribution of images or text within each attribute value is preserved.
- Joint target, not just proportions. The target is a joint law over the m attributes. For a product target this keeps the sampling variation of independent draws.
- Difference from prior work. Earlier rejection sampling (Block & Polyanskiy, 2023) needs the likelihood ratio, which depends on the unknown source rates. These methods do not.
Evidence
The excerpt has no numeric results. Experiments cover:
- Text-to-image: HiDream-O1-Image, Qwen-Image-2512 and Flux-2-dev.
- Geocoded persona generation: GPT-5.5.
- Pairwise face-recognition audit: synthetic data used to estimate false-match rate.
The authors report three findings, all qualitative in this text:
- Demographic "hard prompts" that request an attribute directly can fail, because the models do not reliably follow them.
- Post-processing with RDC or TA-RDC substantially improves alignment and complements prompting.
- Matching the joint law gives more accurate false-match-rate estimates than matching marginal proportions alone.
Limits
- Exact alignment is expensive when some attributes are rare (Theorem 8). That cost is the motivation for the approximate variants.
- Optimality is asymptotic (first order as m→∞). For TA-RDC it is proven only for product targets under forward KL.
- The annotator is assumed correct. A noisy annotator is discussed separately (Section 6), so results depend on the quality of the attribute classifier you supply.
- Attributes must be categorical. Choosing the target distribution is left to the user.
- Missing details. The fetched text stops in Section 2, so this document has no quantitative results, query budgets or code availability.
Organisations named here
- geocoded persona generation
- text-to-image generation
Technologies named here
- text-to-image generation
Techniques named here
- Statistical attribute alignment via output post-processing
Related in research



