TL;DR
This paper introduces SC-Captioner, a novel reinforcement learning framework that empowers large vision-language models (LVLMs) to self-correct their image captions. By designing a reward function that incentivizes accurate corrections and penalizes hallucinations, SC-Captioner significantly improves caption quality, outperforming existing methods like Direct Preference Optimization (DPO).
What Problem Does This Paper Address?
Generating accurate and comprehensive image captions is a long-standing challenge in computer vision. While recent LVLMs have made significant strides, they still struggle with two key issues: precision (generating descriptions of things not present in the image, often called "hallucination") and recall (failing to capture all relevant objects and details). Simply prompting these models to self-correct often yields suboptimal results. This paper addresses the need for a robust mechanism to train LVLMs to effectively refine their own captions, improving both precision and recall without relying on external human feedback during inference.
Methods
The core of SC-Captioner is a reinforcement learning (RL) framework that trains the LVLM to perform self-correction. The process involves:
- Two-Turn Caption Generation: The LVLM first generates an initial caption ($y_1$) for an image. Then, using the image, the initial caption, and a self-correction prompt ($x_2$), it generates a second, refined caption ($y_2$).
- Scene Graph Parsing: To quantify the quality of the self-correction, both the initial and refined captions are parsed into sets of objects, attributes, and relations using a scene graph parser (FACTUAL).
- Correction-Based Reward Function: This is the key innovation. The reward function is designed to:
- Correctness Bonus: Reward the model for adding elements present in the ground truth (GT) caption but missing in the initial caption, and for removing elements present in the initial caption but absent in the GT caption. This is calculated by comparing the parsed sets of elements and using cosine similarity of their feature vectors.
- Mistake Punishment: Penalize the model for adding hallucinations (elements not in the GT) or removing correct descriptions. This component is crucial for improving precision.
- Policy Gradient Optimization: The RL framework uses a policy-gradient approach to update the LVLM's parameters, maximizing the reward signal. A KL divergence term is included to ensure the model retains its ability to generate good initial captions.
The paper also introduces a refined evaluation metric, building upon the CAPTURE metric, to better assess caption quality by improving precision calculation, attribute matching, and relation evaluation through a question-answering approach.
Datasets
- Training: The authors introduce a new dataset called RefinedCaps. This dataset consists of 6.5K diverse images from the COCO dataset. Initial captions were generated by GPT-4, and then human experts refined them to correct hallucinations and add missing details, ensuring high quality and completeness.
- Evaluation: Two test datasets were used:
- DOCCI500: 500 images sampled from the DOCCI test set, known for detailed captions.
- COCO-LN500: 500 images from the COCO-LR dataset, focusing on human-centric descriptions.
Key Insights and Ideas
- Self-correction is trainable: Unlike previous observations that LLMs struggle with intrinsic self-correction, this work demonstrates that with a well-designed reward function, LVLMs can be effectively trained to improve their own captions.
- The power of structured rewards: Decomposing captions into objects, attributes, and relations, and then using set differences to guide the reward function, is a powerful way to provide fine-grained feedback for self-correction.
- Hallucination penalty is critical: The mistake punishment component of the reward function is vital for improving caption precision, directly addressing the hallucination problem.
- Refined evaluation is necessary: Traditional metrics like CAPTURE have limitations in precisely evaluating detailed captions. The proposed metric, with its question-answering approach for relations, offers a more robust assessment.
Key Results
Experiments were conducted using LLaVA-1.5-7B and Qwen2-VL-7B as base models.
- SC-Captioner outperforms DPO: On both DOCCI500 and COCO-LN500 datasets, SC-Captioner consistently improved caption quality across various metrics (BLEU-4, METEOR, CAPTURE, and the proposed metrics) compared to baseline, SFT, and DPO methods.
- Improved Precision and Recall: SC-Captioner achieved a better balance between precision and recall. While DPO improved recall, it often led to lower precision. SC-Captioner, however, maintained similar precision levels to SFT while significantly improving recall and overall quality.
- Ablation Study Highlights:
- Using CAPTURE score directly as a reward was less effective than the proposed method.
- The mistake punishment component was crucial for maintaining high precision, even if it slightly reduced recall.
- Combining object, attribute, and relation rewards, along with mistake punishment, yielded the best results.
Limitations and Future Work
- Dataset Dependency: The performance of SC-Captioner is likely influenced by the quality and diversity of the training data (RefinedCaps).
- Computational Cost: Reinforcement learning training can be computationally intensive.
- Future Work: The paper suggests exploring more sophisticated reward shaping and investigating the application of SC-Captioner to other multimodal tasks. The authors also highlight the potential for further improvements by refining the scene graph parsing and reward calculation mechanisms.
Summary updated