---
title: 'AeSlides: RL for Aesthetic Slide Layout'
url: https://www.emergentmind.com/topics/aeslides
type: topic
---

# AeSlides: RL for Aesthetic Slide Layout

Searching arXiv for the AeSlides paper and closely related follow-up usage.
arxiv_search(query="2604.22840 OR AeSlides Incentivizing Aesthetic Layout in LLM-Based Slide Generation via Verifiable Rewards", max_results=5)
arxiv_search(query="2606.10334 OR Visual-SDPO AeSlides", max_results=5)
AeSlides is a reinforcement learning framework with verifiable rewards for **Aesthetic layout supervision in Slide generation**. It addresses a core modality gap in LLM-based slide generation: the model generates structured text, specifically HTML, while slide quality is judged primarily in the visual domain. AeSlides therefore treats slide aesthetics as an optimization target rather than as an indirect byproduct of text supervision, and formalizes four recurrent layout failures—distorted aspect ratio, excessive whitespace, element collision, and visual imbalance—as explicit reward dimensions for post-training [2604.22840].

## 1. Task formulation and scope

AeSlides studies **prefix-conditioned next-slide generation**. At generation step $t$, given a user query $Q$, supporting context $C$, and preceding slides $P_{<t}$, the model generates the next slide $P_t$:
$$
P_t \sim G_\theta(Q, C, P_{<t}).
$$
The generated slide is represented as **HTML**, rendered through a browser-based stack built with **Playwright**, **FastAPI**, and **Uvicorn**. Reward computation is therefore based on the actual rendered result rather than on raw source text alone [2604.22840].

The framework does not attempt to solve the entire presentation-authoring problem. Its focus is narrower and more specific: improving the **page-level visual layout quality** of generated slides. The training setup excludes many structurally simple page types, including **cover pages, tables of contents, dividers, and ending pages**, because those follow different design principles and are already relatively easy. This makes AeSlides primarily a post-training method for dense content slides, where space allocation and compositional stability are most difficult [2604.22840].

A common misconception is to treat AeSlides as a general deck-planning or multimodal reflection system. Its contribution lies elsewhere. The framework does not center on iterative critique loops, nor on a new renderer, nor on a new content planner. Its central claim is that several aesthetically important slide-layout properties are structured enough to be **programmatically verified**, and that these verifiable signals can supervise RL more effectively than opaque learned reward models or heavy reflection pipelines [2604.22840].

## 2. Targeted layout failures and metric design

AeSlides concentrates on four high-impact layout issues. These are the dimensions the paper identifies as especially important in its benchmark analysis and reward design.

| Issue | What it captures | Measurement basis |
|---|---|---|
| Distorted aspect ratio | Overly tall or otherwise non-standard slide shape | Dynamic rendered width/height |
| Excessive whitespace | Large underutilized empty regions | Local grayscale variance map |
| Element collision | Overlap, overflow, out-of-bound violations | DOM trees and bounding boxes |
| Visual imbalance | Uneven distribution of visual weight | Layout centroid distance |

For **distorted aspect ratio**, AeSlides renders the page with an initial viewport of $1280 \times 10$, uses JavaScript to retrieve the maximum of `scrollHeight` and `offsetHeight` for both `body` and `html`, resets the viewport height accordingly, and then computes the final ratio from the rendered width and height. The target is the standard slide ratio $16:9$. The reward is shaped with an asymmetric quadratic form:
$$
\mathcal{R}(x)=\exp\bigg( -\alpha\big( \log(\frac{x}{\text{target}}) \big)^2-\beta\cdot\max\big(-\log(\frac{x}{\text{target}})-m, 0 \big)^2 \bigg),
$$
with $\alpha = 16.0$, $\beta = 64.0$, and $m = 0.04$. The asymmetry penalizes overly tall slides more heavily, because overlong pages are a frequent failure mode [2604.22840].

