Papers
Topics
Authors
Recent
Search
2000 character limit reached

CLAST: Dual Approaches in Art Transfer & Test Refinement

Updated 14 July 2026
  • The paper on artistic style transfer introduces a text-driven framework using CLIP and an adaLN-based Mamba state space module, achieving 0.03 s inference, 20× speedup, and 59% fewer parameters than baseline methods.
  • The paper on unit test refinement presents a CLAST method that decomposes and clarifies tests, preserving 0% change in compilation, pass, coverage, and mutation scores while boosting LLM-based test generation metrics up to 45.99%.
  • Both applications underscore the importance of domain context to disambiguate CLAST from similar terms like CLASS, CLASH, and geological clast, addressing interdisciplinary challenges.

CLAST is an overloaded term in recent arXiv literature. In one usage, it denotes Contrastive Learning for Artistic Style Transfer, a text-driven image style transfer framework that leverages CLIP and an adaLN-based Mamba state space module to render stylized images from a content image and a style prompt (Liu et al., 2024). In another, it denotes CLArifying Semantics of unit Tests, a refinement technique that restructures existing unit tests into clearer in-context examples for LLM-based test generation while preserving test effectiveness (Yang et al., 2 Oct 2025). A recurring source of confusion is that CLAST is orthographically close to the unrelated astronomy and lensing acronyms CLASS and CLASH, and to the geological noun clast, which refers to a rock or mineral fragment in breccias and regolith (Harrington et al., 2016, Umetsu et al., 2015, Chen et al., 2023).

1. Nomenclature and scope

In the supplied literature, CLAST has two distinct acronym expansions and no shared technical lineage. This suggests that the term is polysemous across current arXiv usage.

Usage in literature Expansion Stated goal
Artistic style transfer Contrastive Learning for Artistic Style Transfer text-driven image style transfer
Software testing CLArifying Semantics of unit Tests unit test refinement for in-context learning–based unit test generation

The computer-vision CLAST is formulated around artist-aware, arbitrary style transfer controlled by natural language. The software-testing CLAST is formulated around semantic clarity of unit tests used as in-context examples. The overlap is therefore nominal rather than methodological: one problem concerns image synthesis from text-conditioned style representations, whereas the other concerns program-analysis-constrained rewriting of tests for downstream LLM prompting (Liu et al., 2024, Yang et al., 2 Oct 2025).

2. CLAST in artistic style transfer

“CLAST” in computer vision stands for Contrastive Learning for Artistic Style Transfer. Its stated task is to take a content image IcI_c and a text prompt tst_s describing a style—such as an artist name, an art movement, or a descriptive phrase—and generate a stylized image IcsI_{cs} that preserves semantic content while matching the artistic style described by the text prompt (Liu et al., 2024).

The method is explicitly positioned against classical neural style transfer. Classical methods require a style reference image IsI_s at test time, infer style statistics from one image per transfer, and remain image-driven in the sense that style control is mediated by the reference exemplar. CLAST is instead text-driven: style is specified only by text; it is learned from collections of artworks such as WikiArt; and at test time it requires no style image and no per-style or per-image optimization (Liu et al., 2024).

The framework uses MS-COCO content images and WikiArt style images during training. It treats artist names tst_s and paintings IsI_s as aligned descriptors in CLIP’s shared image–text space. For an artist jj, the text feature is ET(tsj)R512E_T(t_s^j)\in\mathbb{R}^{512}, and each painting IsiI_s^i is mapped to EI(Isi)R512E_I(I_s^i)\in\mathbb{R}^{512}. The paper computes artist–painting correlation through cosine similarity and softmax, and reports that the diagonal of the resulting matrix has the largest scores, motivating the use of artist text and paintings as interchangeable style descriptors (Liu et al., 2024).

A central implication is that CLAST reframes style control as an embedding-alignment problem rather than a reference-image-matching problem. The model is trained so that the appearance of the output image aligns both with the CLIP embedding of the style text and with image embeddings of real paintings by the target artist. This yields a single model that can handle all artists and new text prompts without online fine-tuning (Liu et al., 2024).

3. Architecture, optimization, and empirical behavior of the artistic CLAST

