PaperarXiv:2611.33119 · cs.AI · Nov 24, 2026
MetaFORGE: A Meta-Learning Framework for Harness Optimization in Automated Code Generation for Parallel Computing
Scott Piersall, Yang Gao, Shenyang Liu, Liqiang Wang
The paper describes a sensible execution-grounded skill-refinement harness with distilled memory. However, the main comparison favors the proposed method on both refiner model and reward visibility, and it lacks a seed-skill-only control. Gains are reported on the selection measurements without re-runs, and the tasks are small textbook MPI kernels at a single rank count.
Novelty
2 out of 5Rigor
2 out of 5Reproducibility
2 out of 5Relevance to harnesses
3 out of 5
TL;DR
MetaFORGE is a loop that rewrites a natural-language skill prompt for MPI C code generation. Its reward combines correctness checks, compiler and Clang-Tidy warnings, whole-job runtime and rank imbalance, and a tag-indexed memory stores distilled lessons. It is compared against zero-shot and TextGrad on six textbook MPI kernels at 4 ranks. The headline TextGrad comparison is confounded: MetaFORGE gets a stronger refiner and numeric reward feedback that TextGrad does not. Reported gains come from the same noisy measurements used to pick the best candidate.
Adversarial review by Harness Hub · Nov 27, 2026 · read full text (truncated) · Suggest a correction
Original abstract (authors’ text, select to expand)
Large language models (LLMs) can generate parallel programs, but their correctness and performance depend strongly on the instructions that guide generation. We present \textsc{MetaFORGE}, an execution-grounded meta-learning framework that iteratively optimizes persistent natural-language skill specifications for MPI C code generation. \textsc{MetaFORGE} combines correctness testing, compiler diagnostics, static-analysis findings, runtime measurements, and rank-level load-imbalance profiles into a scalar reward that drives textual-gradient refinement, while an external memory distills and retrieves reward-supported optimization knowledge across runs. Across six MPI tasks and three workload sizes, \textsc{MetaFORGE} improves static-analysis quality, runtime, and load balance relative to zero-shot generation and generally exceeds the evaluated \textsc{TextGrad} iterative baseline. A model-matched refinement ablation shows that the MetaFORGE advantage persists when its refinement model is reduced to \texttt{gpt-4o}. An expanded retrieval ablation across all 18 task--workload configurations shows consistent runtime benefit and broad static-analysis and load-balance benefit from retrieved context. Leakage-controlled held-out and zero-update experiments further provide evidence that optimization knowledge persists in both the transferred skill and external memory under the evaluated protocol.
Summary
MetaFORGE optimizes a persistent skill specification, a prompt that conditions an LLM generating MPI C programs. Each candidate goes through this pipeline: - compiled with -Wall -Wextra -Wpedantic - checked with task-specific output tests - analyzed with Clang-Tidy (including MPI-Checker) - executed 20 times with mpirun -n 4, timed externally by the harness - profiled per rank for load imbalance The scalar reward (Eq. 1) is a negative weighted sum. The weights are: - compiler and static-analysis warning counts: 1.0 each - whole-job runtime: 2.0 - load-imbalance coefficient: 1.5 - correctness failure: 10000 Each update makes two model calls. The first produces a textual gradient (diagnosis). The second rewrites the skill while preserving unrelated instructions. Retrieved memory lessons are added to the context as advisory input. After a run, reward-improving episodes are distilled into lessons and indexed by MPI construct, pattern and symptom tags. The evaluation covers six tasks (pi, dot product, dense matmul, Mandelbrot, Jacobi heat, distributed PCA), three workload sizes each, and five trials per configuration. It runs on a four-node Gigabit cluster of i7-8700K machines. The primary generator is gpt-5.1-codex-max. Metrics are percentage improvements over a zero-shot program generated with an empty skill. Supporting experiments: - a refinement-model ablation on gpt-5.3-codex - a retrieval on/off ablation over 18 configurations - a Codex vs Claude comparison on Distributed PCA - a three-task leave-one-task-out and zero-update transfer study The later experiments use gpt-5.3-codex because the primary model was deprecated.
Key findings
- Table 1: MetaFORGE task-average runtime improvement over zero-shot ranges from 9.32 (Mandelbrot) to 87.99 (Matrix Multiplication). TextGrad ranges from -0.19 (Mandelbrot) to 55.46 (Matrix Multiplication).
- Table 1: MetaFORGE static-analysis improvement is 100.00 for pi and Dot Product. TextGrad scores 8.89 and 5.18 on those tasks, and -13.14 on Matrix Multiplication.
- Section 4.2: MetaFORGE has the larger improvement in 52 of 54 workload-level comparisons. The exceptions are runtime on medium Dot Product (Appendix B.2: 21.65 vs 23.03) and load balance on large Matrix Multiplication.
- Section 4.3 / Table 2: mean within-task ranks of best reward are 5.30 (MetaFORGE-Strong), 7.30 (MetaFORGE-Weak, gpt-4o refiner) and 11.40 (TextGrad-Native). Weak vs TextGrad has Holm p 2.55x10^-4. Strong vs Weak has p 0.054.
- Section 4.4: across 18 configurations, retrieval raises mean runtime improvement from 35.99% to 51.59%, static-analysis improvement from 63.34% to 82.19%, and load-imbalance improvement from 42.27% to 51.03%. The authors call these summaries descriptive.
- Section 4.4: in leave-one-task-out, read-only held-out memory moves mean best reward from -7.24 to -1.21 (pi), -141.73 to -106.63 (matmul) and -38.27 to -17.35 (Mandelbrot), with p=0.0039 for each.
The paper at a glance
- Skill spec + task
- LLM generates MPI C
- Compile, test, Clang-Tidy, run x20, per-rank profile
- Scalar reward (Eq. 1)
- Tag extraction + memory retrieval
- Textual gradient call
- Skill rewrite call
- Keep best skill; patience stop
- Distill and index lessons into cross-run memory
Why it matters
For harness builders the transferable part is the evaluator and loop design. The harness times execution externally, so the generated program cannot game the runtime signal. A dominant correctness penalty sits inside a scalar reward. Diagnosis and editing of the skill happen in separate calls. Distilled, tag-indexed lessons replace raw logs in later prompts. These patterns apply to any skill or prompt self-improvement loop. The retrieval ablation gives descriptive support that distilled lessons help. The evidence does not support the abstract's framing that the method beats TextGrad. In the primary experiment the baseline runs with a weaker refiner and without the numeric reward breakdown. There is no seed-skill-only control. Reported improvements come from the best candidate selected on the same noisy runtime measurements. The tasks are textbook MPI kernels at a fixed four ranks on a commodity Gigabit cluster. The paper is moderately relevant to people building self-optimizing skill or prompt loops with execution feedback. It offers little to builders of general coding agents and does not establish anything about real HPC codes.
Issues (8)
- High severityWhere in paper: Section 4.1; Appendix A.4; Abstract
The primary MetaFORGE vs TextGrad comparison is not controlled on feedback or refiner. MetaFORGE's critique and rewrite calls use gpt-5.1-codex-max, while TextGrad's backward engine uses gpt-4o. With --inject-reward-to-gradient, only MetaFORGE receives the numeric current-vs-previous metric comparison and the weighted reward decomposition. TextGrad 'used qualitative evidence and did not consume either numeric artifact.' TextGrad is therefore asked to optimize a reward it cannot see quantitatively. The Table 1 gaps (e.g. static 100.00 vs 8.89 on pi) partly measure this asymmetry. The paper calls it an 'end-to-end method comparison', but the abstract says MetaFORGE 'generally exceeds' TextGrad without these qualifiers.
- High severityWhere in paper: Section 3.2; Appendix A.3; Tables 4-7
Selection and evaluation use the same measurements. Trial tables report the reward-maximizing candidate from each trajectory. Its reward contains the same 20-run mean whole-job runtime that is reported as improvement, and there is no fresh re-run of the selected program. The measurement setup is noisy: - Gigabit Ethernet - no CPU affinity control - default governor and turbo - no warm-up discard - timing covers the whole mpirun invocation Best-of-N selection on this signal inflates gains. The trial spread shows the noise. Dot Product small reports runtime 19.27 ± 43.19 and balance 46.47 ± 54.45 for MetaFORGE, with one trial at -19.72 runtime and two with negative balance improvement (Table 7).
- High severityWhere in paper: Section 4.1; Appendix A.4
Improvement over zero-shot conflates the seed skill with refinement. The zero-shot baseline uses an empty skill, while MetaFORGE and TextGrad both start from a shared initial skill. They also receive retrieved context from a shared cross-task memory store. The paper never reports what the initial skill alone, or the retrieved memory alone, achieves. The percentage improvements in Table 1 are therefore not attributable to iterative refinement.
- Medium severityWhere in paper: Section 4.3; Table 2; Tables 4-6; Limitations
The model-matched ablation is meant to remove the refiner confound, but it uses a different generator (gpt-5.3-codex) from the primary results. The Limitations section calls the two 'not strictly commensurable.' The ablation reports only ranks of best reward, not the Table 1 static, runtime and balance metrics. Under the chosen weights, best reward is driven mainly by warning counts. Best rewards sit near -1.07 for MetaFORGE versus about -6.08 for TextGrad on pi small (Table 4), a gap on the scale of a few warnings. The rank advantage may therefore mostly reflect Clang-Tidy cleanup, not runtime. Strong vs Weak is not significant (p 0.054).
- Medium severityWhere in paper: Section 4.2; Table 1; Appendix B
The main Table 1 claims have no significance tests or confidence intervals. 'Exceeds TextGrad on all 18 outcome comparisons' rests on means of 15 trials whose per-trial SDs often exceed the means. Improvement is computed against a single no-skill zero-shot program per workload. When warning counts are small, this is fragile. A static score of 100.00% simply means zero remaining warnings, which the reward directly optimizes.
- Medium severityWhere in paper: Appendix A.4; Tables 4-7
Trajectory lengths do not match the stated patience of 'eight consecutive non-improving iterations'. Across trials, total iterations equal best iteration plus 6: TextGrad 7 iterations with best at 1, and MetaFORGE 12 with best at 6 or 9 with best at 3. On pi-large, 4 of 5 TextGrad trials stop at 7 iterations with best iteration 1 and 0.00 improvement on all metrics (Table 6). This points to an integration or stopping-rule issue that may handicap the baseline.
- Low severityWhere in paper: Section 4.4; Limitations; Appendix Table 3
The scope is narrow: - six textbook kernels with well-known MPI patterns - one 4-rank configuration on one cluster - a cross-task transfer claim resting on three tasks, with one Phase 1 training run per fold reused across trials The abstract's 'optimization knowledge persists' holds only under this protocol. The authors acknowledge this.
- Low severityWhere in paper: Appendix A.1, A.4; Limitations
No code or data URL is given, and the primary model was deprecated during the study, so the main results cannot be rerun as reported. The provenance of the shared memory store supplied to both methods is not stated. If it was built from MetaFORGE runs, it favors the method whose distillation format it matches.
Questions for the authors
- How does TextGrad score when given the same numeric reward decomposition (--inject-reward-to-gradient) and a gpt-5.1-codex-max backward engine?
- What do the shared initial skill alone and the retrieved memory alone achieve relative to the empty-skill zero-shot program?
- If the selected best candidates are re-run on fresh executions, with warm-up discarded and affinity pinned, how much of the runtime improvement survives?
- Why do trajectories end 6 iterations after the best iteration when patience is stated as 8, and does fixing this change the TextGrad gap?
- Who populated the shared memory store given to both methods, and was it built from MetaFORGE trajectories?
- How does best-of-N sampling with the same evaluator and the same number of generations compare?
Related in the directory
Open-source projects
Open source · OpenAI
Open source · Princeton NLP / SWE-agent
Open source · AutoCodeRoverSG
Open source · Mem0
Open source · Letta
Open source · gepa-ai
More tools on the same problem
Products and open-source projects in the directory closest in meaning to this paper.
Open source · microsoft
Related papers
arXiv:2611.25891 · cs.AI · Nov 19, 2026
Large language models enable agents to optimize RTL using EDA feedback, yet their executable search procedures remain largely hand- engineered. We present Meta-RTL, an EDA-grounded framework that evolves RTL optimization harnesses from a minimal loop while keeping the optimization model, EDA flow, and per-design budgets fixed. Compared with Dr. RTL, Meta-RTL* reduces aggregate WNS/TNS violations by 7.8%/11.0% across 20 development designs, with area reductions on 70% of them. Without further evolution, Meta-RTL* transfers to 10 unseen IC-RTL designs, reducing aggregate WNS/TNS violations by 20.5%/14.0% and total synthesized area by 12.6%. We further characterize three search mechanisms in the evolved harness and assess their contributions through ablations and a case study.
Xinzhuang Xiong, Yonghao Wang +3
arXiv:2611.24804 · cs.SE · Nov 18, 2026
Multi-level compilers built on MLIR lower concurrent programs through many stages towards targets with potentially drastically different memory models, where an optimisation which appears reasonable, can silently change program behaviour. Testing these lowerings is hard: a concurrent program often has no single expected outcome, and existing MLIR fuzzers often assume determinism. We present MLIR-MRacle, a memory-model-aware metamorphic fuzzer for concurrent MLIR programs. MLIR-MRacle applies metamorphic relations gated by the target memory model, so that both the original and transformed programs remain well defined - executing both repeatedly, and comparing their outcome sets or distributions withone of two statistical oracles. A coverage guided campaign driver built on libafl is used to perform continuous fuzzing. MRs, memory models, oracles, and execution backends all provide extension points for future researchers and compiler engineers to build off this package. In a case study on Armv8 hardware, MLIR-MRacle ran over 145k trials across four configurations, reaching up to 93.6k compiler coverage edges, and found a bug in the OpenMP dialect verifier that has since been fixed upstream. Video: https://youtu.be/lKtGk0H97Ts?si=dWLUHl2CJ24ep6JY
Aaron Gabayoyo, Aidan Dakhama +1
arXiv:2610.31789 · cs.AI · Oct 22, 2026
Scientific computing increasingly relies on large language model-based agents for performance engineering tasks such as instrumentation, analysis, and workflow porting. However, agent effectiveness depends heavily on the surrounding harness, which typically relies on manually written skills and curated memory. This limits autonomous learning, forcing agents to repeatedly rediscover solutions rather than retain and reuse knowledge from prior executions. We introduce Phronix, a capability-centric learning paradigm that enables agentic harnesses to acquire, validate, and refine reusable capabilities from their own executions. Phronix operates through a predictor-validator-corrector loop: MCP tools and associated skills propose solutions, tool executions validate them, and observed outcomes refine the stored capabilities. It distills every observed interaction into a capability store and researches a failing task rather than abandoning it. First, such learned capabilities solve a recurring task on the first attempt in 93-95% of cases across every model, significantly reducing solution non-determinism and improving reliability. Second, Phronix turns an agent's own execution into 7.6-30.8 durable capabilities per task without user instruction, and creation falls below two once the needed capability exists. Third, warm-start runs consume only 0.38-0.40 million tokens per task, which is three to four times less than a single baseline attempt, while a cold-start costs no more than the baseline. On the 1000 Genome Pegasus workflow, instrumenting a production application for I/O performance analysis, Phronix passes all 11 correctness checks against six for the baseline harness, and also lifts the task solving rates of two cheaper models from 29% and 27% of SWE-bench tasks solved to 91% and 87%, respectively, matching the performance of the most expensive evaluated model.
Hariharan Devarajan, Neeraj Rajesh +4
arXiv:2611.33098 · cs.AI · Nov 24, 2026
Agents built on frontier language models are expensive. At every step, the frontier model re-reads its entire context and executes every subtask regardless of its difficulty. This paper explores the simple thesis that much of this cost can be removed by delegating easy subtasks to a small language model, or SLM, that runs on hardware one already owns. To test it, we build Delegent, a simple and effective agent harness built on Claude Code, in which the frontier model stays in charge of every task but hands focused subtasks, such as investigating code, running tests, and searching a corpus, to SLM subagents. Existing approaches such as cascades and model routers usually choose which model executes the entire task, whereas in Delegent, the frontier model always leads the execution and delegates easy subtasks to the SLM. No router or model is trained, so either model can be swapped freely. With the help of a 27B FP8 SLM, Delegent reduces the frontier cost of long-horizon coding by 67% and of agentic search by 59%, with no loss in task performance, and even a 2B SLM that fits on a laptop reduces the coding cost by 66%. The savings grow with the legwork that the frontier model would otherwise do itself, and a short instruction, which leaves the main coding tasks to the frontier model, accounts for most of the saving and keeps the 2B SLM from losing tasks. Code: https://github.com/castorini/delegent
Lingwei Gu, Jimmy Lin
arXiv:2611.26450 · cs.AI · Nov 19, 2026
Pretrained language models (LMs) remain unreliable on exact multi-digit arithmetic without gradient fine-tuning or external tool interpreters. We introduce closed-form, zero-gradient circuit-grafting primitives that compile deterministic computation directly into pretrained LM weights using zero training examples and zero runtime hooks, while bounding per-layer normalization drift and preserving natural-language (NL) competence. Our construction combines three analytical mechanisms: (1) two-layer Mellin-GLU quadrature over bias-free SwiGLU/GeGLU layers, turning unknown per-token RMSNorm scaling into translation along a log-spaced gate grid ($>250\times$ dynamic range) with IEEE 754 error bounds; (2) cross-token scale cancellation via signed Chebyshev Indefinite-RoPE self-sink attention and memoryless SiLU-antisymmetric GatedDeltaNet shifts; and (3) axis-aligned width extension ($d \to d+K$) with $\sqrt{d/(d+K)}$ norm compensation, Base-1000 canonical BPE emission, and differential $(+254,-256)$ tied unembeddings. An automated 5-stage compiler synthesizes 4-8 digit signed $\{+,-,\times\}$ circuits in constant $\mathsf{TC}^0$ depth alongside 3-literal Boolean (100%, $N=1{,}728$; plus 42-layer Gemma 4 E4B audits) and 5-bit Majority/Parity (100%) circuits. On 6-digit arithmetic ($N=1{,}200$, BF16), IBM Granite 4.2 3B (1.07M-1.33M active non-zeros, $\le 0.036\%$) and Alibaba Qwen 3.5 4B (2.25M-2.39M non-zeros, $\le 0.057\%$) reach 99.17% and 100.00% ALU-prefix accuracy (100% with an FP32 sidecar) and 98%-100% mid-sentence resumption, outperforming 12.8K-sample LoRA (42.2% / 61.7%, 0% inline continuation). A factorized block-sparse sidecar holds A100 memory at 7.89 / 10.65 GiB (4.60 / 8.14 GiB under INT8/INT4 + FP32 sidecar) while passing all 14/14 pre-registered $>2$K-token Tango splits ($N=4{,}392$; 0/11,134 OOD triggers).
Tanmay Sah
arXiv:2611.21176 · cs.SE · Nov 16, 2026
Large language models (LLMs) offer a potential route to automating scientific programming, but their usefulness depends on consistently producing numerically correct code. We extend FEM-Bench to 17 finite element tasks involving nonlinear and history-dependent mechanics and structural dynamics, and evaluate 15 models on implementation and test generation without execution feedback. The best model succeeds in 87.1% of single-pass implementation trials, but rankings differ between tracks. The leading implementer achieves 49.9% joint test success, while the leading tester reaches 82.6%. For six models, we compare single-pass generation with two agentic harnesses that allow code execution and revision. Agentic execution solves some tasks that never succeeded in single-pass trials and improves consistency on others, but gains vary across models and harnesses, and regressions also occur. Claude Opus 5 with SimpleAgent reaches 96.5% Pass@3, the probability of at least one success in three attempts, but 77.1% Pass$^3$, the probability that all three succeed. No model-harness combination exceeds 78.8% Pass$^3$. To understand why agents submit incorrect code after passing their own checks, we analyze 249 failed agentic trajectories and identify six categories of self-verification failure. The most common are inadequate test coverage (73.1%) and reliance on generic consistency checks (70.3%), and in 28.5% of cases the tests share an error with the implementation. Motivated by these findings, an exploratory configuration with separate coder and tester agents achieves the highest observed scores, with 97.6% Pass@3 and 88.8% Pass$^3$. These results identify consistency across attempts and independent verification as the main obstacles to trusting LLM-generated scientific code.
Erfan Hamdi, Joel Shor +1