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.
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