The artistic CLAST comprises four main components: a VGG‑19 image encoder for content features, CLIP text and image encoders for style representations, a Style Fusion module implemented as an adaLN-based State Space Model (adaLN‑SSM) built on Mamba, and a symmetric image decoder (Liu et al., 2024).

At training time, the VGG encoder extracts content features tst_s0 from tst_s1. Style is encoded either as text, tst_s2, or as an image, tst_s3. These CLIP features are mapped by an MLP into style-dependent parameters tst_s4, which modulate the Mamba state space block through adaptive LayerNorm. The paper gives the fusion rule as

tst_s5

This design is presented as a substitute for transformer-style attention, with the stated advantages of linear-time processing, lower parameter count, and flexible conditioning on arbitrary CLIP style vectors (Liu et al., 2024).

Optimization combines five losses: directional CLIP loss, Supervised Contrastive loss, VGG-based style loss, content loss, and LPIPS. The directional CLIP term aligns the change in image embedding with the change induced by the style text,

tst_s6

where tst_s7 and tst_s8, with tst_s9 defined as “Photo.” The supervised contrastive objective clusters stylized outputs and real paintings that share the same artist label while separating different artists. The total loss is

IcsI_{cs}0

with IcsI_{cs}1, IcsI_{cs}2, IcsI_{cs}3, IcsI_{cs}4, and IcsI_{cs}5 (Liu et al., 2024).

The reported implementation uses Adam with learning rate IcsI_{cs}6, batch size IcsI_{cs}7, and IcsI_{cs}8 iterations, requiring approximately IcsI_{cs}9 hours on a single V100. Inference is a single forward pass and is reported to take 0.03 s for a IsI_s0 image. The paper further states that Mamba+adaLN is approximately 1.8× faster training, 20× faster inference, and 59% fewer parameters than an Attention+AdaIN baseline while matching or exceeding stylization quality (Liu et al., 2024).

Quantitatively, the paper reports for CLAST a CLIP style score of 0.402, CLIP content score of 0.667, SSIM of 0.491, deception rate of 0.747, and the fastest inference time at 0.03 s. A user study ranks CLAST highest in Mean Opinion Score, and an external aesthetic score model ranks it highest at 5.667, compared with 5.436 for the second-best method. The paper also records limitations: rare artists with very few paintings produce weak style clusters; complex content images can lose fine details; and the model can be insensitive to detailed textual nuances, as in prompts where “old” is interpreted as “old photo style” rather than aging the depicted subject (Liu et al., 2024).

4. CLAST in unit test refinement

In software testing, CLAST stands for CLArifying Semantics of unit Tests. It is a test-refinement technique designed to make unit tests better in-context examples for LLMs that generate tests, especially in ICL-based pipelines such as RAGGen, TELPA, and HITS (Yang et al., 2 Oct 2025).

The paper defines semantic clarity along two axes. Logical clarity requires a test to focus on a single, well-defined scenario rather than mixing multiple unrelated behaviors and assertions. Textual clarity requires names and comments to clearly express what the test does and why, including descriptive identifiers and useful comments, often in Arrange–Act–Assert form (Yang et al., 2 Oct 2025).

This framing is motivated by two failure modes in prior work, especially UTgen. First, when a test mixes several scenarios, a single LLM pass can misinterpret what the test actually checks. Second, directly trusting the LLM’s rewritten code can introduce hallucinated APIs, compilation failures, and semantic drift. CLAST addresses these issues by separating structural simplification from textual enhancement and by placing the latter under explicit program-analysis control so that the original test effectiveness is fully preserved (Yang et al., 2 Oct 2025).

Conceptually, CLAST has two stages. The first is Test Purification, which structurally decomposes complex tests into clearer units. The second is Textual Clarity Enhancement, which uses an LLM to generate comments and better identifiers, but applies only comments and renamings back to the original test AST. The LLM’s rewritten code is never accepted as-is (Yang et al., 2 Oct 2025).

5. Refinement pipeline, preservation guarantees, and downstream effects

