Two-Number Task Affinity: Separating Interaction Strength from Mutual Benefit in Multi-Task Learning

When several prediction tasks share one network, practitioners need to know which tasks to train together. The usual answer is a single affinity score per task pair, such as the angle between the two tasks' gradients or how much a step on one task lowers the other's loss. A single score hides two things. The first is whether the tasks actually push on each other much at all. The second is whether that push helps both of them. Regional-economics researchers ran into the same problem when evaluating interlinked subsystems such as water, energy and food. Their answer, the coupling coordination degree, splits "how tightly linked" from "how well and how evenly developing". The best-known lesson from that literature is that the balance term alone gives false positives: two equally undeveloped subsystems look perfectly coupled.

This note argues that the transferable part of that lesson is the false-positive mechanism, and that the formula should not be carried over. Gradient cosine similarity fails in the same way the economists' coupling term does. It ignores scale, so two tasks that barely affect each other can look perfectly aligned. We propose to report task affinity as two separately measured numbers. One is an interaction intensity: how much a step on one task moves the other's loss, whatever the sign. The other is a coordination score: whether both directions of transfer are beneficial, penalized when one direction is harmful. We then test whether this pair predicts the outcomes practitioners care about better than any one scalar, and better than the obvious one-line fixes. The two outcomes are that no task in a group is hurt by co-training, and that the chosen grouping lowers total loss.

What the coupling coordination model actually computes, and why the naive transfer collapses

In the canonical model, each subsystem $k$ gets a normalized development index $U_k \in [0,1]$. Coupling is defined as $C = K(\prod_k U_k)^{1/K}/\sum_k U_k$, coordination as the mean $T = \frac{1}{K}\sum_k U_k$ (with equal weights), and the final score as $D=\sqrt{CT}$. This is the form used in the logistics study of digital transformation and operational efficiency and the Yellow River water-energy-food study. Multiplying out gives

$$D = \Big(\prod_{k=1}^{K} U_k\Big)^{1/(2K)},$$

which is the square root of the geometric mean of the $U_k$. Two consequences follow. With equal weights, ranking systems by $D$ is exactly ranking them by the geometric mean of their indices. Also, the "coupling" $C$ measures no interaction at all. It measures only how equal the indices are. This explains the Yellow River finding that $C$ stays at 0.881–0.939 while $D$ only rises from 0.463 to 0.579: the subsystems were evenly but weakly developed.

So the obvious idea at this intersection would be to set $U_k$ to each task's normalized loss progress and use $D$ as a multi-task diagnostic or loss weight. That reduces to "use the geometric mean of task progress", and a reviewer would be right to say so. We drop that idea. We keep the structure the economists were reaching for: one factor that is a genuine, independently measured interaction strength, and one factor that rewards balanced, positive development. We measure both on the task pair itself, not derive both from the same indices.

Core Claim

Task affinity estimated from a single scalar confuses three different situations. In the first, the tasks interact strongly and both benefit. In the second, they interact strongly and one is harmed. In the third, they barely interact, so the measured score is a ratio of small, noisy quantities. We claim two things. Asymmetric harm is common in standard multi-task benchmarks and is masked when directional affinities are averaged. Interaction intensity also works as a reliability signal: affinity estimates for low-intensity pairs predict real co-training outcomes poorly, which plays the same role as the level term that filters false positives in the coupling coordination model. A predictor using both numbers should beat scalar affinity at predicting "no member harmed". Grouping with it should lower worst-task degradation without raising total loss.

Research Program

For tasks $i$ and $j$ on a shared network with parameters $\theta$, we measure finite-step transference. $Z_{i\to j}$ is the relative drop in task $j$'s loss, on $j$'s own data, after one optimizer step on task $i$. Here we turn the first-order transference of CoGrad, which approximates this drop by a gradient inner product, into an actual lookahead step. We normalize each cross-effect by the task's self-effect, $r_{i\to j} = Z_{i\to j}/Z_{j\to j}$, which removes loss-scale differences between tasks. The two numbers are then

$$C_{ij} = \tfrac{1}{2}\big(|r_{i\to j}| + |r_{j\to i}|\big), \qquad T_{ij} = -\tau \log\!\big(e^{-r_{i\to j}/\tau} + e^{-r_{j\to i}/\tau}\big).$$

$C_{ij}$ is the intensity. $T_{ij}$ is a smooth minimum with temperature $\tau$, so it is high only if both directions help. We record both numbers along the training trajectory, not at one checkpoint. CoGrad reports that gradient alignment drifts downward as tasks claim specialized capacity, so a single early snapshot may mislead. For groups larger than two, the group's coordination is the smooth minimum over all of its members of the average benefit each receives, and its intensity is the mean pairwise intensity.

The analysis has three parts. First, using exhaustive ground-truth co-training on small benchmarks, we map every pair into the (intensity, coordination) plane and record how often the real outcome is "one task helped, one hurt". Second, we test the reliability hypothesis: does the rank agreement between estimated and true pair gain rise sharply with $C_{ij}$? Third, we test whether intensity tracks sample overlap. Information-Theoretic Requirements for Gradient-Based Task Affinity Estimation shows that gradient cosine stops tracking true task relationships below about 30% shared training instances (inflection at 29.7%, a recommended minimum of 40%). If low overlap reliably shows up as low measured intensity, intensity becomes a cheap warning that works without knowing which instances the tasks share. If it does not, we report that the overlap problem needs a separate correction.