For **excessive whitespace**, the framework converts the rendered image to grayscale, computes a local variance map over a box-filter neighborhood of size $H = 201$, $W = 151$, clips the local standard deviation with $T_{\text{clip}} = 50.0$, applies threshold $\tau = 0.05$, and removes boundary regions. The metric is intended to estimate visually unproductive blank space rather than semantic emptiness. The paper also documents reward-hacking behavior here: the model attempted to exploit the metric by inserting textured or image-based backgrounds, and the authors mitigated this by removing background images and smoothing with a Gaussian kernel of size $21 \times 21$ before variance estimation. This suggests that one of the advantages of verifiable rewards is not perfection, but debuggability [2604.22840].

For **element collision**, AeSlides filters the DOM into perceptually meaningful **visual units**, excluding invisible nodes and overly fine-grained primitives such as SVG primitives, then detects three event types: overlap between unrelated elements, escape from parent containers, and overflow beyond slide boundaries. Certain benign cases, such as weak transparent backgrounds and corner badges, are excluded unless they occlude main content. The resulting collision score is monotonic, with higher values indicating worse layout [2604.22840].

For **visual imbalance**, AeSlides computes the visual centroid of the layout and measures its ellipse-normalized distance from the slide center:
$$
d = \sqrt{\left(\frac{x - x_c}{x_{\text{tol}}}\right)^2 + \left(\frac{y - y_c}{y_{\text{tol}}}\right)^2},
$$
with $x_{\text{tol}} = 0.05$ and $y_{\text{tol}} = 0.15$. Horizontal imbalance is treated as more perceptually salient than vertical imbalance. This metric is explicitly about compositional stability rather than overlap or density [2604.22840].

## 3. Reinforcement-learning formulation

AeSlides builds on **Group Relative Policy Optimization (GRPO)** and incorporates several later stabilizing refinements, including **clip-higher** and **token-level loss** from DAPO, **sequence-level importance ratio** from GSPO, **rollout routing replay**, and **reward-decoupled normalization** from GDPO. The final policy objective is:
$$
\begin{aligned}
\mathcal{J}_\text{AeSlides}(\theta) =
\mathbb{E}_{x_i\sim\mathcal{D}, \{y_j\}_{j=1}^{G} \sim \pi_{\theta_{\text{old}}}(\cdot|x_i)}
\Bigg[\frac{1}{\sum_{j=1}^G |y_j|} \sum_{j=1}^{G} \sum_{t=1}^{|y_j|}
\bigg(
\min\Big( s_{j}(\theta)\hat{A}_{i,j,t}, \text{clip}\big( s_{j}(\theta),1-\varepsilon_\text{low},1+\varepsilon_\text{high} \big)\hat{A}_{i,j,t} \Big)
-\beta D_{\text{KL}}(\pi_\theta\|\pi_{\text{ref}})
\bigg)
\Bigg].
\end{aligned}
$$
The rollout group size is $8$, and reward is computed after rendering each sampled slide [2604.22840].

A key technical choice is **reward-decoupled normalization**. If $r_{i,j}^{(k)}$ is reward component $k$ for rollout $j$ under prompt $i$, each reward component is normalized independently across the rollout group:
$$
A_{i,j}^{(k)} = \frac{r_{i,j}^{(k)} - \mathbb{E}_{j'}[r_{i,j'}^{(k)}]}{\mathrm{std}_{j'} [r_{i,j'}^{(k)}] + \varepsilon},
$$
then summed:
$$
A_{i,j} = \sum_k A_{i,j}^{(k)},
$$
and batch-normalized to obtain $\hat{A}_{i,j}$. This prevents a high-variance reward from collapsing the contribution of lower-variance components. The paper identifies this as essential for multi-objective aesthetic optimization [2604.22840].

AeSlides also retains **KL regularization**, in contrast to some later RL practices that remove it. Here the reason is domain-specific. The base model is already competent at slide generation; the goal is to improve layout without collapsing semantic diversity. In the reported ablation, removing KL yields superficially excellent metric scores but drives the policy toward conservative template-like designs. This is an instance where raw reward maximization diverges from desirable generative behavior [2604.22840].

