LAVIS icon indicating copy to clipboard operation
LAVIS copied to clipboard

Something Confusing about BLIP2

Open ycformal opened this issue 1 year ago • 0 comments

I read the paper "BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models" and find something confusing:

  1. In Figure 2, the Q-Former includes the image encoding part and text encoding part. However, in my understanding, Q-Former only encodes the image, and the encoding can be comprehended by a frozen LLM.
  2. During Image-Text Contrastive Learning stage, if we use a decoder-only model like GPT, how can we get the text embedding?
  3. During Image-grounded Text Generation stage, how to ensure LLM can process the [DEC] token? Note that LLM is frozen.
  4. In Image-Text Matching stage, the paper says "The output query embeddings Z thus capture multimodal information. We feed each output query embedding into a two-class linear classifier to obtain a logit, and average the logits across all queries as the output matching score." What is the input of classifier here? The paper only mentions the query embedding, and text embedding is not mentioned. Why is this stage important, as we already have the image-text contrastive learning stage? This stage seems to be training the classifier, which is not used later.
  5. In Figure 3, there's a fully connected layer outside of Q-Former, when is it trained? That layer is not presented in Figure 2. Is Figure 2 wrong?
  6. In Figure 2, there's a bi-directional error between two self-attention blocks. What does that mean? Each self attention block already has its input and output, so they cannot directly interact with each other.

I want to extend the frozen LLM to more advanced models, so possibly I need to figure out these questions.

ycformal avatar Jun 06 '25 16:06 ycformal