ConText: Driving In-context Learning for Text Removal and Segmentation
Not on the map. Why?
Abstract (arXiv)
This paper presents the first study on adapting the visual in-context learning (V-ICL) paradigm to optical character recognition tasks, specifically focusing on text removal and segmentation. Most existing V-ICL generalists employ a reasoning-as-reconstruction approach: they turn to using a straightforward image-label compositor as the prompt and query input, and then masking the query label to generate the desired output. This direct prompt confines the model to a challenging single-step reasoning process. To address this, we propose a task-chaining compositor in the form of image-removal-segmentation, providing an enhanced prompt that elicits reasoning with enriched intermediates. Additionally, we introduce context-aware aggregation, integrating the chained prompt pattern into the latent query representation, thereby strengthening the model's in-context reasoning. We also consider the issue of visual heterogeneity, which complicates the selection of homogeneous demonstrations in text recognition. Accordingly, this is effectively addressed through a simple self-prompting strategy, preventing the model's in-context learnability from devolving into specialist-like, context-free inference. Collectively, these insights culminate in our ConText model, which achieves new state-of-the-art across both in- and out-of-domain benchmarks. The code is available at https://github.com/Ferenas/ConText.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 71 of its 97 references that are in the map. First posted on arXiv 4 Jun 2025.
Builds on
71 of 97 references.
References · 71
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2023Segment Anythingcited by 8,234
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,403
- 2016Image-to-Image Translation with Conditional Adversarial Networkscited by 4,527
- 2018Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentationcited by 3,223
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,940
- 2014Conditional Generative Adversarial Netscited by 2,162
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
38 more
- 2019Deep High-Resolution Representation Learning for Visual Recognitioncited by 1,420
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2022Images Speak in Images: A Generalist Painter for In-Context Visual Learningcited by 318
- 2023Set-of-Mark Prompting Unleashes Extraordinary Visual Grounding in GPT-4Vcited by 299
- 2022Visual Prompting via Image Inpaintingcited by 250
- 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 245
- 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 243
- 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 236
- 2023What does CLIP know about a red circle? Visual prompt engineering for VLMscited by 218
- 2023Sequential Modeling Enables Scalable Learning for Large Vision Modelscited by 212
- 2024Chain-of-Thought Reasoning Without Promptingcited by 210
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2023SegGPT: Segmenting Everything In Contextcited by 194
- 2017Total-Text: A Comprehensive Dataset for Scene Text Detection and Recognitioncited by 162
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
- 2023What Makes Good Examples for Visual In-Context Learning?cited by 150
- 2023The Learnability of In-Context Learningcited by 127
- 2023Finding Support Examples for In-Context Learningcited by 104
- 2023In-Context Learning Unlocked for Diffusion Modelscited by 104
- 2022Towards End-to-End Unified Scene Text Detection and Layout Analysiscited by 97
- 2021Complementary Patch for Weakly Supervised Semantic Segmentationcited by 75
- 2023DiffusionSeg: Adapting Diffusion Towards Unsupervised Object Discoverycited by 54
- 2020Rethinking Text Segmentation: A Novel Dataset and A Text-Specific Refinement Approachcited by 45
- 2023Exploring Effective Factors for Improving Visual In-Context Learningcited by 43
- 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
- 2023Explore In-Context Learning for 3D Point Cloud Understandingcited by 40
- 2020WDNet: Watermark-Decomposition Network for Visible Watermark Removalcited by 37
- 2023Which Examples to Annotate for In-Context Learning? Towards Effective and Efficient Selectioncited by 37
- 2024Image Segmentation in Foundation Model Era: A Surveycited by 35
- 2023Instruct Me More! Random Prompting for Visual In-Context Learningcited by 30
- 2024Hi-SAM: Marrying Segment Anything Model for Hierarchical Text Segmentationcited by 30
- 2024Audio-Visual Segmentation via Unlabeled Frame Exploitationcited by 28
- 2018EnsNet: Ensconce Text in the Wildcited by 27
- 2023Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic Segmentationcited by 27
50 most cited of 71 All 71 (JSON)
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Analogist: Out-of-the-box Visual In-Context Learning with Image Diffusion Model
- 2023Towards More Unified In-context Visual Understanding
- 2024Visual In-Context Learning for Large Vision-Language Models
- 2025DianJin-OCR-R1: Enhancing OCR Capabilities via a Reasoning-and-Tool Interleaved Vision-Language Model
- 2026Enhancing Multimodal In-Context Learning via Inductive-Deductive Reasoning
- 2026Visual Information Extraction from Documents via Classification-Guided Large Vision-Language Models
- 2025Advancing Multimodal In-Context Learning in Large Vision-Language Models with Task-aware Demonstrations
- 2024Towards Multimodal In-Context Learning for Vision & Language Models