Source-linked AI summary
CrossPair: Unlocking Generalist Visual Transformation Learning in Image Editors
Yibo Zhao, Lifan Jiang, Senlin cheng, Tianrun Wu, Bolei Xu, Xiaobo Li, Can Ye, Xiaofei He, Dehai Zhao, Boxi Wu
TL;DR
A before–after example can specify a transformation, but its transferable change must be separated from the reference scene. CROSSPAIR adapts a pretrained multimodal editor with semantic and visual exemplar routes and training-only relation alignment. It improves target agreement and edit-direction transfer on seen and held-out tasks.
Problem
A before–after pair can reveal a transformation and what should remain unchanged, but the rule must transfer from one demonstration to a different scene.
Source: §1 · p. 1Method
CROSSPAIR adapts a pretrained editor with role-ordered VLM and VAE exemplar conditioning plus training-only, change-aware DINOv3 relation alignment.
Source: §1 · p. 2Results
CROSSPAIR improves target agreement and edit-direction transfer on seen and held-out tasks, and TRANSFORM-360K training improves aggregate held-out-operation scores.
Source: §1 · p. 2, §4.2 · p. 6Takeaways & Limitations
The method and corpus support a shared demonstration-based interface for diverse visual transformations.
Source: §5 · p. 7Exemplar-guided editing can transfer harmful changes, and synthetic or web-derived examples may carry visual biases.
Source: §5 · p. 7
Abstract
from arXiv · showhide
Language models switch tasks from demonstrations, but vision still often relies on separate systems for restoration, editing, and stylization. A before--after example offers a shared instruction only if the transferable change can be separated from the scene that demonstrates it. We introduce CrossPair, which adapts a pretrained multimodal image editor to transfer diverse transformations from one exemplar pair. Exemplar-before, exemplar-after, and query images take fixed roles in its native VLM and VAE pathways: the VLM extracts operation semantics, while the VAE retains fine appearance and structure. A training-only, change-aware DINOv3 objective aligns feature-change directions across content-distinct scenes, guiding the output to follow the demonstrated relation without an inference-time encoder. We construct Transform-360K by grouping filtered pairs from conditional representations, restoration, editing, virtual try-on, and stylization under shared transformations. On Relation252K-derived seen and held-out transformations, \method improves target agreement and edit-direction similarity over released systems. Ablations show that the semantic and visual exemplar routes are complementary and that DINO relation alignment further strengthens transfer; Transform-360K training also improves aggregate held-out-operation scores.
1 Introduction
CROSSPAIR addresses how to transfer a demonstrated change to a different scene while preserving the query’s identity. It combines role-ordered semantic and visual conditioning with training-only relation alignment, and improves target agreement and edit-direction transfer on seen and held-out tasks.
- A before–after pair reveals both the transformation and invariant content, but the transferable rule must be inferred from one demonstration and applied to another scene.Source: §1 · p. 1
- The reference-before, reference-after, and query images take fixed roles in native VLM and VAE pathways that combine operation semantics with fine visual detail.The VLM interprets the operation, while the VAE retains colors, textures, shapes, and local structures.Source: §1 · pp. 1–2
- A training-only, change-aware DINOv3 objective aligns relation directions across scenes without requiring an inference-time encoder.It localizes informative changes independently in each scene before aligning their feature-change directions.Source: §1 · pp. 1–2
- TRANSFORM-360K contains 91,010 four-image records spanning more than 8,000 relations.Source: §1 · p. 2
- CROSSPAIR improves target agreement and edit-direction transfer on seen and held-out tasks.Source: §1 · p. 2
2 Related Work
Prior editing approaches use language or auxiliary maps, transfer appearance or object content from references, or demonstrate changes through visual examples. CROSSPAIR’s distinction is its fixed triplet interface in native editor pathways, paired with change-weighted relation regularization.
2.1 Diffusion-Based Image Editing
- Text-guided editing and spatial controls specify tasks through language or auxiliary maps, while reference-conditioned methods transfer appearance or object content.Source: §2.1 · p. 2
2.2 Visual In-Context Editing
- One-pair transfer is established; CROSSPAIR distinguishes itself with fixed triplet conditioning in native pathways and change-weighted relation regularization without an inference-time auxiliary encoder.Source: §2.2 · p. 2, §2.1 · p. 2
3 Method
CROSSPAIR adapts a pretrained rectified-flow editor with role-ordered exemplar conditioning and training-only relation alignment. Its method also constructs Transform-360K through operation-specific validation and cross-content pairing.
3.1 Rectified Flow
- Rectified flow predicts target-latent velocity from a noisy latent, timestep, and condition, yielding a differentiable one-step estimate of the clean latent.Source: §3.1 · pp. 2–3
3.2 One-Pair Inference, Cross-Pair Supervision
- At inference, one reference pair and a query image guide prediction, while training uses an aligned query target as cross-pair supervision.The paper distinguishes one-pair prompting from single-pair supervision, which uses the reference pair alone.Source: §3.2 · p. 3
3.3 Role-Ordered Exemplar Conditioning
- The ordered reference-before, reference-after, and query triplet enters both VLM and VAE pathways, combining operation semantics with fine-grained appearance evidence.The VLM abstracts the operation; VAE tokens retain color, texture, and local structure.Source: §3.3 · p. 3, §3.2 · p. 3
3.4 Change-Aware DINO Relation Alignment
- Change-aware DINOv3 alignment independently localizes informative changes, aggregates within-scene feature displacements, then aligns relation directions across scenes without patch correspondence or direct target-feature matching.Query-target-derived localization weights are detached, and the frozen DINOv3 branch is used during training only.Source: §3.4 · pp. 3–4
3.5 TRANSFORM-360K
- Transform-360K normalizes examples by their finest verifiable operation and direction, then validates visible edits, content consistency, and source-specific requirements.Validation also screens readability, resolution, duplicates, and changes that are trivial or unbounded.Source: §3.5 · p. 4
- 67,271 of 72,273 captioned-source records and 7,552 of 12,450 MegaStyle candidates survive their respective construction audits.Source: §3.5 · p. 4
- 91,010 four-image training records pair distinct content within operation keys across more than 8,000 fine-grained relations, with relation frequency and source families balanced.The manifest combines an exemplar pair with an aligned query pair.Source: §3.5 · p. 5
4 Experiments
CrossPair is evaluated on seen and held-out transformation groups against released systems, with a separate OOD study of broader training data. Results compare target agreement, edit-direction transfer, and query-content retention, while matched ablations examine the conditioning routes and relation objective.
4.1 Evaluation Setup
- The protocol tests 219 seen transformation groups and 450 OOD queries, where unseen means held-out transformation groups rather than new images from seen groups.The comparison uses released systems with their native inference procedures, making it a complete-system comparison rather than a mechanism-matched backbone study.Source: §4.1 · p. 5
4.2 Results
- CrossPair has the highest in-domain target agreement and edit-direction similarity, while LoRWeB leads on source similarity and content-preservation preference.The TRANSFORM-360K checkpoint improves aggregate OOD target and directional scores; GPT-5.5 rankings favor CrossPair on transformation faithfulness.Source: §4.2 · pp. 6–7, Table 2 · p. 6
4.3 Ablation Study
- VAE-only conditioning has the highest source similarity, VLM-only scores better on target and direction, and combining routes raises target agreement beyond either alone.With both routes fixed, DINO relation supervision gives the strongest directional score and lowest target LPIPS in Table 3.Source: §4.3 · p. 7, Table 3 · p. 7
5 Conclusion
CrossPair combines role-ordered VLM/VAE conditioning with training-only DINOv3 relation alignment, and Transform-360K broadens the held-out operations addressed by the same interface. The paper also flags harmful transfers and visual bias as deployment concerns.
5 Conclusion
- CrossPair and Transform-360K support a shared demonstration-based interface for diverse visual transformations.The method uses training-only DINOv3 relation alignment and role-ordered VLM/VAE conditioning; the corpus checkpoint broadens the range of held-out operations addressed.Source: §5 · p. 7
- Exemplar-guided editing can transfer harmful changes, and synthetic or web-derived examples may carry visual biases.The paper recommends evaluating both transformation transfer and retained query content alongside deployment.Source: §5 · p. 7
A Evaluation Scope
The evaluation compares released systems as full pipelines and uses matched ablations to examine CrossPair’s components. Its aggregate metrics characterize the sampled benchmark, with task-specific annotations needed for operation-level accuracy and pixel preservation.
A Evaluation Scope
- CrossPair’s Relation252K-derived model is the core method comparison, while the Transform-360K checkpoint assesses the combined effect of a larger, differently composed training corpus.Released systems are compared as complete pipelines; matched ablations examine CrossPair’s components.Source: A Evaluation Scope · p. 10
- CLIP and LPIPS are query-level micro averages across task families, while GPT-5.5 provides one ranking per query.Source similarity and content ranking complement target agreement in Table 2.Source: A Evaluation Scope · p. 10
- The aggregate measures characterize the sampled benchmark; operation-specific accuracy and pixel-level preservation require task-specific annotations.Source: A Evaluation Scope · p. 10
B.1 Training-unit schema
The training unit pairs a demonstration with a content-disjoint query under a shared transformation. The frozen manifest combines source-specific pair construction and filtering, then groups records so each uses one non-self demonstration.
B.1 Training-unit schema
- Each record contains a demonstration pair, a query pair, and an instruction; the pairs share a construction group but are content-disjoint, and each query uses one non-self demonstration.Relation252K prompts can include a role instruction and a concrete edit description.Source: §B.1 · p. 10
B.2 Frozen manifest statistics
- The frozen manifest contains 91,010 records with four image slots each, or 364,040 record-level slots rather than unique files.The scan finds 248,910 unique path strings and 15,428 prompt strings; its serialized labels are not the paper-level count of over 8K fine-grained relations.Source: §B.2 · p. 10
B.3 Source-specific pair construction
- Source construction includes style-transfer pairs, conditional and segmentation representations, try-on records grouped by garment, spatial transformations, low-level vision groups, and imported Relation252K pairs.The style streams include MegaStyle, OmniStyle, Civitai-derived, and other records; the try-on manifest has 13,527 records over 3,936 garment labels.Source: §B.3 · pp. 10–11
B.4 Quality control
- MegaStyle’s semantic audit retained 7,552 of 12,450 pairs, while the captioned-record preflight retained 67,271 of 72,273 after decoding or geometry failures were removed.The checks also remove small segmentation masks and entries on a manually curated style bad-list.Source: §B.4 · p. 11
B.5 Grouping and record formation
- The assembler groups pairs by operation key and selects a non-self peer as demonstration; the frozen manifest uses K = 1 and yields 364,040 image slots from 91,010 records.Source-specific builders enforce distinct-content or scene constraints; low-level records also exclude references with the same internal group ID.Source: §B.5 · p. 11
B.6 Evaluation sets
The evaluation sets combine reserved seen-task examples with released and additional out-of-distribution cases. Training uses a frozen image editor with generator-only LoRA updates, a fixed preprocessing path, and role-ordered image prompts.
B.6 Evaluation sets
- The seen-task builder reserves the last five eligible images per task, while the OOD protocol combines 300 released unseen cases with 150 additional cases from diverse transformation families.Tasks with at most 19 images are excluded, and held-out queries are excluded from their corresponding training groups.Source: §B.6 · p. 11
C.1 Architecture and trainable parameters
- CrossPair starts from Qwen-Image-Edit-2511 and optimizes only rank-128 LoRA adapters on the image generator, with the VLM, VAE, base generator, and DINOv3 frozen.Source: §C.1 · p. 12
C.2 Optimization configuration
- Training draws a scheduler index uniformly, adds Gaussian noise with scale 1, and uses scheduler-weighted MSE against the native flow-matching target.The checked configuration uses cfg_scale=1 and ConstantLR without warmup or decay; the K-bucket sampler gives each rank one record per step when K = 1.Source: §C.2 · p. 12
C.3 Resolution and image preprocessing
- The frozen training path preserves aspect ratio, rounds dimensions down to multiples of 16, and uses bilinear longest-side resizing without random crop, flip, or color jitter.The VLM references, VAE references, and DINO inputs use separate resolution targets.Source: §C.3 · p. 12
C.4 Role prompt and VLM serialization
- For K = 1, the VLM serializes the demonstration before, demonstration after, and query source in that order, followed by the record-specific prompt.The VAE-only ablation uses a fallback prompt and supplies only the query source to its VLM branch.Source: §C.4 · p. 12
C.5 DINOv3 implementation details
The implementation freezes DINOv3 and uses its patch features in the training relation objective. At inference, the exemplar triplet follows the trained VLM and VAE routes without DINOv3; baseline comparisons retain native generation interfaces and common metric preprocessing.
C.5 DINOv3 implementation details
- The frozen DINOv3 ViT-7B/16 encoder retains 196 patch tokens, and the implementation uses detached, nonnegative change scores without cross-scene patch correspondence.In source_gt mode, the query map localizes the edit but does not replace the differentiable source-to-prediction direction.Source: §C.5 · p. 12
D Inference Details
- At inference, the exemplar-before, exemplar-after, and query images pass through both native pathways, while DINOv3, the target image, and auxiliary loss code are removed.The VLM serialization places three image placeholders before the record-specific prompt.Source: D Inference Details · pp. 12–13
E.1 Baseline provenance and inference protocol
- The corpus-controlled comparison uses Relation252K-trained CrossPair and RelationAdapter checkpoints; the base editor has no CrossPair LoRA weights, and LoRWeB includes additional training data.Methods retain their public generation interfaces, while metric inputs share a 512-pixel maximum long edge after output extraction.Source: §E.1 · p. 13
E.2 Deterministic image metrics
The section specifies deterministic image-similarity metrics and a blinded GPT-5.5 ranking protocol, including how scores are aggregated and rankings are reported.
E.2 Deterministic image metrics
- CLIP-IGT measures cosine similarity between generated and target image features, while CLIP-Isrc compares the generation with the query source.The evaluation uses a specified Hugging Face CLIP checkpoint and L2-normalizes image features.Source: §E.2 · p. 13
- LPIPS uses an AlexNet backbone; generated images are resized to target dimensions with Lanczos interpolation before evaluation.The evaluation command defaults to a 512-pixel maximum long edge, a value explicitly set in the reported launchers.Source: §E.2 · p. 14
- The main table uses a query-level micro average, giving each valid query one value, rather than a transformation-level macro average.No confidence interval or significance claim is made for deterministic metrics.Source: §E.2 · p. 14
E.3 Blinded GPT-5.5 ranking
- GPT-5.5 ranks anonymized candidate outputs against the reference pair and query source, without receiving target images or method names.Candidate order is shuffled once per query; each query receives one request with four in-domain or five OOD candidates.Source: §E.3 · p. 14
- Every accepted ranking must include each anonymized candidate exactly once without ties, and the completed intersections contain 1,091 in-domain and 428 OOD queries, each judged once.Images are standardized before transmission, and failed calls are retried up to three times.Source: §E.3 · p. 14
- The evaluator reports Rank 1–K percentages and mean rank for each criterion, with query-level bootstrap confidence intervals for Rank-1.It also exports Rank-1 frequency by display position to audit residual position bias.Source: §E.3 · p. 14
F DINO Relation Diagnostics and Ablations
Training logs record relation-loss and similarity diagnostics, change-weight statistics, pooled-vector norms, and auxiliary-to-primary gradient comparisons.
F DINO Relation Diagnostics and Ablations
- Training logs track relation-loss activity and feature similarities alongside change-weight and gradient diagnostics; these are diagnostics, not image-quality metrics.The logged values include prediction–demonstration, target–demonstration, and prediction–target cosine similarities, plus the weighted auxiliary-to-primary output-gradient norm ratio and cosine.Source: F DINO Relation Diagnostics and… · p. 14
Related papers
This paper cites
- Learning Transferable Visual Models From Natural Language Supervision2021
- The Unreasonable Effectiveness of Deep Features as a Perceptual Metric2018
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow2022
- Adding Conditional Control to Text-to-Image Diffusion Models2023
- InstructPix2Pix: Learning to Follow Image Editing Instructions2022
- Prompt-to-Prompt Image Editing with Cross Attention Control2022