The backbone used is **GLM-4.7-Flash (30B-A3B)**, with **29.94B** total parameters and **3.90B** activated parameters. Training uses **8×H100 GPUs**, **1 epoch**, learning rate $1\times 10^{-6}$, weight decay **0.1**, group size **8**, rollout max response length **8192**, rollout temperature **1**, KL coefficient **0.1**, and clipping parameters $\varepsilon_\text{low}=0.2$, $\varepsilon_\text{high}=0.28$ [2604.22840].

## 4. Data resources and evaluation protocol

AeSlides introduces two data resources. **AeSlides-Reward-Bench** is used to meta-evaluate the reward metrics. It contains **2068 records**, **1029 paired tasks**, **10 singleton tasks**, annotations from **6 trained annotators**, and about **300 person-hours** of annotation effort. It covers **4 issue categories** and **21 issue subcategories** [2604.22840].

The RL training and evaluation corpus is **AeSlides-7k**. The paper reports a deck-level split of **85:15**. Appendix statistics give **8471** collected page-level samples, **1735** filtered special pages, and a remaining split of **5704 train** and **1032 eval**. The abstract simplifies this as training with **only 5K training prompts**. The dataset is multilingual, with more than five languages including **English, Chinese, Arabic, Thai, and Cyrillic-script languages** [2604.22840].

Metric validation compares AeSlides’ verifiable detectors to GPT-based issue detectors. For **aspect ratio**, the verifiable detector achieves **F1 0.83**, **F2 0.91**, **ROC-AUC 0.77**; for **whitespace**, **F1 0.80**, **F2 0.88**, **ROC-AUC 0.89**; for **collision**, **F1 0.47**, **F2 0.51**, **ROC-AUC 0.79**; and for **visual imbalance**, **F1 0.61**, **F2 0.77**, **ROC-AUC 0.83**. The same table reports latency of about **4000 ms** end-to-end for verifiable metrics versus about **8000–12000 ms** for GPT detectors, with near-zero cost for the former and nontrivial per-sample cost for the latter. This directly supports the paper’s argument that targeted verifiable signals can outperform model-based judges on the exact dimensions they supervise [2604.22840].

Automatic evaluation on **AeSlides-7k-eval** reports rendering error, aspect ratio compliance at **1%** and **5%** tolerance, whitespace, collision, visual imbalance, and VLM-based overall scores from **GPT-5-mini** and **GPT-5.2**. Human evaluation is also reported, with annotators experienced in slide design, anonymized model outputs, and approximately **70%** of score differences within **1 point**; the paper reports **$\mathrm{ICC}(3,1)\approx 0.7$** [2604.22840].

## 5. Empirical performance and comparative results

The central empirical result is that, **with only 5K training prompts on GLM-4.7-Flash, AeSlides improves aspect ratio compliance from 36% to 85%, while reducing whitespace by 44%, element collisions by 43%, and visual imbalance by 28%**. Human evaluation shows overall quality increasing from **3.31** to **3.56 (+7.6%)** [2604.22840].

More specifically, the base **GLM-4.7-Flash** model reports **24% / 36%** aspect ratio compliance at **1% / 5%** tolerance, whitespace **0.059**, collision **0.126**, visual imbalance **1.545**, and human score **3.314**. **AeSlides: Verifiable Rewards w/ GDPO** reaches **76% / 85%**, whitespace **0.033**, collision **0.072**, visual imbalance **1.111**, and human score **3.561**. The same table reports **Claude-Sonnet-4.5** at human score **3.442** and **GPT-5.2** at **3.076**, with much weaker aspect-ratio compliance than AeSlides [2604.22840].

