Pattern Analogies: Learning to Perform Programmatic Image Edits by Analogy

Aditya Ganeshan, Thibault Groueix, Paul Guerrero, R. Měch, Matthew Fisher +1 more
2/9/2026

No official code found. Best implementation: adobe-research/pattern-analogies (2 stars, last commit 2024-12-16).

Abstract

Pattern images are everywhere in the digital and physical worlds, and tools to edit them are valuable. But editing pattern images is tricky: desired edits are often programmatic: structure-aware edits that alter the underlying program which generates the pattern. One could attempt to infer this underlying program, but current methods for doing so struggle with complex images and produce unorganized programs that make editing tedious. In this work, we introduce a novel approach to perform programmatic edits on pattern images. By using a pattern analogy—a pair of simple patterns to demonstrate the intended edit—and a learning-based generative model to execute these edits, our method allows users to intuitively edit patterns. To enable this paradigm, we introduce SplitWeave, a domain-specific language that, combined with a framework for sampling synthetic pattern analogies, enables the creation of a large, high-quality synthetic training dataset. We also present TriFuser, a Latent Diffusion Model (LDM) designed to overcome critical issues that arise when naively deploying LDMs to this task. Extensive experiments on real-world, artist-sourced patterns reveals that our method faithfully performs the demonstrated edit while also generalizing to related pattern styles beyond its training distribution.

View on arXivView PDF

Code Implementations(1)

Code for Pattern Analogies: Learning to Perform Programmatic Image Edits by Analogy

22PythonDec 16, 20241 years agoNOASSERTION

Similar Papers

Cite this paper

@article{ganeshan2026pattern,
  title  = {Pattern Analogies: Learning to Perform Programmatic Image Edits by Analogy},
  author = {Aditya Ganeshan and Thibault Groueix and Paul Guerrero and R. Měch and Matthew Fisher and Daniel Ritchie},
  year   = {2026},
  eprint = {2412.12463},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2412.12463},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.12463.svg)](https://codeofpaper.com/paper/2412.12463)

Discussion