Probe-Then-Partitioned Multi-Task Trunk
Implementation & benchmark of arXiv:2607.21426 — Semantic-Aware Task Clustering for Constructive and Cooperative Multi-Tasking
Source paper: Semantic-Aware Task Clustering for Constructive and Cooperative Multi-Tasking arXiv:2607.21426 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a cheap shared multi-task probe briefly, extract one semantic embedding per task, and use density-based clustering to determine which tasks should share a neural trunk. After clustering, replace the globally shared trunk by one trunk per discovered cluster, with task heads remaining separate; this preserves cooperation among related tasks while isolating destructive task interactions.
Formulas
Mathematical statement
The paper formulates joint clustering and representation learning as maximizing the sum of task-wise mutual informations, $$\max_{p^{\mathrm{CU}}_1,\ldots,p^{\mathrm{CU}}_K,p^{\mathrm{SU}}_1,\ldots,p^{\mathrm{SU}}_N,\mathcal{T}_1,\ldots,\mathcal{T}_K}\sum_{k=1}^{K}\sum_{i\in\mathcal{T}_k} I(\bm{Y}_i;Z_i).$$ Here, $N$ is the number of tasks, $K$ is the number of clusters or cooperative units, $\mathcal{T}_k\subseteq\{1,\ldots,N\}$ is the set of tasks assigned to cluster $k$, $Z_i$ is the semantic target for task $i$, and $\bm{Y}_i$ is its decoded or task-specific representation. The implementation replaces unavailable mutual information with a supervised proxy: for task loss $\ell_i$, use $\widehat I_i=-\mathbb{E}[\ell_i]$ up to a task-dependent constant, so maximizing the information objective corresponds to minimizing task losses while restricting parameter sharing through the partition. Each task receives an embedding $e_i\in\mathbb{R}^d$, formed from its probe-stage hidden representation and normalized gradient signature. The task distance is cosine distance $d_{ij}=1-(e_i^ op e_j)/(\|e_i\|_2\|e_j\|_2)$. For density clustering, the $m$-core distance is $\mathrm{core}_m(i)=d_{i,(m)}$, the distance from task $i$ to its $m$th nearest task, and the mutual-reachability distance is $d^{\mathrm{mr}}_{ij}=\max\{\mathrm{core}_m(i),\mathrm{core}_m(j),d_{ij}\}$. A minimum-spanning-tree hierarchy over these distances produces dense task groups; ambiguous noise tasks are initially assigned singleton trunks.
Implementation notes
1. Integration point: use a standard multi-task Transformer or MLP with a shared probe trunk $g(x;\theta)$ and separate task heads $h_i(\cdot;\psi_i)$. Train this model for $E_{\mathrm{init}}$ epochs, where $E_{\mathrm{init}}$ is 5--10% of the planned training budget. During this phase, collect for every task $i$ a task embedding $e_i$: concatenate the mean-pooled hidden activation at the trunk output with a normalized average gradient of the shared trunk, then L2-normalize the concatenation. 2. Pseudocode: initialize shared trunk $\theta$ and heads $\psi_i$; for each probe epoch, sample a batch for every task, compute $L=\sum_i\lambda_i\ell_i(h_i(g(x_i;\theta)),y_i)$, and update $(\theta,\psi_i)$; after probing, compute all $e_i$; calculate pairwise cosine distances $d_{ij}$; calculate $m$-nearest-neighbor core distances and $d^{\mathrm{mr}}_{ij}$; run HDBSCAN with minimum cluster size 2 or 3; produce groups $\mathcal{T}_k$. Replace $g$ by independent cluster trunks $g_k(x;\theta_k)$, copy the probe weights into every $\theta_k$, attach task head $i$ to the trunk associated with its cluster, and continue end-to-end optimization using $\mathcal{L}_{\mathrm{clustered}}$. 3. The paper-derived decisions are the staged partition and the information-maximization target. Compute embeddings, distances, and density clusters from observed activations and gradients; do not backpropagate through the discrete clustering. Treat HDBSCAN noise points as singleton groups initially, then optionally merge each singleton into the cluster producing the lowest held-out loss after one validation epoch. To control parameter growth, use low-rank adapters in each cluster trunk or cluster only the upper half of Transformer blocks. 4. First experiment: use NYUv2 or Multi-MNIST with 4--8 tasks, comparing one globally shared trunk, independent task models, random task partitions, and probe-then-partition at equal total parameter count and FLOPs. Measure final mean accuracy, worst-task accuracy, pairwise gradient-conflict rate, validation loss, and training cost. Success is lower worst-task loss and reduced negative-gradient cosine without more than 1.5x inference cost; test robustness by halving the probe budget and permuting task labels.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a NumPy mechanism verification and a PyTorch probe-then-partitioned multi-task trunk MVP. The core predictions manifested: cosine-distance identities were exact, the small-noise embedding law E[d]≈7σ² matched within 2.3% for σ≤0.06, and the analytic partition gain matched the angle sweep to numerical precision. In the learned toy regression, probe partitioning reduced mean MSE from 0.340 to 0.032 and worst-task MSE from 0.992 to 0.078, but the discovered partition used singleton trunks and was not parameter/FLOP matched.
- Agent confidence
- 8/10
- Baseline
- Shared trunk: mean MSE 0.3396, worst-task MSE 0.9924.
- Idea
- Probe partition: mean MSE 0.0320, worst-task MSE 0.0779; discovered groups [0,0,1,2,0,0]. Oracle partition: mean MSE 0.0353, worst-task MSE 0.0774.
Limitations: This is a tiny synthetic regression experiment, not NYUv2 or Multi-MNIST. HDBSCAN itself was not used; a lightweight MST-cut approximation was implemented. The learned comparison did not equalize parameter count, inference FLOPs, or probe-plus-training cost, and gradient-conflict rate, validation generalization, label-permutation robustness, and half-budget probing were not tested.
How to run: python3 experiment.py && /home/maxwelhelp/main/bin/python3 torch_mini.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.21426)
No significant difference vs. the tuned baseline (+2.6%, p=0.5435, wins 3 / 8 paired seeds).
- Benchmark
- Correlated_multitask_regression
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.388
- Idea mean
- 0.398
- Effect (Δ)
- 0.0101 (+2.6%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.5435 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±9.6%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The matched benchmark used the registered custom multi-task track and preserved its six-output structure by loading the accepted track module directly, because bench.get_dataset reshaped custom regression targets to one column. The intervention used a lightweight mutual-reachability MST cut rather than HDBSCAN. Parameter and inference-cost equality was not enforced because discovered cluster trunks can replicate parameters; data, epochs, batch size, optimizer, and the learning-rate search union were matched. No larger real-world multi-task dataset or singleton reassignment validation was tested.
How to run: python3 bench_run.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented and ran the probe-then-partitioned multi-task trunk on the registered correlated_multitask_regression track, which directly contains six regression tasks with latent task groups. The full paired result is not a significant win: baseline mean MSE 0.3879648 versus idea mean MSE 0.3980455, paired delta +0.0100807 and permutation p=0.54355. The trained-model mechanism signature was also not confirmed because negative-gradient conflict rates were identical at 0.2667.
- Baseline
- Best lr=0.003; 8-seed mean MSE 0.3879647814; sweep means lr=0.001: 0.4304336409, lr=0.003: 0.4079873463, lr=0.01: 0.4151849548.
- Idea
- Selected lr=0.003 from the same three-value union; 8-seed mean MSE 0.3980454989; paired delta +0.0100807175; 3/8 wins; permutation p=0.54355.
Benchmark result
No significant difference vs. the tuned baseline (+2.6%, p=0.5435, wins 3 / 8 paired seeds).
- Benchmark
- Correlated_multitask_regression
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.388
- Idea mean
- 0.398
- Effect (Δ)
- 0.0101 (+2.6%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.5435 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±9.6%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The matched benchmark used the registered custom multi-task track and preserved its six-output structure by loading the accepted track module directly, because bench.get_dataset reshaped custom regression targets to one column. The intervention used a lightweight mutual-reachability MST cut rather than HDBSCAN. Parameter and inference-cost equality was not enforced because discovered cluster trunks can replicate parameters; data, epochs, batch size, optimizer, and the learning-rate search union were matched. No larger real-world multi-task dataset or singleton reassignment validation was tested.
How to run: python3 bench_run.py
Artifacts
- bench_report.json 3.2 KB View Raw
- bench_run.py 7.6 KB View Raw
- experiment.py 5.7 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-31T160400.md 5.3 KB View
- results.json 4.9 KB View Raw
- torch_mini.py 3.7 KB View Raw
- torch_results.json 3.5 KB View Raw