Technical Analysis and Practice of Visual Large Models with Chain-of-Thought Reasoning

    With the rapid advancement of multimodal technologies, Visual Large Language Models (VLMs) are evolving from shallow perception to deep reasoning. Following the breakthroughs of Large Language Models (LLMs) in logical reasoning via Chain-of-Thought (CoT) and Reinforcement Learning (RL), these paradigms are now being applied to VLMs. This article provides a comprehensive technical analysis of reasoning-capable VLMs, covering architecture design, data construction, training paradigms, and RL optimization.

    I. Evolution and Core Challenges of VLMs

    1.1 VLM Capabilities: Perception, Understanding, and Reasoning
    Early vision-language models primarily addressed perception tasks like image classification and object detection. As model scales expanded, VLMs gained the ability to translate between images and text. However, addressing complex visual question answering, chart analysis, or physical phenomenon inference requires more than perception and shallow understanding. Advanced VLMs must possess reasoning capabilities—the ability to conduct logical deduction based on visual evidence to reach implicit conclusions.

    1.2 Transferring LLM Reasoning: CoT and RL
    In the pure text domain, Chain-of-Thought (CoT) enables models to “think step-by-step,” while Reinforcement Learning (RL) further aligns with human intent to improve reasoning accuracy and stability. Introducing these techniques into VLMs means the model must not only “see” the image content but also construct intermediate reasoning steps in the language space to output rigorous answers.

    1.3 Current Technical Bottlenecks
    When handling complex reasoning, current VLMs often suffer from hallucinations, logical discontinuities, or spatial relation confusion. The root causes include insufficient alignment between visual and linguistic features, a lack of high-quality visual reasoning training data, and the inability of traditional Supervised Fine-Tuning (SFT) to cultivate the model’s autonomous exploration and error-correction capabilities.

    II. Model Architecture Design

    2.1 Basic Architecture: ViT-MLP-LLM
    Current mainstream reasoning VLMs typically adopt a three-stage architecture: Vision Encoder - Projection Layer - Language Model.

    • ViT (Vision Transformer): Responsible for patching input images and encoding them into a sequence of visual tokens, extracting rich low-level and high-level visual features.
    • MLP (Multi-Layer Perceptron): Acts as an adapter, mapping the visual features output by ViT to the same dimensional space as the LLM’s word embeddings to achieve modality alignment.
    • LLM (Large Language Model): Serves as the cognitive hub, receiving concatenated visual and text tokens to perform cross-modal information fusion, logical reasoning, and text generation.

    2.2 Technical Detail Optimization
    In architectural details, high-resolution image processing is critical. A dynamic resolution strategy is commonly employed, splitting high-resolution images into multiple sub-images. These are encoded separately through ViT and then fused with global thumbnail features. Additionally, to control the number of tokens input into the LLM, pixel-level or patch-level pooling operations are often added after ViT to reduce computational overhead while retaining key visual information.

    III. Multimodal Data Preparation Strategies

    High-quality data is the foundation for VLMs to acquire reasoning capabilities, requiring the construction of multi-dimensional, multi-layered datasets.

    3.1 Image Captioning and Interleaved Data

    • Image Captioning Data: Provides basic image-text pairs to help models establish mappings between visual concepts and linguistic expressions.
    • Interleaved Image-Text Data: Simulates real-world web pages or document structures, containing continuous text and multiple interleaved images to train the model’s ability to associate image and text information in complex contexts.

    3.2 Special Task Data: OCR and Visual Grounding

    • OCR Data: Enhances the model’s ability to recognize and understand embedded text within images, which is crucial for chart reasoning and document QA.
    • Visual Grounding Data: Requires the model to output bounding box coordinates for target objects. This data forces the model to learn spatial relationships, greatly reducing spatial hallucinations and laying the foundation for physical commonsense reasoning.

    3.3 Temporal and Instruction Tuning Data

    • Video Data: Provides temporal dimension information, helping models understand the sequence of actions, causal relationships, and physical dynamics.
    • Instruction Tuning Data: Covers multi-turn dialogues and complex instructions (e.g., “First describe the purpose of the red object in the image, then estimate its possible operating time”), cultivating the model’s thinking habits in following human instructions.

    IV. Pre-training Phase: Building Solid Visual Representations

    The goal of the pre-training phase is to achieve modality alignment and knowledge injection. During this phase, the LLM main body is typically frozen, training only the ViT and MLP projection layers, or applying parameter-efficient fine-tuning to the LLM. Training with hundreds of millions of general image-text pairs enables the model to master general visual commonsense. The quality of pre-training directly determines whether the model can accurately “understand” image details in subsequent fine-tuning.

    V. Supervised Fine-Tuning (SFT): Injecting Reasoning Paradigms

    5.1 High-Quality CoT Data Construction
    To teach the model to reason, SFT data must contain detailed thought processes. Data annotation should not merely provide the final answer but should construct a complete chain of “visual observation -> information extraction -> logical deduction -> conclusion.” For example, when solving a geometry problem, the steps for extracting known conditions, applied theorems, and calculation processes must be annotated.

    5.2 Standardized Response Format
    To facilitate later parsing and reinforcement learning reward calculation, standardized response formats must be introduced during SFT. Specific delimiters or tags are typically used to distinguish the “thought process” from the “final answer.”

    1. {
    2. "input": "Analyze the bar chart below and determine which month has the highest growth rate, explaining your reasoning.",
    3. "output": "1. Observe the bar chart and extract values from January to June: 100, 120, 150, 160, 180, 210.\n2. Calculate the month-over-month growth rate: Feb 20%, Mar 25%, Apr 6.7%, May 12.5%, Jun 16.7%.\n3. Comparing the results, March has the highest growth rate.\n<answer>March has the highest growth rate at 25%.</answer>"
    4. }

    5.3 Data Quality Management and Iterative Enhancement
    Inconsistent CoT data quality can lead the model to learn incorrect reasoning paradigms. A strict data cleaning mechanism must be established to filter out data with logical jumps, contradictory answers, or non-standard formats. Meanwhile, the current model version can be used for data pre-generation, followed by manual or stronger model review and revision to achieve iterative data enhancement.

    VI. Reinforcement Learning (RL): Optimizing Reasoning Depth

    SFT is essentially imitation learning, while RL allows the model to explore better reasoning paths.

    6.1 Reward System Design
    The reward function is the core of RL. For reasoning VLMs, rewards should not only consider the accuracy of the final answer (outcome reward) but also introduce process rewards, providing positive feedback for logical and clear reasoning steps. Additionally, a format reward should be designed to penalize outputs that do not follow the standard format, along with a length penalty to prevent the model from generating redundant and meaningless text.

    6.2 RLCS: Adaptive Curriculum Learning
    Reinforcement learning is prone to training instability. Adaptive curriculum learning strategies dynamically adjust the difficulty of training data based on the model’s current capability level. In the early stages, simple perception and single-step reasoning dominate. As model performance improves, multi-step complex reasoning and long video understanding tasks are gradually introduced. This step-by-step strategy can effectively prevent gradient explosions or reward collapse.

    6.3 Optimization Details
    For optimization algorithms, PPO or its variants are commonly used. Attention must be paid to the weight setting of the KL divergence penalty term to prevent the policy model from deviating too far from the reference model, which would cause language capability degradation. Additionally, in multimodal scenarios, as visual tokens occupy a large amount of context, memory management and computation graph construction need optimization to support larger batch sizes.

    VII. Engineering Practice and Platform Support

    In enterprise-level deployment, training and deploying reasoning-capable VLMs requires substantial computational power and efficient data engineering support. Developers can leverage cloud computing platforms like Baidu AI Cloud, utilizing general computing platforms and object storage services for concurrent preprocessing and storage of massive multimodal data. Container platforms and distributed training frameworks can efficiently schedule GPU resources for SFT and RL phases. Through mature cloud-native infrastructure, developers can focus more on the iterative optimization of the model algorithms themselves, accelerating the business deployment of advanced visual understanding systems.

    In conclusion, endowing VLMs with reasoning capabilities is a systematic engineering effort requiring full-chain design from architecture alignment and multi-source data construction to CoT paradigm injection and RL fine-optimization. As these technologies mature, visual large models will demonstrate deeper intelligent value in fields such as autonomous driving, medical image analysis, and smart manufacturing.