TransPhy: Visual In-Context Learning for Physically Grounded Image Editing

Siyi Xie, Xuanke Shi, Jinsheng Quan, Haoran Tang, Zukai Chen +2 more
8/25/2026
cs.CVcs.AI

No confident code implementation found for this paper.

Abstract

Visual demonstrations provide a natural interface for specifying image transformations that are difficult to describe exhaustively with text. However, existing visual in-context learning (VICL) methods primarily focus on appearance-level relation transfer and provide limited support for physically grounded transformations, whose outcomes depend on material properties, geometry, object interactions, and environmental conditions. Given a source--target exemplar pair and a query image, physically grounded VICL requires a model to infer the demonstrated transformation, adapt its effects to the query-specific scene context, and preserve rule-irrelevant content. We introduce PhysVICL-74, comprising 74 physically grounded transformation rules and 5,240 source--target image pairs that form nearly 75K training and evaluation contexts. Its benchmark split separately evaluates novel-instance transfer and unseen-rule generalization. We further propose TransPhy, a framework that decomposes physically grounded VICL into physical-rule induction and transition-aligned rendering. TransPhy first predicts the demonstrated rule and an explicit query-specific target-state description, and then synthesizes the target image through token-wise mixture-of-experts adaptation, with expert routing guided by localized transition cues. Experiments show that TransPhy improves physical-rule adherence, query consistency, and unseen-rule generalization over existing visual in-context editing methods.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xie2026transphy,
  title  = {TransPhy: Visual In-Context Learning for Physically Grounded Image Editing},
  author = {Siyi Xie and Xuanke Shi and Jinsheng Quan and Haoran Tang and Zukai Chen and Lei Yang and Quan Wang},
  year   = {2026},
  eprint = {2608.24119},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.24119v1}
}

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/2608.24119.svg)](https://codeofpaper.com/paper/2608.24119)

Discussion