{"id":"a3e2cf77-0e8d-45e6-9469-3759fec3a158","arxiv_id":"2505.20271","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":2,"one_line_summary":"In-Context Brush performs zero-shot customized subject insertion by amplifying prompt and reference attention and reweighting attention heads in a pre-trained Flux-Fill diffusion transformer.","lead":"A training-free method that inserts a user-specified object into any target image region while following a text prompt, by manipulating attention inside a pre-trained diffusion model. It reports improved identity preservation and prompt alignment over eight existing methods, with no fine-tuning or extra data.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Eq. 5 is not entailed by the paper's own attention decomposition in Eq. 12: adding raw blocks As,pvp and As,cvc double-counts the demo terms, so the effective shift is α1·αp, not α1, and the evaluated operation is under-specified.","rationale":"The reader's weakest assumption was that α1 and α2 are hand-set without defaults and may not transfer. I agree that is a real issue, but the more load-bearing problem is upstream: Eq. 5, the 'core mechanism' announced in Sec. 3.2, is not a consequence of the paper's own decomposition. Using the paper's definitions, As,pvp already contains the factor αp, so adding it to hs cannot be 'amplifying αp' without double-counting; the effective multiplier is 1+α1 only if As,p is the within-demo normalized map, which is not how As,p is defined in Eq. 10. This is an internal inconsistency, not merely a hyperparameter choice. It matters because the central claim is an empirical claim about a specific test-time manipulation; if the manuscript does not specify which manipulation was run, the experiments cannot validate the described method, and the reported gains could be coming from a different operation. The correction is easy to test quantitatively and would settle whether the description matches the evaluation. This concern keeps, rather than changes, the reader's CONDITIONAL verdict: the empirical results may survive a corrected derivation, but the paper must release code and fix Eq. 5 before the central claim is accepted.","tokens_in":17123,"tokens_out":10405,"duration_ms":103313,"concrete_test":"Run the exact protocol of Table 1 with two implementations on a fixed 10-case subset: (A) Eq. 5 literally, using the full-softmax blocks As,p and As,c with α1=α2=0.5; and (B) the mathematically entailed update ĥs = αs·h(query) + (1+α1)·αp·h(demo p) + (1+α2)·αc·h(demo c) using within-demo normalized attention. Compare DINO, CLIP-T, and FID against the paper's reported numbers. If variant A deviates from the reported values by more than 0.01 in DINO or 0.02 in CLIP-T, the deployed operation is not the one written; if variant B matches, the paper must correct Eq. 5 and state the actual normalization (full-softmax vs. within-demo) used in all experiments.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Section 3.2 claims a proof that subject features are injected by shifting hidden states and presents Eq. 5 as amplifying αp and αc from Eq. 3. Under the paper's definitions this does not follow. In Eq. 10 and the supplementary derivation, As,p and As,c are blocks of the full softmax, with row sums αp and αc, while h(demo p)=Attn(xsWq,xpWk,xpWv) is normalized over the demo keys alone. Hence As,pvp = αp·h(demo p) and As,cvc = αc·h(demo c). Substituting into Eq. 5 gives ĥs = hs + α1·αp·h(demo p) + α2·αc·h(demo c), i.e., hs = αs·h(query) + (1+α1)·αp·h(demo p) + (1+α2)·αc·h(demo c). So the update changes the prompt and reference coefficients multiplicatively by (1+α1) and (1+α2), not by the additive amounts α1 and α2, and it double-counts the contributions already present in hs. The effective shift strength is therefore multiplied by the data-dependent values αp and αc, which vary by token, denoising step, prompt length, and image token count, so the hand-set strengths in the Fig. 6 ablation are not transferable even in principle. The paper also gives no default values for α1 and α2; the only numeric coefficient in the supplementary (1.3) is attached to the Diptych comparison, not to Eq. 5. The text's claim that α1=0.5 is already 'excessively large' is hard to reconcile with any straightforward reading of Eq. 5, suggesting that the implemented operation may use a different normalization than the one written. Because no code is released, Table 1 cannot be traced to the described mechanism.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes In-Context Brush, a training-free method for customized subject insertion that concatenates a reference subject image and a text prompt as in-context demonstrations with a target image as query, then manipulates the hidden states of a pretrained MMDiT-based inpainting model at test time. Three mechanisms are introduced: latent feature shifting (Sec. 3.2), head-wise attention reweighting (Sec. 3.3), and token blending (Sec. 3.4). The method is evaluated against eight baselines plus two-stage combinations on DINO, CLIP-I, CLIP-T, and FID, with a user study and ablations, and is claimed to achieve state-of-the-art identity preservation, prompt alignment, and image quality.","tokens_in":17605,"tokens_out":6883,"duration_ms":68852,"significance":"If the mechanism were correctly specified and reproducible, the work would be a useful contribution to training-free subject insertion, a practically relevant problem. The empirical evaluation is substantial: multiple baselines, a user study with 6,825 votes, ablation studies for each proposed module, and robustness checks over ten random seeds. The paper also honestly reports a limitation with similar contextual features in Sec. 6. However, the core derivation in Sec. 3.2 does not establish the proposed operation, the key strength parameters are not given default values, and no code is released, so the reported results cannot currently be traced to the described method. The central claim is plausible but not established as presented.","major_comments":[{"comment":"The operation in Eq. (5) is not entailed by the paper's own decomposition in Eq. (12). With the definitions of As,p, As,c, h(demo p), and h(demo c), one has As,p vp = αp·h(demo p) and As,c vc = αc·h(demo c). Substituting into Eq. (5) gives ĥs = hs + α1·αp·h(demo p) + α2·αc·h(demo c) = αs·h(query) + (1+α1)·αp·h(demo p) + (1+α2)·αc·h(demo c). Thus Eq. (5) double-counts demo terms already present in hs and changes their coefficients multiplicatively, not additively as claimed in the text. Because αp and αc are data-dependent row sums of the full softmax, they vary by token, denoising step, prompt length, and image token count, so the hand-set strengths α1 and α2 in Fig. 6 are not transferable in the way the paper states. The claimed 'proof' of latent feature shifting is therefore a rewriting of the attention equation plus an asserted operation, not a derivation of Eq. (5).","section":"Sec. 3.2, Eq. (5)"},{"comment":"No default values for α1 and α2 are stated anywhere in the paper or supplementary, yet Table 1 reports quantitative results that depend on these values. The only numeric coefficient in the supplementary, 'The attention reweighting coefficient is set to 1.3' (Supp. C), is not tied to Eq. (5) and appears to belong to the Diptych baseline description. Moreover, the main text says that 'excessively large values of α1 and α2 (e.g., 0.5)' degrade quality, while Fig. 6 shows α=0.5 as the middle of the tested range; this is internally inconsistent and suggests the implemented operation may differ from the written Eq. (5). Without a specification of the implemented normalization and the α values used for Table 1, the reported gains cannot be reproduced.","section":"Sec. 3.2 and Sec. 4.5 (hyperparameters)"},{"comment":"The head-wise reweighting mechanism is under-specified and the motivation does not match the equation. The text states that 'we leverage h(demo p) to soft activate h(query)', but Eq. (6) computes the activation V_h from the attention block Ap,s, which is the prompt-to-subject attention map (xp query attending to xs keys). This is a different quantity from h(demo p) in Eq. (12), which is Attn(xsWq, xpWk, xpWv), i.e., subject attending to prompt. The paper provides no justification for why activation of Ap,s should be a reliable proxy for prompt-relevant heads, and Eq. (8) scales the entire per-head query hidden state without any renormalization, so the operation changes output magnitudes in an uncontrolled way. The proxy assumption and the notation need to be aligned and empirically validated.","section":"Sec. 3.3, Eqs. (6)-(8)"},{"comment":"The dataset sizes are arithmetically inconsistent. The text says 30 subject images from DreamBooth plus 50 additional subject images from the Internet, and then states the evaluation dataset contains 100 subject images; 30+50=80, not 100. The scene counts (50 COCO + 80 Internet = 130) are consistent. This should be corrected because it affects the interpretation of the FID and other statistics reported on this dataset.","section":"Sec. 4.1, Dataset description"}],"minor_comments":[{"comment":"There is a typo: 'Concatente' should be 'Concatenate'.","section":"Eq. (2) and Supp. Eq. (10)"},{"comment":"The formatting of the CLIP-T entries for 'Ours w/o head' is broken: '0 .2682±0.331' contains a stray space, and the standard deviation 0.331 is implausibly large compared with 0.0365 for the full method; this likely reflects a transcription error.","section":"Table 1"},{"comment":"The statement that α1=0.5 is 'excessively large' is hard to reconcile with Fig. 6, where α1=0.5 is a displayed setting; please clarify which values are recommended and which were used in the main results.","section":"Sec. 4.5, Fig. 6"},{"comment":"The FID is computed on a small evaluation set (on the order of 100 images), which makes the FID differences in Table 1 difficult to interpret; reporting confidence intervals or additional image-quality metrics would strengthen the claim.","section":"Sec. 4.3, FID"},{"comment":"The sentence 'The attention reweighting coefficient is set to 1.3' is ambiguous: specify whether this coefficient applies to the Diptych baseline or to the proposed method, and if it is part of the proposed method, explain how it relates to α1 and α2.","section":"Supp. C"}],"recommendation":"major_revision","confidential_remarks":"The empirical evaluation is more thorough than typical for a workshop-level submission, and the user study is a genuine strength. However, the core mechanism in Sec. 3.2 is not correctly derived, and the missing default hyperparameters make the reported numbers untraceable. I would recommend a major revision that (a) rewrites Sec. 3.2 so that Eq. (5) is either correctly derived or presented as an empirical manipulation with a clear statement of the implemented normalization, (b) states the exact α1, α2 values used for Table 1, and (c) releases code or at least a detailed pseudocode. The paper's contribution is potentially salvageable, but in its current form the described method and the evaluated method may not be the same. The concurrent-work discussion with Diptych Prompting is fair and should be kept."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Colleague,\n\nThis is a solid training-free method for zero-shot subject insertion on Flux-Fill, and the empirical work is the best part. The combination of intra-head latent feature shifting, head-wise reweighting, and token blending is new relative to prior attention-manipulation methods, and the evaluation is thorough: many baselines, a user study, ablations, and multi-seed stability. The reported DINO/CLIP/FID gains are consistent, and the qualitative figures look convincing. If the numbers are real, this gives practitioners a practical zero-shot recipe.\n\nThe main soft spot is the derivation in Sec 3.2. The paper claims a proof that shifting hidden states injects subject features, but Eq.5 does not follow from Eq.12. As the stress-test note shows, A_{s,p}v_p equals α_p h(demo_p) under their own definitions, so adding α1 A_{s,p}v_p multiplies the existing demo coefficient by (1+α1), not adds α1. The effective shift is therefore data-dependent, scaling with α_p, which varies by token, step, and prompt. This doesn't falsify the empirical claim, but it means the theoretical framing is mis-stated and the hand-set α1/α2 strengths in Fig.6 are not interpretable as described. The hyperparameters also have no stated defaults; the text's claim that 0.5 is 'excessively large' sits oddly with Fig.6 showing values up to 1.5.\n\nRelatedly, no code or data is released, so Table 1 cannot be traced to the described mechanism. The 'proof' language is overclaimed; this is a heuristic decomposition, not a proof. The concurrent 'Insert Anything' baseline is also missing from the comparisons, which should be added.\n\nOverall: this is an incremental but useful contribution, likely to work as advertised. The write-up needs a corrected derivation, a more honest statement about the heuristic nature of the shift, and a commitment to release code/data. The empirical evaluation is the strongest part.\n\nRecommendation: send to peer review, but flag the derivation and reproducibility issues; expect major revision.","headline":"A useful training-free subject insertion recipe with broad empirical support, but the theoretical derivation in Sec 3.2 is mis-specified and the lack of code/data leaves the reported gains unverifiable.","tokens_in":18086,"tokens_out":3484,"would_cite":false,"duration_ms":34506,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"The paper proposes a training-free framework that inserts a user-specified subject into a masked image region by treating the reference photo plus text prompt as in-context demonstrations and shifting attention hidden states in a…","keywords":["customized subject insertion","zero-shot image editing","in-context learning","diffusion transformer","latent feature shifting","attention reweighting","image inpainting","training-free generation"],"falsifier":"Run the method on a held-out set of subject/scene pairs whose content differs from the ablation set, fixing both shift strengths at the ablation-chosen values. If identity (DINO) or text-alignment (CLIP-T) scores fall well below the reported means, or visible artifacts appear on many pairs, the claim that a fixed latent shift generalizes across inputs is falsified. A sharper test is to search for the per-image best strengths: if the maximizing pair varies strongly across images, the training-free claim depends on per-image tuning rather than a fixed mechanism.","tokens_in":1602,"feed_emoji":"🖌️","tokens_out":2241,"duration_ms":79781,"temperature":0.7,"pith_summary":"In-Context Brush reformulates customized subject insertion as an in-context learning problem: the reference subject image and the text prompt act as demonstrations, and the target image with the masked region acts as the query. The paper argues that inside a pretrained multi-modal diffusion transformer, the hidden state of query tokens is already a weighted mixture of prompt, subject, and query attention contributions, so identity transfer can be achieved by amplifying those contributions with two scalar strengths, plus reweighting attention heads for prompt control and blending tokens to preserve background consistency. The claimed payoff is superior identity preservation, text alignment, and image quality compared with eight state-of-the-art baselines, with no training and no extra data collection. If true, this would make customized insertion a test-time operation on an off-the-shelf inpainting model.","feed_headline":"Test-time attention shifts insert any subject into an image","feed_subtitle":"Training-free method preserves identity and follows text prompts by manipulating latent features inside a diffusion transformer.","key_machinery":"The load-bearing object is Eq. (5), the latent feature shift: $h_s \\leftarrow h_s + \\alpha_1 A_{s,p} v_p + \\alpha_2 A_{s,c} v_c$, applied to the attention heads of an MMDiT-based inpainting model. It says that reference-subject and prompt information can be injected into the query hidden state by adding weighted attention-map-by-value products that are already present in the joint self-attention computation. Two auxiliary mechanisms carry the rest of the pipeline: head-wise reweighting, which normalizes prompt-to-query attention activation per head and scales the query hidden state to amplify prompt-relevant heads, and token blending, which replaces background tokens with the noised ground-truth background at each step to prevent distribution drift.","core_discovery":"The central claim is that subject-level in-context transfer can be realized as a shift of attention hidden states at test time. The authors derive that $h_s$, the hidden state belonging to the query region, decomposes into $\\alpha_p h_{\\text{demo}_p} + \\alpha_c h_{\\text{demo}_c} + \\alpha_s h_{\\text{query}}$, and then propose the feature shift injection $h_s \\leftarrow h_s + \\alpha_1 A_{s,p} v_p + \\alpha_2 A_{s,c} v_c$ to push reference identity and prompt semantics into the output. With head-wise reweighting that scales query hidden states by normalized prompt-attention activation, and token blending that re-fuses the unmasked background at every denoising step, the method claims to match or beat training-based and training-free baselines on DINO, CLIP-I, CLIP-T, and FID without updating any weights.","pith_inferences":["Because the shift strengths $\\alpha_1$ and $\\alpha_2$ are hand-set with no stated default, an implicit next step is to predict them from the reference and target images; if the optimal pair varies across inputs, the method would need per-image tuning rather than a single fixed recipe.","The mechanism only amplifies contributions the base model already computes, so it should compose with other attention-level edits such as prompt-to-prompt style changes, as long as those edits also target attention maps.","Token blending is a general anti-drift regularizer for multi-step latent compositing and could improve other methods that concatenate reference and target latents, though the paper only demonstrates it inside this pipeline.","Strongly increasing $\\alpha_2$ is likely to trade editability for identity fidelity: the better the reference appearance is preserved, the harder it becomes to change intrinsic attributes such as material or color."],"forward_implications":["Per-subject fine-tuning and paired training data become unnecessary: a single reference photo and a mask are enough to insert that object into a new scene on an off-the-shelf MMDiT inpainting model.","Prompt-driven editing of the inserted subject is achievable at test time, because head-wise reweighting amplifies attention heads that respond to the prompt tokens; materials, colors, and poses can be changed without retraining.","The same latent-shift operation can be reused for virtual try-on, compositional scene building, and partial part insertion, since all three are mask-specified placements of reference content into a target.","Background consistency is protected by re-injecting the unmasked target each denoising step, which avoids the distribution drift that otherwise causes seams and tone mismatches."],"supporting_citations":[{"why":"Supplies the multi-modal diffusion transformer architecture whose joint attention mechanism the method manipulates.","marker":"[13]"},{"why":"Provides the pretrained Flux inpainting model used as the test-time backbone.","marker":"[3]"},{"why":"Segment Anything isolates the reference subject from its background, producing the clean demonstration input.","marker":"[23]"},{"why":"Grounding DINO detects the reference object before segmentation and is also used in evaluation.","marker":"[27]"},{"why":"Supplies evidence that attention heads exhibit semantic specialization, motivating the head-wise reweighting mechanism.","marker":"[47]"},{"why":"A concurrent training-free attention-based baseline that the method compares against and distinguishes from.","marker":"[36]"}],"fun_headline_variants":["Zero-shot subject insertion via attention shifts","Insert any subject without training using attention shifts","Test-time attention edits put any object into your image","No-tuning subject insertion with dual-level attention control"],"cache_read_input_tokens":20096,"weakest_assumption_plain":"The method assumes that amplifying the prompt- and reference-attention contributions already present in the model's internal states, with two hand-set strengths, improves identity and prompt alignment without introducing artifacts.","fun_headline_variants_meta":{"raw":{"variants":["Zero-shot subject insertion via attention shifts","Insert any subject without training using attention shifts","Test-time attention edits put any object into your image","No-tuning subject insertion with dual-level attention control"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.00027,"raw_usage":{"total_tokens":1636,"prompt_tokens":968,"completion_tokens":668,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":584,"completion_tokens_details":{"reasoning_tokens":611}},"tokens_in":584,"tokens_out":668,"duration_ms":8482,"temperature":1.0,"reasoning_tokens":611,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-07T13:55:54.486777+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the method on a held-out set of subject/scene pairs whose content differs from the ablation set, fixing both shift strengths at the ablation-chosen values. If identity (DINO) or text-alignment (CLIP-T) scores fall well below the reported means, or visible artifacts appear on many pairs, the claim that a fixed latent shift generalizes across inputs is falsified. A sharper test is to search for the per-image best strengths: if the maximizing pair varies strongly across images, the training-free claim depends on per-image tuning rather than a fixed mechanism.","supporting_citations":[{"cited_title":"Scaling rectified flow transformers for high-resolution image synthesis","cited_arxiv_id":null,"evidence_quote":"Supplies the multi-modal diffusion transformer architecture whose joint attention mechanism the method manipulates."},{"cited_title":"Flux, offering state-of-the-art performance image generation","cited_arxiv_id":null,"evidence_quote":"Provides the pretrained Flux inpainting model used as the test-time backbone."},{"cited_title":"Segment anything","cited_arxiv_id":null,"evidence_quote":"Segment Anything isolates the reference subject from its background, producing the clean demonstration input."},{"cited_title":"Grounding dino: Marrying dino with grounded pre-training for open-set object detection","cited_arxiv_id":null,"evidence_quote":"Grounding DINO detects the reference object before segmentation and is also used in evaluation."}],"review_version":1}