Papers
Topics
Authors
Recent
Search
2000 character limit reached

Stroke of Surprise: Progressive Semantic Illusions

Updated 4 July 2026
  • Stroke of Surprise is a generative framework for Progressive Semantic Illusions that uses sequential strokes to reveal dual semantic interpretations.
  • It employs a dual-branch Score Distillation Sampling method to optimize early strokes for one concept while enabling a later reinterpretation into a different object.
  • Overlay Loss is integrated to ensure spatial complementarity, preventing stroke clutter and enhancing the recontextualization effect during sketch formation.

Stroke of Surprise is a generative framework for Progressive Semantic Illusions, a vector-sketching task in which a single sketch changes meaning as strokes are sequentially added: a prefix of the stroke sequence should depict one concept, while the completed sketch should depict another. The defining effect is temporal rather than spatial ambiguity: semantic reversal emerges through stroke accumulation, not through rotation, viewpoint change, or a multi-view consistency constraint. In the paper’s formulation, the central challenge is a dual-constraint: early strokes must already be recognizable as one object while also serving as the structural basis for a later reinterpretation as a different object (Cheng et al., 12 Feb 2026).

1. Progressive semantic illusion and the temporalization of ambiguity

The task introduced under the name Stroke of Surprise is not standard vector sketch generation, standard semantic morphing, or a static visual illusion. Traditional visual illusions are described as relying on spatial ambiguity, including viewing angle, scale, frequency, shadow, anamorphosis, or multistable spatial configurations. By contrast, Progressive Semantic Illusions are defined by multi-stage semantic consistency over prefixes of a stroke sequence: the prefix sketch must depict concept p1p_1, and the full sketch must depict concept p2p_2 (Cheng et al., 12 Feb 2026).

This distinction is operational as well as conceptual. Raster editing systems tend to perform destructive changes that overwrite earlier content, which violates the additive drawing constraint. Greedy sequential vector methods optimize the first phase only for the first concept; once later strokes are appended, the fixed prefix often becomes clutter or semantic noise. Stroke of Surprise is designed to avoid both failure modes by treating the drawing process itself as the site of illusion. The paper’s example of early strokes depicting “pig” and the full sketch later being read as “angel” captures the intended perceptual structure: the viewer first commits to one semantic hypothesis and then later strokes force a reinterpretation.

The result is what the paper characterizes as an extension of visual anagrams from the spatial domain to the temporal one. A plausible implication is that the framework redefines illusion not as simultaneous multistability in a finished artifact, but as controlled semantic recontextualization over an ordered construction process.

2. Formal problem definition and the dual-constraint

The sketch is represented as a sequence of learnable vector strokes partitioned into prefix and delta subsets. The paper defines

Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},

with the full sketch

Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.

The stage-wise rasterized images are produced by a differentiable rasterizer R()\mathcal{R}(\cdot):

Iprefix=R(Sprefix;θ),Ifull=R(Sfull;θ),I_{\text{prefix}} = \mathcal{R}(S_{\text{prefix}};\theta), \qquad I_{\text{full}} = \mathcal{R}(S_{\text{full}};\theta),

where θ\theta denotes the learnable stroke parameters (Cheng et al., 12 Feb 2026).

The semantic targets are two prompts, p1p_1 for the prefix stage and p2p_2 for the completed sketch. The central requirement is not merely that IprefixI_{\text{prefix}} and p2p_20 each align with a prompt, but that the same prefix strokes satisfy two incompatible pressures. The paper names this the dual-constraint: early strokes must be a coherent depiction of object p2p_21 and simultaneously a reusable scaffold for object p2p_22.

This is the basis for the paper’s notion of a common structural subspace. The term is not formalized as a linear-algebraic subspace; it functions as a conceptual descriptor for a geometric arrangement of early strokes that supports two distinct semantic readings at two different drawing stages. The paper also notes a methodological limitation: it does not explicitly specify whether stroke order itself is optimized or fixed by partition/order initialization. The operative sequencing is therefore given by the partition into the first p2p_23 strokes and the remaining p2p_24 strokes.

3. Dual-branch SDS and sequence-aware joint optimization

The method’s main semantic supervision is a dual-branch Score Distillation Sampling (SDS) objective driven by a frozen Stable Diffusion v1.5 prior. The prefix branch renders only the prefix strokes and conditions on prompt p2p_25; the full branch renders all strokes and conditions on prompt p2p_26. The total objective is written as

p2p_27

with the SDS gradients combined as

p2p_28

For the prefix branch, the paper gives

p2p_29

The main text does not write the full-branch formula explicitly, but states that it is the analogous SDS gradient for the rendered full sketch under prompt Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},0 (Cheng et al., 12 Feb 2026).

This dual-branch construction is the core technical move. Prefix strokes receive gradients from both semantic stages, while delta strokes affect only the full sketch. Consequently, the prefix is prevented from collapsing into a phase-1-only optimum. The paper explicitly contrasts this with a naïve sequential baseline: optimize the prefix for Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},1, freeze it, then optimize the delta strokes for Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},2. That baseline fails because the phase-1 strokes become semantically rigid. Joint optimization instead keeps the prefix adaptable throughout training, allowing it to migrate toward the shared configuration the paper calls the common structural subspace.

The optimization is therefore sequence-aware in a precise sense: semantic supervision is applied to cumulative subsets of a single evolving stroke sequence, rather than to multiple views of a fixed final image.

4. Overlay Loss, multi-phase generalization, and optimization regime

Semantic guidance alone can produce degenerate completions in which delta strokes simply sit on top of the prefix, obscuring rather than recontextualizing it. To suppress this, the paper introduces Overlay Loss, which operates on separately rendered prefix and delta images after Gaussian blurring. The blurred renders Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},3 and Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},4 are compared via

Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},5

