Learning after Execution with Action-Specific Credit
Organizations: The Chinese University of Hong Kong, Shenzhen, China · Central South University, Changsha, China
Abstract
Execution is often used as terminal feedback: it scores a generated program, but the resulting state is not used for another learning action. Learning after execution instead uses the execution result as an intermediate state that supports an additional learning interaction for the same policy. This creates a credit-assignment problem because the two actions share the same final objective but play different roles in the trajectory. Accordingly, action-specific credit assigns the initial action credit from the final trajectory outcome and the corrective action credit for improvement over the intermediate state. Image-to-TikZ serves as an executable visual testbed for this setting. On 945 held-out examples, learning after execution strengthens the shared policy under single-call inference and also produces a post-execution corrective capability. Single-call render success reaches 92.70%, compared with 88.25% for continued single-stage GRPO after the same number of additional training iterations. This corrective capability is not reproduced by continued single-stage training and depends on the intermediate state. Alternative credit definitions also induce different group-relative preferences over the same trajectories. Together, these results suggest that executable tasks contain useful learning structure beyond a terminal reward. Code is available at https://github.com/tianyufengcn/Learning-after-Execution.
Figures & tables
| Method | Output | Render Success | RSim | DINO | DreamSim | CLIPImg |
| Base model | Direct | 71.64% | 0.4033 | 0.6025 | 0.5545 | 0.6435 |
| SFT | Direct | 64.66% | 0.3554 | 0.5427 | 0.4960 | 0.5781 |
| Direct-GRPO | Direct | 81.90% | 0.4709 | 0.7046 | 0.6468 | 0.7410 |
| Direct-GRPO (+100) | Direct | 88.25% | 0.5135 | 0.7629 | 0.7019 | 0.7996 |
| Ours (initializer) | Stage 0 | 83.07% | 0.4766 | 0.7129 | 0.6544 | 0.7489 |
| Ours (initializer) | Stage 1 | 83.17% | 0.4781 | 0.7142 | 0.6556 | 0.7501 |
| Stage 1 credit | ||
| Stage 0 credit | ||
| A (Ours) | C | |
| B | D | |
Appendix figures & tables31 assets
Supplementary material from the paper’s appendix.
Appendix
| Direct-SFT | Direct-GRPO | Ours | |
| Training duration | 3 epochs | 1 epoch / 125 iterations | 1 epoch / 125 iterations |
| Learning rate | |||
| Weight decay | – | ||
| LoRA | continued | continued | |
| Group size | – | 8 | 8 |
| GRPO loss | – | Dr.GRPO | Dr.GRPO |
| Method | Training Examples | Initialization | Training Signal |
| Direct-SFT | 3,851 | Base | Reference TikZ code |
| Direct-GRPO | 1,000 | Direct-SFT | Executed outcome |
| Ours | 1,000 | Direct-GRPO | / |
| Split | arXiv | GitHub | TeX.SE | Total |
| Dev-150 | 82 | 43 | 25 | 150 |
| Final-945 | 458 | 309 | 178 | 945 |
| All | 540 | 352 | 203 | 1,095 |
| Metric | Role in Training | Main Evaluation Convention |
| Render success | Execution signal | Success / failure |
| RSim | RL reward + evaluation | Failure |
| DINO | Evaluation only | Failure |
| DreamSim | Evaluation only | Failure |
| CLIPImg | Evaluation only | Failure |
| Checkpoint | Stage 0 Render | Stage 1 Render | Selected Render | RSim | DINO | DreamSim | CLIPImg |
| Initializer | 82.00% | 82.67% | 82.67% | 0.4736 | 0.7088 | 0.6497 | 0.7468 |
| Step 25 | 87.33% | 88.00% | 89.33% | 0.5161 | 0.7667 | 0.7076 | 0.8116 |
| Step 50 | 89.33% | 88.00% | 90.67% | 0.5223 | 0.7805 | 0.7160 | 0.8196 |
| Step 75 | 91.33% | 90.00% | 92.00% | 0.5454 | 0.7975 | 0.7386 | 0.8416 |
| Step 100 | 96.67% | 94.67% | 97.33% | 0.5646 | 0.8326 | 0.7677 | 0.8774 |
| Step 125 | 95.33% | 92.67% | 95.33% | 0.5549 | 0.8117 | 0.7538 | 0.8666 |
| Checkpoint | Stage 0 Render | Stage 1 Render | SS | SF | FS | FF |
| Initializer | 82.00% | 82.67% | 123 | 0 | 1 | 26 |
| Step 25 | 87.33% | 88.00% | 129 | 2 | 3 | 16 |
| Step 50 | 89.33% | 88.00% | 130 | 4 | 2 | 14 |
| Step 75 | 91.33% | 90.00% | 134 | 3 | 1 | 12 |
| Step 100 | 96.67% | 94.67% | 141 | 4 | 1 | 4 |
| Step 125 | 95.33% | 92.67% | 139 | 4 | 0 | 7 |
| Checkpoint | Paired | RSim | DINO | DreamSim | CLIPImg | Improve | Neutral | Degrade |
| Initializer | 123 | 12.20% | 65.04% | 22.76% | ||||
| Step 25 | 129 | 28.68% | 48.06% | 23.26% | ||||
| Step 50 | 130 | 43.85% | 26.92% | 29.23% | ||||
| Step 75 | 134 | 42.54% | 30.60% | 26.87% | ||||
| Step 100 | 141 | 43.26% | 19.86% | 36.88% | ||||
| Step 125 | 139 | 46.76% | 19.42% | 33.81% |
| Additional Iterations | Method | Render | RSim | DINO | DreamSim | CLIPImg |
| Continued Direct-GRPO | 88.25% | 0.5135 | 0.7629 | 0.7019 | 0.7996 | |
| Ours (Stage 0) | 92.70% | 0.5382 | 0.8014 | 0.7330 | 0.8372 | |
| Continued Direct-GRPO | 87.20% | 0.5119 | 0.7557 | 0.6984 | 0.7952 | |
| Ours (Stage 0) | 93.54% | 0.5356 | 0.8011 | 0.7346 | 0.8431 |
| Additional Iterations | Method | Paired | RSim | DINO | DreamSim | CLIPImg |
| Continued Direct-GRPO | 828 | |||||
| Ours | 863 | |||||
| Continued Direct-GRPO | 815 | |||||
| Ours | 869 |
| Metric | SFT Direct-GRPO | Direct-GRPO Ours Stage 1 | Stage 1 Selected |
| Render Success | pp | pp | pp |
| RSim | |||
| DINO | |||
| DreamSim | |||
| CLIPImg |
| Variant | Stage 0 credit | Stage 1 credit |
| A (Ours) | ||
| B | ||
| C | ||
| D |
| Checkpoint | Variant | Stage 0 Render | Stage 1 Render | RSim | DINO | DreamSim | CLIPImg |
| Step 25 | A | 87.33% | 88.00% | ||||
| B | 84.67% | 86.00% | |||||
| Step 50 | A | 89.33% | 88.00% | ||||
| B | 90.00% | 89.33% | |||||
| Step 75 | A | 91.33% | 90.00% | ||||
| B | 88.00% | 88.67% |
| Advantage Comparison | Pearson | Spearman | Sign Flip | Group Top-1 Change | Pairwise Ordering Change |
| vs. | 0.7408 | 0.7083 | 21.4% | 46.1% | – |
| vs. | 0.3848 | 0.3146 | 37.2% | 74.5% | 41.76% |
| Variant | Stable Until | First Abnormal Step | Observed Behavior |
| A | 125 | – | Completed normally |
| B | 82 | Late length/termination pathology | |
| C | 24 | 25–26 | Early zero-signal collapse |
| D | 25 | 26 | Early zero-signal collapse |
| Variant | Step | Stage 1 Tokens | Hit Max | End Doc | Stage 0 Compile | Stage 1 Compile | FF | Nonzero | Nonzero |
| C | 25 | 2723 | 31% | 45% | 10 | 11 | 52 | 48 | 48 |
| C | 26 | 5639 | 69% | 0% | 0 | 0 | 64 | 0 | 0 |
| C | 27 | 7425 | 91% | 0% | 0 | 0 | 64 | 0 | 0 |
| D | 25 | 1313 | 11% | 80% | 38 | 39 | 23 | 64 | 57 |
| D | 26 | 7041 | 86% | 0% | 0 | 0 | 64 | 0 | 0 |
| D | 29–31 | 8192 | 100% | 0% | 0 | 0 | 64 | 0 | 0 |
| Stage 0 RSim | RSim | CI | Improve | Neutral | Degrade | ||
| 17 | 76.5% | 58.8% | 29.4% | 11.8% | |||
| 29 | 55.2% | 41.4% | 20.7% | 37.9% | |||
| 39 | 53.8% | 48.7% | 7.7% | 43.6% | |||
| 26 | 53.8% | 53.8% | 15.4% | 30.8% | |||
| 30 | 23.3% | 20.0% | 33.3% | 46.7% |
| Stage 0 RSim | RSim | DINO | DreamSim | CLIPImg |
| Checkpoint | Weak RSim | Weak | Strong RSim | Strong |
| Step 75 | 58.3% | 28.0% | ||
| Step 100 | 76.5% | 23.3% | ||
| Step 125 | 81.3% | 28.0% |
| Group composition | Groups | Fraction |
| Revision only | 738 | 73.8% |
| Mixed revision / repair | 259 | 25.9% |
| Repair only | 3 | 0.3% |
| All groups | 1,000 | 100% |
| Split | Policy | SS | SF | FS | FF | Stage 0 failures | Repair success |
| Dev-150 | Initializer | 123 | 0 | 1 | 26 | 27 | 3.7% |
| Dev-150 | Step 100 | 141 | 4 | 1 | 4 | 5 | 20.0% |
| Final-945 | Initializer | 780 | 5 | 6 | 154 | 160 | 3.8% |
| Final-945 | Step 100 | 863 | 13 | 14 | 55 | 69 | 20.3% |
| Split | Output | Render | RSim | DINO | DreamSim | CLIPImg |
| Dev-150 | Stage 0 | 96.67% | 0.5479 | 0.8225 | 0.7554 | 0.8668 |
| Stage 1 | 94.67% | 0.5358 | 0.7994 | 0.7348 | 0.8485 | |
| Selected | 97.33% | 0.5646 | 0.8326 | 0.7677 | 0.8774 | |
| Final-945 | Stage 0 | 92.70% | 0.5382 | 0.8014 | 0.7330 | 0.8372 |
| Stage 1 | 92.80% | 0.5446 | 0.8046 | 0.7401 | 0.8409 | |
| Selected | 94.18% | 0.5649 | 0.8221 | 0.7593 | 0.8583 |
Reinforcement Learning
Reinforcement learning studies how agents learn sequential decisions from rewards and interaction, balancing exploration, performance, safety, and adaptation.
See all 1,704 papers