Papers › Aioli: A Unified Optimization Framework for Language Model Data Mixing

Aioli: A Unified Optimization Framework for Language Model Data Mixing

8 Nov 2024arXiv:2411.05735archive 2025-07-28

Mayee F. Chen, Michael Y. Hu, Nicholas Lourie, Kyunghyun Cho, Christopher Ré

Language model performance depends on identifying the optimal mixture of data groups to train on (e.g., law, code, math). Prior work has proposed a diverse set of methods to efficiently learn mixture proportions, ranging from fitting regression models over training runs to dynamically updating proportions throughout training. Surprisingly, we find that no existing method consistently outperforms a simple stratified sampling baseline in terms of average test perplexity. To understand this inconsistency, we unify existing methods into a standard framework, showing they are equivalent to solving a common optimization problem: minimize average loss subject to a method-specific mixing law -- an implicit assumption on the relationship between loss and mixture proportions. This framework suggests that measuring the fidelity of a method's mixing law can offer insights into its performance. Empirically, we find that existing methods set their mixing law parameters inaccurately, resulting in the inconsistent mixing performance we observe. Using this insight, we derive a new online method named Aioli, which directly estimates the mixing law parameters throughout training and uses them to dynamically adjust proportions. Aioli outperforms stratified sampling on 6 out of 6 datasets by an average of 0.27 test perplexity points, whereas existing methods fail to consistently beat stratified sampling, doing up to 6.9 points worse. Moreover, in a practical setting where proportions are learned on shorter runs due to computational constraints, Aioli can dynamically adjust these proportions over the full training run, consistently improving performance over existing methods by up to 12.012 test perplexity points.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Syntology holds a reference implementation of AIOLI, generated from the paper text (not the authors' code), at level 3 on Syntology's ladder: V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” (quoted from Syntology's server card). No rung compares this code against the authors' implementation. For agents: get_reference_implementation(name='AIOLI') (how to connect); the free check have('2411.05735') needs no token.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 31 code samples harvested from 1 repository linked to this paper: 23 ran (of which 3 constructed an object rather than computing a result; 13 with no instrument failure: 3 honoured, 0 violated, 10 with no contract checked; 10 where Syntology's instrument failed) · 8 unverified. Where Syntology's instrument failed: 9 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 31 samples from 1 repository, 23 ran (13 with no instrument failure; 10 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

hazyresearch/aioli officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: 31 samples, 23 ran (10 instrument-failed) · 8 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