Because overlap is measured after blurring, the penalty does not only discourage exact intersection; it also discourages near-overlap and local crowding. The intended effect is spatial complementarity: delta strokes should add structure rather than occlude or duplicate prefix structure (Cheng et al., 12 Feb 2026).

The framework is also extended to Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},6-phase illusions. If Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},7 are stroke groups and each cumulative sketch Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},8 should depict concept Sprefix={s1,,sk},Sdelta={sk+1,,sN},S_{\text{prefix}} = \{s_1,\ldots,s_k\}, \qquad S_{\text{delta}} = \{s_{k+1},\ldots,s_N\},9 with prompt Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.0, the paper gives

Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.1

In implementation, optimization is performed per prompt pair rather than by training a feed-forward generator. The reported setup uses Adam, 2000 iterations, guidance scale = 100, and

Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.2

The paper reports about 13 minutes runtime for two-phase illusions and about 15 minutes for three-phase illusions on an NVIDIA RTX 4090. Strokes are initialized near the canvas center in a gathered configuration. The default stroke budget is Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.3, with the paper noting that simple concepts may work with Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.4 strokes, while complex ones such as Einstein may require Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.5.

5. Evaluation protocol and empirical performance

The evaluation dataset contains 64 common objects spanning diverse categories. Prompt pairs are sampled from this set, multiple optimization attempts are run, and outputs are filtered and ranked. Automatic evaluation uses the minimum CLIP score across phases, structural concealment, semantic concealment, and coverage. Structural concealment is defined, for a metric Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.6, as

Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.7

so larger values indicate that the prefix contributes essential structure to the full sketch. Semantic concealment is computed as

Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.8

The paper also uses GPT-4o for post-hoc evaluation on phase recognizability, single-object integrity, illusion quality, and sketch quality (Cheng et al., 12 Feb 2026).

A concise comparison of the main text-to-illusion results is as follows:

Method Avg min CLIP Coverage
SketchDreamer 24.803 100%
SketchAgent 24.393 100%
Nano Banana Pro 26.821 34.9%
Ours (GPT-ranking) 29.873 100%
Ours (Metric-ranking) 30.044 100%

The detailed metrics strengthen the same conclusion. In the direct text-to-illusion setting, SketchDreamer has structural concealment CLIP Sfull=S={s1,,sN}.S_{\text{full}} = S = \{s_1,\ldots,s_N\}.9 and semantic concealment 0.887; SketchAgent has structural concealment CLIP R()\mathcal{R}(\cdot)0 and semantic concealment 0.752; Nano Banana Pro has structural concealment CLIP R()\mathcal{R}(\cdot)1 and semantic concealment 0.875. The negative structural concealment values indicate that delta-only strokes can score as well as or better than the full composition, meaning the prefix is not contributing meaningfully. By contrast, Ours (GPT-ranking) reports structural concealment CLIP 1.668, structural concealment IR 0.839, structural concealment HPS 0.023, semantic concealment 0.983, and coverage 100%; Ours (Metric-ranking) improves these to structural concealment CLIP 3.282, structural concealment IR 1.237, structural concealment HPS 0.029, semantic concealment 0.980, and coverage 100%.

The paper also reports an Ours-to-illusion protocol, where baselines are given the authors’ optimized prefix. Under this setting, SketchDreamer improves to Avg min CLIP 28.148, Nano Banana Pro improves to 28.903, and SketchAgent remains at 24.019. The interpretation offered in the paper is that the optimized prefix itself encodes reusable structure.

Human evaluation consists of two user studies with 143 participants total. In the first, top-1 outputs are compared against baselines on five prompt pairs; in the second, participants assess the ranking pipeline over the top-4 outputs on four prompt pairs. Participants preferred the method in 67.7% of cases for GPT-ranked outputs and 87.1% of cases for metric-ranked outputs. The ranking pipeline achieved over 98% satisfaction rate.

6. Interpretation, relation to broader surprise research, and limitations

Stroke of Surprise treats “surprise” as a perceptual-semantic event: later strokes force a reinterpretation of the earlier drawing. This is materially different from the probabilistic and information-theoretic uses of surprise catalogued in the broader literature, including prediction surprise, change-point detection surprise, confidence-corrected surprise, and information gain surprise (Modirshanechi et al., 2022). It is also distinct from recent video models that define surprise as Bayesian information gain over textual hypotheses (Ravi et al., 27 Sep 2025) or as latent prediction error relative to a Taylor-extrapolated trajectory (Kim et al., 21 May 2026). A plausible implication is that Stroke of Surprise belongs to a separate family of temporal-semantic constructs in which surprise is produced by recontextualization rather than by event improbability, KL divergence, or belief reset.

Several common misconceptions are explicitly addressed by the paper. The method is not ordinary morphing, because the prefix must already be a valid object rather than an intermediate interpolation. It is not raster editing, because earlier content cannot be destructively replaced. It is not simply standard text-to-sketch optimization, because later strokes are not merely refinements of the same concept. The framework’s specific contribution is to optimize a shared prefix under two incompatible stage-wise semantic constraints.

The paper also reports concrete limitations. It inherits weaknesses of the diffusion prior; in particular, weak SDS guidance for complex structures such as “scissors” can cause optimization failure. The main text mentions visual failure examples in supplementary material but does not provide a broader failure taxonomy. The need for multiple optimization trials, post-hoc filtering, and ranking further indicates that the method remains stochastic and prompt-sensitive.

Within those limits, Stroke of Surprise establishes a distinct generative task: semantic ambiguity unfolds through stroke order, and early structure must be future-compatible rather than merely locally recognizable. That shift—from static ambiguity to progressive reinterpretation—is the paper’s principal conceptual contribution (Cheng et al., 12 Feb 2026).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Stroke of Surprise.