Autonomous agents are increasingly used to improve prompts, code, and machine learning systems through iterative execution and feedback. Yet existing approaches are usually designed as task-specific optimization loops rather than as a unified protocol for establishing baselines and managing tracked multi-round self-improvement. We introduce EPOCH, an engineering protocol for multi-round system optimization in heterogeneous environments. EPOCH organizes optimization into two phases: baseline construction and iterative self-improvement. It further structures each round through role-constrained stages that separate planning, implementation, and evaluation, and standardizes execution through canonical command interfaces and round-level tracking. This design enables coordinated optimization across prompts, model configurations, code, and rule-based components while preserving stability, reproducibility, traceability, and integrity of evaluation. Empirical studies in various tasks illustrate the practicality of EPOCH for production-oriented autonomous improvement workflows.
Figures & tables
Figure 1: Architecture of EPOCH. EPOCH contains two phrases. Phrase 1 use seed planner and baseline executor to generate the evaluation metric compute script, baseline script, and baseline metric. Phrase 2 is a multi-round process, which improve the final optimization results through the orchestrator, investigator, executor, and reviewer. It generates the final script and evaluation metric at the end.
Round
Key change
Tests Passed
fib(105)
fib(106)
Verdict
1
Iterative O(n) baseline
17/19
94 ms
8,420 ms
Baseline
2
Replace loop with fast doubling
19/19
1.00 ms
34.3 ms
Accept
3
Use gmpy2 mpz arithmetic
19/19
0.16 ms
2.39 ms
Accept
4
Replace Python logic with gmpy2.fib
19/19
0.07 ms
1.33 ms
Accept
5
No meaningful further gain detected
19/19
—
—
Terminate
Table 1: Round-level progression for code improvement on the Fibonacci calculator. Execution times are median values over 10 runs.
Round
Key change
Train Acc.
Eval Acc.
Gap
Verdict
1
Adam, lr=0.001
0.6050
0.5333
0.072
Baseline
2
AdamW, lr=0.005
0.7100
0.6167
0.093
Accept
3
AdamW, lr=0.010
0.6700
0.5500
0.120
Reject
3R
SGD, lr=0.008 , momentum 0.9
0.7050
0.6667
0.038
Accept
Table 2: Round-level progression for hyperparameter fine-tuning on MNIST. All runs are deterministic (seed=42).
Round
Key change
Train Acc.
Eval Acc.
Verdict
1
Generic zero-shot system prompt
0.8000
0.8333
Baseline
2
Add domain framing and negation guidance
0.8500
0.9167
Accept
3
Add 6 training-derived few-shot examples
0.9000
1.0000
Accept
Table 3: Round-level progression for prompt tuning on SST-2 using gpt-4.1-nano . Train ( n=20 ) and eval ( n=12 ) subsets are disjoint.
Round
Key change
Train Acc.
Eval Acc.
Verdict
1
Petal-based baseline rules
0.9524
0.9778
Baseline
2
Add sepal-width boundary condition
0.9619
1.0000
Accept
3
Threshold refinement
0.9810
1.0000
No eval gain
4
Ratio-based exception rule
0.9905
1.0000
Reject
Table 4: Round-level progression for rule-based optimization on Iris. Train ( n=105 ) and eval ( n=45 ) subsets are disjoint.