Recursive Code Evolution for Task-Oriented Semantic Communications
Authors: Yan Gong, Zheng Chu, Wei Koong Chai, Hari Mohan Pandey, Jingrui Hou, Miao Zhang, Yuanjian Li, Pei Xiao
Organizations: School of Computing and Engineering, Bournemouth University, Fern Barrow, Poole, Dorset, BH12 5BB, United Kingdom · Department of Electrical and Electronic Engineering, University of Nottingham Ningbo China, Ningbo, China · School of Information Management, Wuhan University, Wuhan, China · School of Information Science and Engineering, Chongqing Jiaotong University, Chongqing 400074, China · Academy of Artificial Intelligence and Advanced Technology, Xi’an Jiaotong-Liverpool University, Suzhou 215123, China · Institute for Communication Systems (ICS), University of Surrey, Guildford, Surrey GU2 7XH, United Kingdom
Semantic communication jointly optimizes inference accuracy, channel use, and computation, yet the underlying communication program is typically specified before training. This paper presents ComRSI (Communications-Oriented Recursive Self-Improvement), a framework for recursively evolving that program through large-language-model-assisted code edits. A fixed agent modifies the encoder, channel adapters, decoder, loss, and training policy; a protected evaluator screens candidates under prescribed budgets and resource constraints. Accepted code and textual feedback inform subsequent proposals, while candidate weights are trained from scratch. In the original ten-generation CIFAR-100 lineage, eight accepted revisions produce an attention-pooled code achieving 74.3% test accuracy over an Additive White Gaussian Noise (AWGN) channel at 32 complex symbols per image, compared with 67.2% at 256 symbols for the initial design. The program also improves fading-channel accuracy and transfers to Tiny-ImageNet after retraining. A repeat study with ten searches per method compares ComRSI against non-recursive agents with and without textual history. Mean final search scores balancing accuracy, transmission rate, and computational cost are 0.7587, 0.7376, and 0.7089, respectively; the mean numbers of accepted revisions per search are 6.0, 5.0, and 2.1. The advantage over the memoryless agent is supported by a two-sided rank test, whereas the difference from the history-equipped agent remains statistically inconclusive at this sample size. Archived proposals show that pooling can yield a large improvement, while retained history supports subsequent refinement. These results support recursive program optimization within the evaluated setting and expose its remaining rate-robustness and compute-placement trade-offs.
Figures & tables
Fig. 1: Three complementary objects of adaptation. L1 changes operating variables, L2 changes learned weights, and L3 changes the communication program. ComRSI implements L3 through recursive code inheritance; the proposal agent and evaluation protocol remain fixed. The distinction concerns what changes, not a ranking of system intelligence.
Notation
Description
S , S0 , St
Communication program, initial program, and incumbent at generation t
θS,ξ
Weights obtained by training S with seed ξ
E , D
Semantic encoder and task decoder
Ttx , Trx
Transmitter and receiver channel adapters
u , s
Unnormalized and power-normalized transmitted symbols
r , y
Received symbols before and after equalization
TABLE I: Summary of Main Notations
Fig. 2: ComRSI architecture and evaluation boundaries. (a) Editable communication modules surround a protected physical channel; the loss and training-SNR policy are also editable. (b) Four proposals are screened and the two best valid candidates are trained with three seeds; an accepted program is inherited and otherwise the incumbent is retained. Public diagnostics feed the next generation. (c) Registered programs are retrained and tested after search. Hidden results have no feedback edge to the proposal or selection loop.
Fig. 3: Evolution of incumbent PublicScore over ten generations. (a) Comparison of ComRSI with non-recursive agents with (NR-H) and without (NR-0) textual history. (b) Comparison with other search procedures. Filled and hollow markers indicate accepted revisions and retained incumbents, respectively. Higher PublicScore indicates better performance.
Fig. 4: Candidate-level evolution and code inheritance in ComRSI over ten generations. C1-C4 denote the four proposals per generation. Colors indicate accepted, fully trained but rejected, and proxy-only candidates, while shapes represent modification types. The connecting line traces the accepted code lineage.
Method
Accepted revisions
Search PS
Fresh-seed PS
R
Params (M)
GFLOPs
S0 (human design)
-
-
0.669 ± 0.004
256
3.63
0.69
Hand-tuned S0
-
-
0.686 ± 0.001
256
3.63
0.69
ComRSI (ours)
8
0.785
0.784 ± 0.002
32
5.29
1.14
NR-H (text history)
4
0.716
0.715 ± 0.002
384
5.12
1.00
NR-0 (no history)
1
0.722
0.722 ± 0.001
128
4.94
0.55
Random mutation
4
0.715
0.710 ± 0.002
384
4.01
1.00
TABLE II: Comparison of communication-program search methods on CIFAR-100 over ten generations. Search PS and Fresh-seed PS denote public evaluation scores obtained during search and after retraining, respectively. Fresh-seed PS is reported as mean ± standard deviation over three retrainings. R denotes complex channel uses per image, Params (M) denotes millions of parameters, and GFLOPs denotes forward computation per image.
System
R
AWGN −6 dB
AWGN-5
AWGN 12 dB
Rayleigh-7
Rician-7
S0 (human design)
256
48.5
67.2
70.9
39.9
43.6
Hand-tuned S0
256
51.0
68.5
72.2
42.0
45.9
Random search
256
70.3
72.7
73.1
50.6
55.2
Optuna TPE
384
70.3
72.8
73.2
50.6
55.2
Random mutation
384
68.6
72.1
72.7
48.1
52.5
NR-H (text history)
384
69.9
72.0
72.4
53.9
58.8
TABLE III: CIFAR-100 hidden-test classification accuracy (%) averaged over three fresh training seeds. AWGN-5 averages {−3,0,3,6,9} dB, while Rayleigh-7 and Rician-7 average {−6,−3,0,3,6,9,12} dB. R denotes complex channel uses per image.
Fig. 5: CIFAR-100 hidden-test classification accuracy versus SNR under AWGN, Rayleigh, and Rician fading channels, averaged over three independent retrainings.
Fig. 6: Trade-off between hidden-test AWGN-5 accuracy and the number of transmitted complex symbols per image. The horizontal axis uses a logarithmic scale.
System
Source
R
PS
AWGN-5
−6 dB
Ray.-7
Ric.-7
S0
-
256
0.511
51.2
33.2
31.4
34.3
Hand-tuned S0
C100
256
0.519
51.9
35.1
32.2
35.2
Random search best
C100
256
0.550
55.7
51.4
38.5
41.9
NR-H best
C100
384
0.542
56.1
52.4
38.2
41.8
ComRSI G10
C100
32
0.615
58.1
43.7
47.1
51.1
ComRSI-TIN G1
TIN
256
0.517
52.1
36.4
33.3
36.4
TABLE IV: Communication-program transfer and search results on Tiny-ImageNet. C100 and TIN indicate programs discovered on CIFAR-100 and Tiny-ImageNet, respectively. PS denotes fresh-seed PublicScore, while accuracy (%) is evaluated on the hidden test set. Results are averaged over three training runs with different random seeds. R denotes complex symbols per image.
Metric
ComRSI
NR-H (text history)
NR-0 (no history)
Final search PS
0.7587 ± 0.0242
0.7376 ± 0.0275
0.7089 ± 0.0219
Fresh-seed PS
0.7567 ± 0.0242
0.7362 ± 0.0274
0.7082 ± 0.0210
Hidden AWGN-5 accuracy (%)
74.0 ± 1.3
72.5 ± 1.2
69.3 ± 1.1
Hidden Rayleigh-7 accuracy (%)
60.6 ± 6.9
53.4 ± 9.9
49.9 ± 5.3
Hidden Rician-7 accuracy (%)
65.0 ± 6.8
57.6 ± 10.1
54.3 ± 5.5
Mean accepted revisions
6.0
5.0
2.1
TABLE V: Results over ten independent searches per method. Values are reported as mean ± sample standard deviation across searches. Fresh-seed metrics average three retrainings within each search.
Fig. 7: PublicScore evolution across ten independent searches for ComRSI, NR-H, and NR-0. Thin lines represent individual searches, while thick lines show the mean trajectories. Stars indicate the first accepted pooled-vector design in each search.
Improving an agent through successive revisions requires balancing exploration and evaluation under a limited budget. A narrow search can miss useful sequences of edits, while fully evaluating every intermediate version can exhaust the budget before those sequences yield a verified improvement. We introduce Speculative Recursive Self-Improvement (SpecRSI), which drafts executable successor agents before their predecessors are fully evaluated, while requiring complete verification before adoption. Verification-Aware Tree Search (VATS) allocates the budget between further edits and outstanding checks using the predicted verified return of a continuation. Group Verification Optimization (GVO) learns the improver from completed searches while keeping the real evaluator fixed. In the main scientific comparison, terminal gains exceed Janus by 33.3%--40.0%. Additional evaluations show that SpecRSI outperforms Janus in all 50 scientific backbone--task pairs and exceeds MetaRSI-v1 by 1.85%--2.38% in macro-average system score across twenty backbones. Coding-validation success reaches 69.4% versus HGM's 64.3% at a 20.8% lower target-cost index.
Xin Xu, Ke Cheng, Hao Wang +11
Tencent AMS, Beijing, China · State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University, Beijing, China · CCSE lab, Beihang University. +3
An LLM agent's capability is largely magnified by its harness, namely the prompts, control flow, tooling, memory, and context management surrounding the frozen backbone model. Recent methods increasingly automate this process by iteratively proposing and selecting component-wise edits of an agent harness, practically establishing a form of recursive self-improvement (RSI) at the agent-system level. However, such recursive evolution may overfit by memorizing the training tasks, showing large in-distribution gains that shrink or even vanish on out-of-distribution benchmarks. We introduce Regularized Recursive Self-Improvement of Agent Harnesses (RRSI), which incorporates the principles of regularizations into harness self-improvement by constraining the evolution candidate proposal and selection. The proposer operates with a temporally annealed budget, limiting how many edits a candidate can bundle, and it encourages unexplored trajectories based on evolution history. The selector is equipped with a critic and a pruner: the critic screens benchmark-specific proposals, while the pruner, removes changes that are too small, too expensive, or no longer useful. Together these constraints favor reusable agent mechanisms over benchmark-specific ones or even noises. Across eight benchmarks spanning coding, agentic workspace and engineering design tasks, RRSI gains up to 6.0 points on the split it evolves against and up to 4.3 points on the five out-of-distribution benchmarks, while producing a harness that runs on 30% fewer policy tokens than the unregularized evolution. Code is available at https://github.com/google-research/rrsi and project page is https://regularized-rsi.com/.
Peng Xia, Rujun Han, Zifeng Wang +11
Google Cloud AI Research · UNC-Chapel Hill · Stanford University +1
Conventional neural-network training typically follows a predefined optimization recipe, motivating a LLM agent that monitors training dynamics and adjusts optimizer settings as training progresses, but a fixed agent policy does not accumulate experience across runs. We introduce RSI-Opt, a plug-and-play Recursive Self-Improvement Optimizer Agents which evolves the knowledge that guides this process: a prompt, a playbook of procedures, a library of tested optimizer code, and a decision cadence. A meta-agent rewrites this policy using evidence from earlier runs, and an archive retains evaluated policies for further evolution. Across 5 generations on three training tasks, the meta-agents develop reusable procedures and code and conduct their own CPU proxy experiments. RSI-Opt substantially improves optimizer-agent performance, with representative raw-space summary z-scores increasing from +10.48 to +14.33 on the evolution suite with Opus 5.5 and from −0.36 to +3.11 on held-out tasks with GPT-5.5 through cross-model policy transfer. On the Burgers PDE, it reduces mean relative L2 error by approximately 2.7-fold with Opus 5.5 and 8.8-fold with GPT-6.1 over the fixed-prompt agent baseline, although PDE transfer varies across LLMs and tasks. Controlled comparisons show that the evolved policy combines reusable optimization knowledge with adaptation to each task: initial decisions capture most observed gains on seen tasks, while continued adaptation improves outcomes on unseen tasks. These findings demonstrate how procedures and executable tools accumulated across training runs can improve optimizer-agent performance and support transfer to scientific machine learning.