Image Captioning Model Using Attention Penalty for Weakly-Supervised Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current image captioning models face challenges in generating accurate and relevant captions for family historical photos, requiring significant human effort and relying on expensive fine-grained annotations, with attention maps being implicitly trained and failing to align with intrinsic saliency maps from visual models.

Innovation Solution

The proposed solution involves a novel image captioning model that leverages gradient-weighted class activation mapping (Grad-CAM) and state-of-the-art bottom-up and top-down attention mechanisms to align visual attention maps with caption attention maps, incorporating an attention penalty in the loss function to improve alignment and caption quality without requiring fine-grained labels.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If attention maps are implicitly trained without alignment constraints, then the model training is simpler and faster, but the caption attention maps fail to align with intrinsic saliency maps from visual models, reducing caption accuracy

Engineering Contradiction:
Improvecaption accuracyVSAvoidtraining complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent implements feedback by computing an attention penalty that compares caption attention maps with visual attention maps, and using this penalty to guide the training process. The loss function incorporates this attention penalty to provide feedback signals that adjust the attention mechanism parameters, ensuring alignment between caption and visual attention without requiring fine-grained annotations.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent changes the parameter optimization approach by adding an attention penalty term to the loss function. This modifies the gradient descent process to simultaneously optimize both caption generation accuracy and attention map alignment, achieving improved caption accuracy while maintaining relatively simple training procedures.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If fine-grained annotations are used for training, then caption accuracy improves, but the annotation cost and time consumption increase significantly

Engineering Contradiction:
Improvecaption accuracyVSAvoidannotation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent enables the model to self-align its attention maps using only image-level annotations. The attention mechanism learns to produce caption attention maps that align with visual attention maps through the attention penalty, eliminating the need for expensive fine-grained human annotations while maintaining training effectiveness.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces visual attention maps as an intermediary that bridges the gap between image-level annotations and caption generation. By using these visually-derived attention maps as a reference, the model can learn accurate captioning without requiring direct fine-grained annotations, significantly reducing annotation time and cost.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If the model focuses on all image regions equally, then the processing is simpler, but the caption relevance to specific image regions decreases

Engineering Contradiction:
Improvemodel processing simplicityVSAvoidregion-specific information
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The patent applies local quality by making different regions of the image receive different attention weights during caption generation. The attention mechanism dynamically assigns higher weights to relevant regions and lower weights to irrelevant regions, allowing the model to focus computational resources on important areas while maintaining overall processing efficiency.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11775838B2Image captioning with weakly-supervised attention penalty
Publication Date: 2023.10.03 ANCESTRY COM OPERATIONS INC
  • US11775838B2 patent drawing
  • US11775838B2 patent drawing
  • US11775838B2 patent drawing

AI summary

Techniques for training a machine-learning (ML) model for captioning images are disclosed. A plurality of feature vectors and a plurality of visual attention maps are generated by a visual model of the ML model based on an input image. Each of the plurality of feature vectors correspond to different regions of the input image. A plurality of caption attention maps are generated by an attention model of the ML model based on the plurality of feature vectors. An attention penalty is calculated based on a comparison between the caption attention maps and the visual attention maps. A loss function is calculated based on the attention penalty. One or both of the visual model and the attention model are trained using the loss function.