31 samples harvested: 23 ran (of which 3 constructed an object rather than computing a result; 13 with no instrument failure: 3 honoured, 0 violated, 10 with no contract checked; 10 where Syntology's instrument failed) · 8 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · honoured contract
9ran · our draft was wrong
1ran; the contract check could not run
10ran
8unverified

Licence: 0 of the 31 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hazyresearch/aioli. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

hazyresearch/aioli official repository 31 samples, 23 ran (10 instrument-failed) · 8 unverified
AbstractTrainer trainer/aioli_trainer.py ran Apache-2.0 (permissive) · aa9e619f3278e4bc · report fixture: returned AbstractTrainer · level recorded 2026-09-22
AioliTrainer trainer/aioli_trainer.py ran Apache-2.0 (permissive) · 3cae68a5efb29625 · report fixture: returned AioliTrainer · level recorded 2026-09-22
LinearWarmupCosineLR trainer/aioli_trainer.py ran Apache-2.0 (permissive) · 58161c1847700499 · report fixture: returned LinearWarmupCosineLR · level recorded 2026-09-22
StringDataCollator trainer/aioli_trainer.py ran Apache-2.0 (permissive) · a6ada8ea3d1c8d08 · report fixture: signature examples:list/1/dict · returned BatchEncoding · level recorded 2026-09-24
aggregate_task_category evaluator/utils.py ran · honoured contract Apache-2.0 (permissive) · 838c84352eff715d · report fixture: signature x:DataFrame/0/? · returned Series · level recorded 2026-09-25
calculate_r_squared analysis/law.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · cc3ad484cd8dd56c · report fixture: signature actuals:Tensor/2/float, predictions:Tensor/2/float · returned float32 · level recorded 2026-09-25
cover_simplex dirichlet_cover.py ran Apache-2.0 (permissive) · 9e72f9c47ff11092 · report fixture: signature k:int/0/int, N:int/0/int, alphas:ndarray/1/float, oversample_factor:int/0/int · returned ndarray · level recorded 2026-09-25
create_optimizer_scheduler trainer/aioli_trainer.py ran · our draft was wrong Apache-2.0 (permissive) · ac3ed26036cd8353 · report fixture: signature model:callable/0/?, lr:float/0/float, max_steps:int/0/int, lr_scheduler_type:str/0/str, end_lr:float/0/float, warmup_steps:int/0/int · returned tuple · level recorded 2026-09-22
get_flat_grad trainer/doge_trainer.py ran · honoured contract Apache-2.0 (permissive) · d0f3b712c535ab79 · report fixture: signature model:callable/0/?, tgt_params_ls:list/1/str · returned Tensor · level recorded 2026-09-25
get_grad_dict trainer/doge_trainer.py ran · our draft was wrong Apache-2.0 (permissive) · e4fac505ef94582c · report fixture: signature model:callable/0/? · returned dict · level recorded 2026-09-25
get_logger in 383 papers utils.py ran · our draft was wrong Apache-2.0 (permissive) · 0cb39a42612d17ad · report fixture: signature dir_path:str/0/str · returned Logger · level recorded 2026-09-25
get_model_type in 10 papers utils.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · f262463f78c9ed6e · report fixture: signature model_name:str/0/str · returned type · level recorded 2026-09-25
get_scheduler_extended trainer/aioli_trainer.py ran · our draft was wrong Apache-2.0 (permissive) · 7ecff0f37380fa48 · report fixture: signature name:str/0/str, optimizer:Adam/0/?, num_warmup_steps:int/0/int, num_training_steps:int/0/int, lr_end:float/0/float · returned LinearWarmupCosineLR · level recorded 2026-09-22
get_steps trainer/aioli_trainer.py ran · honoured contract Apache-2.0 (permissive) · 2cc66e9c3b61d3ad · report fixture: signature args:Args/0/?, n_epochs:NoneType/0/? · returned tuple · level recorded 2026-09-22
get_tokenized_train_dataset trainer/aioli_trainer.py ran · our draft was wrong Apache-2.0 (permissive) · ceda5669cbbae013 · report fixture: signature args:MockArgs/0/?, train_dataset:MockTrainDataset/0/?, n_data:int/0/int, include_metadata:bool/0/bool, mapped_train:bool/0/bool · returned dict · level recorded 2026-09-22
get_tokenized_val_dataset trainer/aioli_trainer.py ran · our draft was wrong Apache-2.0 (permissive) · 34a317ad4275d585 · report fixture: signature args:MockArgs/0/?, validation_dataset:MockValidationDataset/0/? · returned dict · level recorded 2026-09-22
get_train_dataloader in 6 papers trainer/aioli_trainer.py ran Apache-2.0 (permissive) · 2832a5cae93655cc · report fixture: signature tokenizer:MinimalTokenizer/0/?, tokenized_dataset:MinimalDataset/0/?, batch_size:int/0/int · returned DataLoader · level recorded 2026-09-22
interleave_datasets dataset/slimpj_dataset.py ran Apache-2.0 (permissive) · fb3cbc008efc4356 · report fixture: signature datasets:list/1/Dataset, is_eval:bool/0/bool, batch_size:int/0/int, probabilities:ndarray/1/float, probabilities_handle:Tensor/1/float, seed:int/0/int, stopping_strategy:str/0/str · returned IterableDataset · level recorded 2026-09-25
interleave_per_batch_mapped dataset/slimpj_dataset.py ran Apache-2.0 (permissive) · 1f02cd5ca2dc84d5 · report fixture: signature datasets:list/1/Dataset, proportions:list/1/float, batch_size:int/0/int, rng:RandomState/0/? · returned Dataset · level recorded 2026-09-25
load_weight_diff_from_folder mixing_law_fitting.py ran Apache-2.0 (permissive) · 9b58281c06357914 · report fixture: signature folder_path:str/0/str, seed:int/0/int, start_t:int/0/int, end_t:int/0/int · returned ndarray · level recorded 2026-09-25
make_output_dir utils.py ran · our draft was wrong Apache-2.0 (permissive) · 6b3f2ccf676d8314 · report fixture: signature output_dir:str/0/str, run_id:str/0/str · returned str · level recorded 2026-09-25
parse_resumed_model_cpkt evaluator/utils.py ran · our draft was wrong Apache-2.0 (permissive) · f919e9b193bdb7f9 · report fixture: signature args:Args/0/? · returned tuple · level recorded 2026-09-25
save_loss evaluator/utils.py ran Apache-2.0 (permissive) · 2dec393904abb40d · report fixture: signature loss_dict:dict/0/?, result_path:str/0/str, seed:int/0/int, counter:int/0/int, split:str/0/str · returned str · level recorded 2026-09-25
ExtendedSchedulerType trainer/aioli_trainer.py unverified Apache-2.0 (permissive) · d251e579d9c1e9b5 · report
collate in 50 papers mixing_law_fitting.py unverified Apache-2.0 (permissive) · 92cb091d2427e662 · report
fit_multi_obj_scaling_laws analysis/law.py unverified Apache-2.0 (permissive) · 4ac03e5149b1ef69 · report
fit_scaling_laws analysis/law.py unverified Apache-2.0 (permissive) · ae58a6abc7dd4a7e · report
get_slimpajama_6b dataset/slimpj_dataset.py unverified Apache-2.0 (permissive) · f9c6848b0a94945a · report
load_weights_from_folder mixing_law_fitting.py unverified Apache-2.0 (permissive) · 7a0383d468979671 · report
save_aioli_matrices trainer/aioli_trainer.py unverified Apache-2.0 (permissive) · ed16693f655ad564 · report
save_model_and_optimizer trainer/aioli_trainer.py unverified Apache-2.0 (permissive) · 30c6dd51f43019b0 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. For a generated assembly, an independent peer is a second implementation generated separately from the same paper text; neither implementation read the authors' code. At level 2 the two agreed numerically on the fixture's inputs; level 3 is recorded when property tests derived from the paper also passed on both, and each level 3 card prints how many its report lists. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. A generated assembly's label was set when its code was generated for the method, and no model judged it; its card prints it as "by construction" or "not judged by a model". Where an assembly's phrase has no constructed figure, a brick that ran is not among the harvested samples this build reads, and whether a brick's run only constructed an object is read from that brick's harvested sample, so the figure was not counted; it does not say there were none.

2 assemblies on this paper: 1 harvested, 1 generated.

generated Assembly for AIOLI (graph method: AIOLI), generated from the paper text, not the repository's code. 1 brick; individually on a fixture: 1 ran (1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. Ran end-to-end against an independent peer (level 3; 5 property tests passed on both).

label matches by construction: the code was generated for this method (not judged by a model)

  1. compute_aioli_ood_gradient entry · level 3 · ran · violated contract · 1f3b33e3a180e679bffbaf5cc9a40c5e2d70c65cd719d071c2a2aa4f42c336b7

harvested Assembly for AIOLI (graph method: AIOLI). 13 bricks; individually on a fixture: 10 ran (of which 3 constructed an object rather than computing a result; 6 with no instrument failure: 1 honoured, 0 violated, 5 with no contract checked; 4 where Syntology's instrument failed) · 3 unverified. The assembly has not been run end-to-end.

  1. AioliTrainer entry · level 1 · ran · 3cae68a5efb29625
  2. AbstractTrainer helper · level 1 · ran · aa9e619f3278e4bc
  3. create_optimizer_scheduler helper · level 1 · ran · our draft was wrong · ac3ed26036cd8353
  4. get_steps helper · level 1 · ran · honoured contract · 2cc66e9c3b61d3ad
  5. get_tokenized_train_dataset helper · level 1 · ran · our draft was wrong · ceda5669cbbae013
  6. get_tokenized_val_dataset helper · level 1 · ran · our draft was wrong · 34a317ad4275d585
  7. get_train_dataloader helper · level 1 · ran · 2832a5cae93655cc
  8. save_aioli_matrices helper · level 0 · unverified · ed16693f655ad564
  9. save_model_and_optimizer helper · level 0 · unverified · 30c6dd51f43019b0
  10. get_scheduler_extended helper · level 1 · ran · our draft was wrong · 7ecff0f37380fa48
  11. StringDataCollator helper · level 1 · ran · a6ada8ea3d1c8d08
  12. ExtendedSchedulerType helper · level 0 · unverified · d251e579d9c1e9b5
  13. LinearWarmupCosineLR helper · level 1 · ran · 58161c1847700499

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2411.05735") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Language ModelingLanguage ModellingMath

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections