Unverified 2026

Bidirectional Conditional Cycle Loss

Usefulness7/10
Difficulty3/10
Novelty6/10

Source paper: On the Complexity of the Compatibility Problem for Succinctly Encoded Conditional Distributions arXiv:2608.31120 · analyzed Sep 2, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Train two neural conditionals, q_theta(x|y) and r_phi(y|x), with an additional loss penalizing violations of the paper's four-variable compatibility identity. Evaluating the constraint in log space turns multiplicative probability inconsistencies into additive residuals and avoids underflow. The method applies to discrete latent-variable models, bidirectional imputers, and systems with separate neural models for both conditional directions.

Formulas

$$p(x_{1}|y_{1})p(y_{1}|x_{2})p(x_{2}|y_{2})p(y_{2}|x_{1})=p(y_{1}|x_{1})p(x_{1}|y_{2})p(y_{2}|x_{2})p(x_{2}|y_{1})$$
$$\Delta=\log q_\theta(x_1|y_1)+\log r_\phi(y_1|x_2)+\log q_\theta(x_2|y_2)+\log r_\phi(y_2|x_1)-\log r_\phi(y_1|x_1)-\log q_\theta(x_1|y_2)-\log r_\phi(y_2|x_2)-\log q_\theta(x_2|y_1)$$
$$L=L_{\mathrm{task}}+\lambda\,\mathbb{E}_{x_1,x_2,y_1,y_2}[\rho(\Delta)]$$
$$\rho(z)=\begin{cases}\frac{1}{2}z^2,&|z|\leq\delta\\\delta\left(|z|-\frac{1}{2}\delta\right),&|z|>\delta\end{cases}$$

Mathematical statement

The paper gives the following necessary condition for compatibility of strictly positive conditionals: p(x_1|y_1)p(y_1|x_2)p(x_2|y_2)p(y_2|x_1) = p(y_1|x_1)p(x_1|y_2)p(y_2|x_2)p(x_2|y_1). Here x_1 and x_2 are values of X, y_1 and y_2 are values of Y, and p denotes the two conditional distributions. Define q_theta(x|y) and r_phi(y|x) as the neural approximations. Taking logarithms gives the residual Delta = log q_theta(x_1|y_1) + log r_phi(y_1|x_2) + log q_theta(x_2|y_2) + log r_phi(y_2|x_1) - log r_phi(y_1|x_1) - log q_theta(x_1|y_2) - log r_phi(y_2|x_2) - log q_theta(x_2|y_1). Exact positive-support compatibility implies Delta = 0 for every quadruple. The regularizer is L_cycle = E[rho(Delta)], where rho(z) can be z^2 or the Huber penalty with threshold delta. This uses the paper's incompatibility certificate as a differentiable training constraint.

Implementation notes

Integrate the method at the loss level in a model exposing both conditional directions, such as a discrete latent-variable model, a bidirectional imputer, or two transformer heads sharing an encoder. For each minibatch, compute logits and log-softmax outputs for q_theta(x|y) and r_phi(y|x). Sample two distinct X values and two distinct Y values per training example, either from observed values, the model's marginal samples, or uniformly from the categorical support. Gather the eight log-probability entries and compute Delta exactly from the displayed equation. Add lambda times the mean squared or Huber Delta to the ordinary task loss. Pseudocode: log_q = model_q(y); log_r = model_r(x); sample x1,x2,y1,y2; Delta = log_q[x1,y1] + log_r[y1,x2] + log_q[x2,y2] + log_r[y2,x1] - log_r[y1,x1] - log_q[x1,y2] - log_r[y2,x2] - log_q[x2,y1]; loss = task_loss + lambda * huber(Delta); loss.backward(). Use log-softmax directly, and restrict the first experiment to full-support categorical outputs. The network estimates probabilities; no mathematical quantities need to be estimated externally. Test first on synthetic data sampled from a known joint over X and Y, comparing independently trained conditionals against the same architecture with the cycle loss at equal parameters, steps, and FLOPs. Then test discrete latent codes on MNIST. Pre-register that the held-out 95th-percentile absolute cycle residual must decrease by at least 10x, while conditional calibration or recovered-joint error improves at fixed task loss. Measure residuals on 10,000 unseen quadruples. Ablate only lambda by setting lambda to zero, plus a shuffled-quadruple control. The transfer is falsified if training residuals decrease but held-out residuals do not, or if compatibility improves without any improvement in joint recovery, calibration, or sampling consistency.

Verification

Unverified

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Not tested

Stage 2 · Practical benchmark result: Not run

Stage 1 — Mechanism check agent confidence 8/10

Built a small PyTorch implementation of bidirectional conditional cycle loss using log-softmax probabilities and the paper’s eight-term compatibility residual. The exact-conditionals sanity check gave maximum absolute residual 6.7e-16, while random incompatible conditionals had mean absolute residual 4.27. On a fixed positive synthetic joint, lambda=0.5 reduced held-out 95th-percentile residual from 0.180 to 0.0724 (about 2.5x) and held-out mean residual from 0.0770 to 0.0285, with nearly unchanged task NLL and a tiny joint-L1 improvement from 0.1266 to 0.1257. This is a real compatibility signal, but it does not meet the proposed 10x threshold and is not evidence of a large accuracy gain.

Agent confidence
8/10
Baseline
heldout p95 |Delta|=0.1798533; heldout mean |Delta|=0.0769958; joint L1=0.1265701; task NLL=1.3049408
Idea
lambda=0.5: heldout p95 |Delta|=0.0723756; heldout mean |Delta|=0.0284948; joint L1=0.1257352; task NLL=1.3050591; exact math check max |Delta|=6.66e-16

Limitations: Only a 4x4 synthetic categorical joint and one random seed/lambda were tested. The experiment did not test MNIST, larger neural architectures, calibration, sampling consistency, FLOPs/speed, shuffled-quadruple controls, or robustness across multiple datasets and seeds.

How to run: python3 cycle_experiment.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Artifacts

⬇ Download all as ZIP 5 files · code, reports and structured results