Relation to prior work

Three lines of work estimate a scalar affinity and then group tasks. Taskonomy trains transfer readouts for every pair, at 48,000 GPU hours. GRAD-TAG linearizes around one base model and fits a cheap predictor of subset outcomes. AutoTransfer fingerprints tasks with Fisher-information statistics of untrained networks. All three output one number per pair or subset and are judged on average accuracy. We keep their estimation machinery and change what is estimated and how it is scored.

DMTG skips affinity entirely and learns branch assignments by gradient descent on total loss. Because its objective is total loss, it can accept a grouping that harms one task if others gain more. That is precisely the failure our coordination factor targets. PEMT measures relatedness from task-description prompts and transfers in one direction only, so it cannot see reciprocal harm.

The overlap paper constrains our design: any gradient-based intensity is suspect on low-overlap molecular panels. Phase Transitions in Transfer Learning for High-Dimensional Perceptrons motivates the threshold view. It proves that benefit switches on abruptly above a task-correlation threshold that rises with target data. This predicts that the coordination factor should behave like a threshold, not a smooth score, which we check by fitting step versus linear relations. The multi-agent coordination papers in the file, such as TACTIC, concern agents acting in an environment rather than tasks sharing parameters, and we do not build on them.

Baselines

The do-nothing references are naive multi-task training, with all tasks on one shared encoder, and independent single-task training. Every grouping must beat naive training on total loss. "Harm" is defined relative to single-task training.

The scalar-affinity baselines come next. The first is gradient cosine similarity at the same checkpoints. The second is CoGrad-style first-order transference, $g_i^\top g_j$. The third is mean directional lookahead transference, $(r_{i\to j}+r_{j\to i})/2$, which uses exactly our measurements but collapses them to one number. That third baseline is the cleanest test of whether two numbers beat one. All of them use the same base networks, the same checkpoints, the same seeds, and the same grouping solver.

The strongest existing estimator is GRAD-TAE from GRAD-TAG. It reports estimates within 2.7% of true affinities and correlation up to 0.96 with true transfer performance on SNAP multi-label graph datasets. We run it with its own projection dimension and regression setup, at a FLOP budget matched to ours. Our method counts as beating it if it has higher AUROC for predicting "no member harmed", with comparable rank correlation on average gain. We do not expect to beat 0.96 on average-gain correlation, and we will say so if we do not.

For end-to-end grouping, DMTG is the comparator. It reports a 22% total-loss reduction over naive multi-task training on Taskonomy-5 and 13% over single-task training. We run it with its released annealing schedule and match the number of branches. Winning means equal total loss with lower worst-task degradation.

Two ablations isolate the key ingredient. Coordination-only drops intensity. Geometric-mean-of-benefits is the reduced coupling coordination formula itself, which tells us whether anything beyond a balanced aggregate is needed.

Why not just…?

Why not just use the geometric mean, or the minimum, of the two directional benefits? This is the most serious threat. As shown above, it is mathematically what the equal-weight coupling coordination score reduces to. If the minimum of $r_{i\to j}$ and $r_{j\to i}$ predicts harm as well as the full pair does, then the asymmetry finding stands but the contribution is "use the minimum, not the mean". We would report it that way. Only the intensity factor, specifically the reliability result, would be new. The coordination-only ablation is designed to settle this directly.

Why not just use gradient cosine similarity? The overlap paper shows it is uninformative below about 30% shared instances, and many molecular benchmarks fall well below that (MoleculeNet under 5%, TDC 8–14%). CoGrad shows its value drifts during training. Cosine also ignores scale by construction, so it cannot express intensity. Our experiments still include it at every checkpoint, so its performance is measured rather than assumed.

Why not just run DMTG and ignore affinity? DMTG is cheaper than exhaustive search and may match us on total loss. Its objective does not, however, protect individual tasks. If DMTG's chosen groups rarely harm any member on CelebA-40 and Taskonomy-5, our harm-avoidance argument is weak in practice, and the grouping comparison will show it.

Proposed Experiments

Ground truth comes from three sources. On CelebA-9 we exhaustively co-train all 36 pairs plus a sample of larger subsets. On Taskonomy-5 we train all 10 pairs and all 26 subsets of two or more tasks, which is feasible because all labels sit on the same images, so overlap is 100%. The molecular panels span overlap levels: Tox21 and SIDER (100%), ToxCast (~80%) and the kinase selectivity panel (~20%). Each configuration uses three seeds, and we report seed variance of the gain so that "harm" is called only beyond noise.

Metrics are Spearman correlation between predicted and true pair gain, and AUROC for "any member worse than single-task". For grouping at a fixed branch count, we report total normalized loss and worst-task change versus single-task training. Scalability is checked on CelebA-40 and one SNAP graph.

Three checks decide the outcome. The first is whether more than a small fraction of positive-average pairs actually harm one member. If almost none do, the coordination argument fails. The second is whether estimate–outcome agreement rises with intensity. If it is flat, intensity adds nothing. The third is whether the two-number predictor beats both the mean-transference and the minimum-transference baselines on harm AUROC, consistently across seeds.