These results are notable because AeSlides is explicitly compared against three common alternatives. First, **reflection-based refinement** via **DeepPresenter** performs worse than the base model on several layout dimensions, with render error **1.74%**, aspect ratio **27% / 41%**, whitespace **0.070**, collision **0.212**, visual imbalance **2.170**, and human score **3.107**. The paper attributes this to multimodal reflection failing to detect subtle defects and to the high overhead of iterative rendering. Prompt tokens increase by **155%** and completion tokens by **46%** relative to single-pass generation [2604.22840].

Second, **model-based reward optimization** with GPT-5-nano or GPT-5-mini reward signals improves some metrics but remains weaker than verifiable rewards. The paper highlights a particularly important inconsistency: a visually rewarded GPT-5-mini variant receives a higher GPT-5-mini score than AeSlides, yet is worse on nearly all verifiable metrics and worse in human evaluation. AeSlides presents this as evidence of reward-model blind spots and self-reinforcing bias in learned judges [2604.22840].

Third, **pure supervised fine-tuning** is not enough. The base model already benefits from large-scale slide SFT, yet still shows severe layout defects. AeSlides therefore functions as a post-training stage that translates latent slide competence into explicit visual-layout optimization [2604.22840].

The ablation studies reinforce the causal role of the reward design. Removing the aspect-ratio reward drops aspect-ratio compliance from **85%** to **39%**; removing the whitespace reward worsens whitespace from **0.033** to **0.093**; removing the collision reward worsens collision from **0.072** to **0.200**; and removing the visual-imbalance reward worsens imbalance from **1.111** to **2.289**. Removing KL produces near-maximal metric scores but low entropy (**0.072** versus **0.099** in the full method) and conservative template-like behavior. This makes clear that AeSlides is not merely a collection of heuristics, but a carefully balanced multi-objective RL system [2604.22840].

## 6. Interpretation, limitations, and later use

AeSlides’ broader significance lies in reframing slide aesthetics as a **verifiable RL problem**. Its argument is not that hand-engineered metrics are universally superior to learned judges, but that in domains where quality depends on structured geometric and compositional properties, explicit verifiable supervision can be both more faithful and more efficient. This is especially persuasive here because the paper shows that GPT-based critics are weak precisely on the four issues the RL process needs to detect reliably [2604.22840].

The framework nonetheless has clear limitations. It supervises only four dimensions and leaves out many others, including **insufficient content density, user-intent mismatch, suboptimal color schemes, unsuitable image selection, style consistency, and typography-related issues**. The paper also notes that **element collision** and **visual imbalance** rely heavily on heuristics, which creates engineering overhead and possible brittleness. A further limitation is preference heterogeneity: the reward design assumes a relatively shared notion of aesthetics, whereas actual presentation preferences vary across users, domains, and cultures. The paper therefore suggests more personalized or adaptive aesthetic tuning as future work [2604.22840].

AeSlides has also become a benchmark substrate beyond its original RL formulation. In **“Self-Distillation Policy Optimization via Visual Feedback: Bridging Code and Visual Artifacts”**, the authors adopt the **AeSlides-7k page-level prompts** as the slide domain and use the **AeSlides verifiable metrics**—**aspect ratio, whitespace, collision, imbalance**—on the **AeSlides-7k-eval split** with decks held out. In that setting, the reported **Avg** score improves from **49.5** for zero-shot **Qwen3-VL-8B-Instruct** to **60.7** with full **Visual-SDPO**, indicating that AeSlides functions not only as a training framework but also as a reusable slide-quality benchmark for later visually grounded policy optimization work [2606.10334].

A plausible implication is that AeSlides marks a shift in slide-generation research from generic “better-looking outputs” toward **auditable alignment targets**. Rather than asking a model or evaluator to internalize all aesthetic judgment implicitly, it exposes a subset of slide-quality criteria as measurable, controllable objects. For slide generation, where small geometric failures can dominate user perception, that shift is methodologically consequential.

Source: https://www.emergentmind.com/topics/aeslides