Contents
  1. Four strategies, one budget
  2. Equal queries are not equal supervision
  3. Why dynamic sampling ends up near uniform
  4. The start matters more than the sampling
  5. In practice
  6. Related notes

How should MOPD sample queries across domains?

Uniform, gap-weighted and dynamic domain sampling end level on the average and differ by domain. Equal query shares are not equal supervision: whatever the query mix, we observed STEM carry 57 to 64% of the supervised tokens by update 50, and GUI under 5%.

Draw the same number of queries from every domain, at random within each domain. From a strong start, sampling by the teacher–student gap or by an online loss signal did not raise the average in our comparisons; it moved points from one domain to another. Uniform sampling is the default to keep and the baseline any selection rule has to beat.

Four strategies, one budget

All four start from the uniform merge and train for 50 updates with the same teachers and loss.

  • Uniform domain sampling: the same number of queries per domain, shuffled.
  • Gap-weighted sampling: half the budget uniform, half in proportion to how far the domain teacher leads the merge.
  • Length-adjusted gap sampling: the same, discounting domains with long answers.
  • Dynamic sampling (following D³-MOPD): shares updated online toward domains whose loss is still high and still falling.
Strategy Avg. at 50 STEM VQA OCR GUI Embodied
Uniform 69.8 71.0 64.9 77.8 78.3 57.1
Dynamic 69.8 71.0 64.1 77.7 79.1 57.1
Gap-weighted 69.7 70.0 65.7 77.5 78.8 56.6
Length-adjusted gap 69.5 71.0 64.5 77.2 78.5 56.2

Uniform, dynamic and gap-weighted sampling end level and length-adjusted gap sampling slightly lower; the domain profiles differ more than the averages.

Six panels showing the average and the five domain means over the first 50 updates for uniform, gap-weighted, length-adjusted gap and dynamic sampling. The average panel shows the four curves interleaving and ending between 69.5 and 69.8. In the VQA panel, gap-weighted sampling ends highest at 65.7. In the STEM panel, gap-weighted sampling ends at 70.0 while the others end at 71.0, and length-adjusted sampling lags at updates 10 and 20. In the GUI panel, dynamic sampling ends highest at 79.1.

Domain means over the first 50 updates under the four sampling strategies. Shading around the first series marks the re-evaluation variation (0.7 points per domain, 0.1 for the average).

More queries for a domain do not guarantee a gain there. Gap-weighted sampling gives VQA and STEM the largest shares, yet VQA ends higher (65.7 against 64.9) and STEM lower (70.0 against 71.0), staying at 70.0 to 70.2 from update 30 on while uniform sampling keeps rising. Length-adjusted sampling cuts STEM’s query share to about 16%; STEM then lags in the first 20 updates (68.0 at update 20, against 69.8 under uniform sampling) and reaches the same 71.0 by update 50. The reallocations trade domains against one another, shifting the domain profile and the timing of gains without raising the average. A likely reason is that each query already goes to its own domain teacher, so supervision concentrates on the remaining gaps.

Some patterns do not depend on the sampling rule. OCR dips under all four strategies in the first two windows (75.6 to 76.2 against 77.0 at the start) and then rises to 77.2 to 77.8. Under uniform, gap-weighted and length-adjusted sampling GUI gains most of its improvement in the first 10 updates (to 78.0–78.7 from 77.0) and then moves little; under dynamic sampling it keeps rising to 79.1.

Scope.

One seed per strategy, one start, first 50 updates; a domain mean varies by up to 0.7 between evaluations of the same checkpoint.

Equal queries are not equal supervision

The loss is averaged over all response tokens in the batch, so a domain with long answers carries more of the gradient whatever its query share.

Two rows of stacked bars for each of the four sampling strategies over the first 50 updates. Top row: query shares, which differ by strategy, for example GUI 28% under length-adjusted sampling. Bottom row: token shares, in which STEM holds 43 to 64% in every strategy and GUI 2 to 8%.

Query share and token share under the four strategies. Ten-update means over the first 50 updates.

Under uniform sampling we observed STEM take 20% of the queries but about half of the supervised tokens at first and 60% by update 50, as its responses grew longer. GUI answers are short (about 84 tokens in the last window, against about 1,700 for STEM), so GUI gets 3% of the tokens, yet it improves from 77.0 to 78.3: short-answer domains need little supervision mass to move.

Line chart of the mean response length per domain over the first 50 updates on a logarithmic axis. STEM rises from about 1,100 to 2,000 tokens at update 30 and ends at 1,700; VQA, OCR and embodied lie between about 280 and 600; GUI falls from about 106 to 84.

Response length by domain under uniform sampling. STEM answers are about twenty times longer than GUI answers, which is why STEM carries most of the tokens.

The other strategies change the query mix but not this picture. At update 50 STEM holds 57% of the tokens under length-adjusted sampling (16% of the queries), 61% under dynamic sampling and 64% under gap-weighted sampling (24% and 22%). GUI holds only 4.6% of the tokens under length-adjusted sampling although that strategy sends it 28% of the queries, and correcting for token cost does not help: that strategy ends slightly lower on average. With a token-averaged loss, the token mix is what the optimizer sees.

Scope.

Four runs, one seed each, 10-update means of each run’s own training logs over the first 50 updates.

Why dynamic sampling ends up near uniform

The dynamic scheduler starts uniform and makes only a few decisions within 50 updates; its realized query shares range between 13% and 29% per window, and its result matches uniform’s. The signal it follows, a loss that is high and still falling, does not track capability either (see what distillation adds).

Line chart of the query share of each domain under dynamic sampling over the first 50 updates, with a dashed line at the uniform 20 percent. The shares move between 13 and 29 percent: embodied peaks at 29 percent at update 30, OCR and VQA fall to 13 and 14 percent, and STEM and GUI rise to 24 and 22 percent.

Query shares under dynamic sampling. The scheduler moves the shares by a few points around uniform.

The start matters more than the sampling

From the base model, gap-weighted and dynamic sampling end below uniform after 200 updates (67.4 and 67.1 vs. 67.7). The merged start leads the base model by 3.3 points at update 50, an order of magnitude more than any sampling effect.

Line chart of the average score over 200 updates for four runs: the uniform merge with uniform sampling and with dynamic sampling, which overlap near 69.5, and the base model with uniform and with dynamic sampling, which rise from 58.1 to about 67.7 and 67.1.

Start against sampling. Changing the start moves the curve by 2 to 3 points; changing the sampling moves it by less than a point.

In practice

  • Use uniform domain sampling as the default.
  • Use non-uniform shares to favor a domain you care about, and check what it costs the others.
  • Report the token mix next to the query mix.