The purification stage begins with statement atomization, in which compound statements are decomposed into atomized statements IsI_s1, with explicit read/write sets and a control-structure flag. Control structures are treated as indivisible to avoid broken syntax. The second step is test atomization: for each assertion IsI_s2, CLAST forms a temporary test IsI_s3, builds a variable dependency graph IsI_s4, traverses dependencies backward from variables used in IsI_s5, and removes prefix statements whose write sets do not intersect the dependency set. The third step is test merging, which recombines tests that share identical prefixes into small scenario clusters when appropriate (Yang et al., 2 Oct 2025).

The textual-enhancement stage is LLM-assisted but analysis-constrained. For comments, CLAST parses the LLM output into an AST, extracts block comments and inline comments, and maps inline comments back onto the original test by matching the right sibling node in the generated AST to a node in the original AST using

IsI_s6

If the distance is at least 0.7, the inline comment is inserted before the matched node. For identifier enhancement, CLAST extracts mappings from old identifiers to new identifiers, rebuilds declaration-use relations on the original AST, and applies renamings in reverse source order so that only names change and logic remains untouched (Yang et al., 2 Oct 2025).

This design yields the paper’s principal preservation result. On 500 developer-written tests and 500 EvoSuite-generated tests from 4 Defects4J projects, CLAST reports IsI_s7, IsI_s8, IsI_s9, and tst_s0: compilation success rate, pass rate, line coverage, and mutation score are all fully preserved relative to the original tests. By contrast, UTgen reduces CSR, PR, Cov, and MS by an average of 12.90%, 35.82%, 4.65%, and 5.07%, respectively (Yang et al., 2 Oct 2025).

The semantic-clarity evaluation is based on a user study with 15 participants, including 10 industry developers and 5 from academia, with an average of 6.8 years of development experience. Across 10 focal methods, CLAST receives 90.00% of first-place votes for conciseness, 85.33% for descriptiveness, and 90.67% for comment quality. In a follow-up assessment of practical use, 90.67% of first-place votes favor willingness to incorporate CLAST-refined tests (Yang et al., 2 Oct 2025).

The downstream effect on LLM-based generation is the article’s second major result. When CLAST-refined tests are used as examples for RAGGen and TELPA, the paper reports an average improvement of 10.07% / 13.88% / 20.71% over using original examples and 25.97% / 28.22% / 45.99% over using UTgen-refined examples, in terms of CSR / PR / Cov for generated tests. The paper also reports an average processing time of 55.13 seconds per test, of which approximately 0.003s is purification and approximately 55.13s is LLM inference, making the method suitable for offline refinement rather than hard real-time use (Yang et al., 2 Oct 2025).

One persistent misconception is to conflate CLAST with CLASH. In the supplied literature, CLASH denotes Cluster Lensing And Supernova survey with Hubble, a 524‑orbit HST Multi-Cycle Treasury program targeting massive galaxy clusters with 16-band imaging. CLASH papers analyze cluster mass distributions, concentrations, strong and weak lensing, and surrounding large-scale structure; they are unrelated to either artistic style transfer or unit test refinement (Umetsu et al., 2015). A representative example is the analysis of MACS J0717.5+3745, described as a Complete Lensing Analysis within the CLASH program (Medezinski et al., 2013).

A second near-homograph is CLASS, the Cosmology Large Angular Scale Surveyor, a four telescope array designed to characterize relic primordial gravitational waves from inflation and the optical depth to reionization through measurements of polarized CMB on the largest angular scales (Harrington et al., 2016). Although CLASS differs from CLAST by only one letter, it belongs to experimental cosmology and has no connection to either of the CLAST methods.

A third confusable form is the lowercase noun clast. In planetary and lunar petrology, a clast is a discrete fragment of rock or mineral broken from an original host and incorporated into another rock, especially in breccias and regolith (Chen et al., 2023). On Ryugu, bright clasts are identified as fragments embedded within polymict breccias, and in lunar studies zircon-bearing clasts in fragmental polymict breccia 72275, clast-rich breccia 14321, and lunar soil 14163 are used to reconstruct early crustal differentiation histories (Sugimoto et al., 2021, Chen et al., 2023).

Taken together, the literature supports a narrow but important editorial conclusion. CLAST is not a single research program or stable cross-domain acronym. It currently names two unrelated methods—one in artistic style transfer and one in software testing—while also sitting adjacent to the unrelated acronyms CLASH and CLASS and to the geological term clast. Accurate interpretation therefore depends on domain context rather than the string alone.

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