# Task-Gated Diverse Counterfactuals

- ID: 2606
- Canonical URL: https://synthcore.org/idea/2606/task-gated-diverse-counterfactuals
- API JSON: https://synthcore.org/api/idea/2606.json
- API Markdown: https://synthcore.org/api/idea/2606.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.20126](https://arxiv.org/abs/2608.20126)
- Category: sampling
- Solves: sample-efficiency, stability, accuracy
- ML areas: world-model, rl, data-augmentation, training-dynamics
- Math tags: information-theory, linear-algebra, optimization, probability
- Ratings: usefulness 7/10; difficulty 6/10; novelty 6/10

## Idea description

Select model-based rollout branches using a task-gated log-determinant information objective, so the planner receives counterfactuals that are both decision-relevant and nonredundant. Add a conflict-projection step that removes branches whose predicted actions or outcomes disagree with the trusted policy in an unsafe or credibility-sensitive way, then validate a fixed batch before policy updates.

## Mathematical statement

Assume a Gaussian linearized posterior over residual parameters w ~ N(mu, Sigma). For candidate rollout branch b, let Phi_b be its feature matrix, whose rows are feature vectors phi(x) for queried states, and let R_b be a positive-definite observation-noise covariance. Let G_b be a diagonal task gate whose entries encode sensitivity of the control objective to each branch feature; setting entries to zero excludes irrelevant uncertainty. Define the task-weighted information objective F(S) = log det(I + Sigma^(1/2) (sum_{b in S} G_b Phi_b^T R_b^{-1} Phi_b G_b) Sigma^(1/2)) for selected branch set S. The log determinant measures posterior uncertainty-volume reduction, while the gates prevent rollout budget from being spent on irrelevant dimensions. Because each branch contributes a positive-semidefinite information increment, F is monotone submodular, so greedy marginal-gain selection has the cardinality-budget guarantee F(S_greedy) >= (1-1/e) F(S_star). Conflict projection is an explicit safety filter: retain only branches whose action divergence from a trusted policy and predicted constraint violations are below fixed thresholds.

## Key formulas

- $$F(S)=\log\det\left(I+\Sigma^{1/2}\left(\sum_{b\in S}G_b\Phi_b^{\top}R_b^{-1}\Phi_bG_b\right)\Sigma^{1/2}\right)$$
- $$\Delta(b\mid S)=F(S\cup\{b\})-F(S)$$
- $$b_k=\arg\max_{b\in\mathcal{B}\setminus S_{k-1}}\Delta(b\mid S_{k-1}),\qquad S_k=S_{k-1}\cup\{b_k\}$$
- $$\mathcal{B}_{\mathrm{valid}}=\left\{b:\ D_{\mathrm{KL}}(\pi_{\mathrm{branch}}(\cdot\mid s)\,\|\,\pi_{\mathrm{trusted}}(\cdot\mid s))\leq\delta_a,\ \max_t C(s_t)\leq\delta_c\right\}$$

## Implementation notes

Integrate this into model-based reinforcement learning or diffusion/world-model planning immediately before generating synthetic training data. Maintain either an ensemble of predictors or a neural predictor with a Bayesian last layer. Generate M candidate branches from different initial states, actions, ensemble members, or latent perturbations. For each branch b, collect its feature matrix Phi_b from the world model, estimate a task gate G_b by backpropagating the predicted objective—such as cumulative backlog, reward, or constraint margin—to each queried transition, and set R_b from validation residuals. Begin with S equal to the empty set and greedily recompute the marginal log-determinant gain Delta(b|S) using Cholesky rank-one or block updates; select a fixed batch of K branches. Before adding a branch, apply conflict projection: compare its action distribution to the trusted policy using KL divergence or action norm, reject predicted constraint violations, and optionally project unsafe actions onto the nearest feasible action set. Train the policy or value model only on the surviving fixed batch, avoiding adaptive branch selection during the gradient pass. The log-determinant and greedy rule come from the information objective; gates, thresholds, and covariance estimates are empirical. First test on a 2D obstacle-navigation benchmark with a learned dynamics ensemble, comparing random branches, maximum-uncertainty branches, and optimistic-return branches at equal rollout counts. Measure policy return, constraint violations, synthetic-data bias, and wall-clock cost. Success means higher return and fewer catastrophic rollouts at the same number of model calls, with lower variance across random seeds.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a reproducible task-gated log-determinant branch selector with greedy selection, conflict projection, and exhaustive submodularity checking. The toy verification confirmed the predicted mechanism: low-gate information scaled approximately quadratically, overlap reduced marginal gain monotonically, and greedy selection beat random across budgets. The unsafe high-information branch was rejected; this is a mechanism-level win, not evidence of improved policy return.

### Mechanism check

- Verdict: Built a reproducible task-gated log-determinant branch selector with greedy selection, conflict projection, and exhaustive submodularity checking. The toy verification confirmed the predicted mechanism: low-gate information scaled approximately quadratically, overlap reduced marginal gain monotonically, and greedy selection beat random across budgets. The unsafe high-information branch was rejected; this is a mechanism-level win, not evidence of improved policy return.
- Confidence: 8/10
- Limitations: Only a finite-dimensional synthetic information-selection benchmark was tested. No learned dynamics ensemble, obstacle-navigation environment, policy update, model-call wall-clock comparison, synthetic-data bias, multi-seed variance, or real constraint projection was evaluated.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.74425
- Paired wins: 3/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/996/bench_report.json)
- [bench_task_gated.py](https://synthcore.org/code/996/bench_task_gated.py)
- [report.md](https://synthcore.org/code/996/report.md)
- [report_bench_2026-09-02T235345.md](https://synthcore.org/code/996/report_bench_2026-09-02T235345.md)
- [results.json](https://synthcore.org/code/996/results.json)
- [run_bench.py](https://synthcore.org/code/996/run_bench.py)
- [verify_task_gated.py](https://synthcore.org/code/996/verify_task_gated.py)
- [Download all files as ZIP](https://synthcore.org/download/996)

## Disclaimer

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