IP Library › Granted Patent US 12,198,432
Granted Patent B2
US 12,198,432 · App. 17/566,061 · Granted Jan 14, 2025

Systems and methods for video and language pre-training

Inventors: Dongxu Li (Canberra, AU); Junnan Li (Singapore, SG); Chu Hong Hoi (Singapore, SG)
Assignee: Salesforce, Inc.
G06V20/41G06F40/279G06F40/284G06V10/26G06V10/761G06V10/774G06V10/776G06V10/806G06V20/46G06V20/47
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,198,432
App. No.
17/566,061
Granted
Jan 14, 2025
Kind
B2
Abstract

Embodiments described a method of video-text pre-learning to effectively learn cross-modal representations from sparse video frames and text. Specifically, an align and prompt framework provides a video and language pre-training framework that encodes the frames and text independently using a transformer-based video encoder and a text encoder. A multi-modal encoder is then employed to capture cross-modal interaction between a plurality of video frames and a plurality of texts. The pre-training includes a prompting entity modeling that enables the model to capture fine-grained region-entity alignment.

Claims (76)

1. A method of video-and-language alignment pretraining with entity prompts, the method comprising:

obtaining, via a data interface, a video frame, and a set of text entity prompts that identify a pre-defined set of candidate entities;

encoding, by a first video encoder, an augmented view of the video frame into a video feature representation;

encoding, by a first text encoder, the set of text entity prompts into a set of prompt feature representations corresponding to the pre-defined set of candidate entities, respectively;

computing, for each candidate entity in the pre-defined set of candidate entities, a respective similarity score between a respective prompt feature representation corresponding to the respective candidate entity and the video feature representation;

computing an entity pseudo label as a probability distribution among the pre-defined set of candidate entities based on respective similarity scores corresponding to the pre-defined set of candidate entities;

generating, by a video-language model, an entity prediction in response to an input of the video frame, comprising:

encoding, by a second video encoder of the video-language model, the video frame into a second video feature representation,

encoding, by a second text encoder of the video-language model, a text descriptions into a second text feature representation,

encoding, by a multi-modal video-text encoder of the video-language model, the second video feature representation and the second text feature representation into a set of multimodal embeddings, and

generating, by a classifier of the video-language model, the entity prediction from the set of multimodal embeddings;

computing a first loss based on a cross-entropy between the entity prediction and the entity pseudo label that is the probability distribution; and

updating the video-language model comprising the second video encoder, the second text encoder and the multi-modal video-text encode based at least in part on the first loss that is computed based at least in part on outputs of the first video encoder and the first text encoder.

2. The method of claim 1 , wherein each text entity prompt from the set of text entity prompts takes a pre-determined format identifying a frequent noun that is a candidate entity in a pretraining corpus.

3. The method of claim 1 , wherein the video feature representation comprises an embedding of a video start token.

4. The method of claim 1 , wherein the entity pseudo label is computed by taking a softmax-normalized similarity between the embedding of the video start token and the set of prompt feature representations.

5. The method of claim 1 , further comprising:

obtaining, via the data interface, a plurality of video frames and a plurality of text descriptions;

encoding, by a second video encoder, the plurality of video frames into video feature representations;

encoding, by a second text encoder, the plurality of text descriptions into text feature representations;

computing similarity scores between the video feature representations and the text feature representations; and

computing a second loss that is a contrastive loss based on the computed similarity scores.

6. The method of claim 5 , further comprising:

predicting, by the video-language model, masked input text tokens that are input to the second text encoder;

computing a third loss based on the predicted masked input text tokens.

7. The method of claim 6 , further comprising:

generating, by the video-language model, an alignment between a video input and a text input; and

computing a fourth loss based on the generated alignment.

8. The method of claim 7 , further comprising:

computing a weighted sum of the first loss, the second loss, the third loss and the fourth loss; and

updating the video-language model based on the weighted sum.

9. A system of video-and-language alignment pretraining with entity prompts, the system comprising:

a data interface obtaining a video frame and a set of text entity prompts that identify a pre-defined set of candidate entities;

a memory storing a plurality of processor-executable instructions; and

a processor executing the plurality of processor-executable instructions to perform operations comprising:

encoding, by a first video encoder, an augmented view of the video frame into a video feature representation;

encoding, by a first text encoder, the set of text entity prompts into a set of prompt feature representations corresponding to the pre-defined set of candidate entities;

computing, for each candidate entity in the pre-defined set of candidate entities, a respective similarity score between a respective prompt feature representation corresponding to the respective candidate entity and the video feature representation;

computing an entity pseudo label as a probability distribution among the pre-defined set of candidate entities based on respective similarity scores corresponding to the pre-defined set of candidate entities;

generating, by a video-language model, an entity prediction in response to an input of the video frame, comprising:

encoding, by a second video encoder of the video-language model, the video frame into a second video feature representation,

encoding, by a second text encoder of the video-language model, a text descriptions into a second text feature representation,

encoding, by a multi-modal video-text encoder of the video-language model, the second video feature representation and the second text feature representation into a set of multimodal embeddings, and

generating, by a classifier of the video-language model, the entity prediction from the set of multimodal embeddings;

computing a first loss based on a cross-entropy between the entity prediction and the entity pseudo label that is the probability distribution; and

updating the video-language model comprising the second video encoder, the second text encoder and the multi-modal video-text encode based at least in part on the first loss that is computed based at least in part on outputs of the first video encoder and the first text encoder.

10. The system of claim 9 , wherein each text entity prompt from the set of text entity prompts takes a pre-determined format identifying a frequent noun that is a candidate entity in a pretraining corpus.

11. The system of claim 9 , wherein the video feature representation comprises an embedding of a video start token.

12. The system of claim 9 , wherein the entity pseudo label is computed by taking a softmax-normalized similarity between the embedding of the video start token and the set of prompt feature representations.

13. The system of claim 9 , wherein the operations further comprise:

obtaining, via the data interface, a plurality of video frames and a plurality of text descriptions;

encoding, by a second video encoder, the plurality of video frames into video feature representations;

encoding, by a second text encoder, the plurality of text descriptions into text feature representations;

computing similarity scores between the video feature representations and the text feature representations; and

computing a second loss that is a contrastive loss based on the computed similarity scores.

14. The system of claim 13 , wherein the operations further comprise:

predicting, by the video-language model, masked input text tokens that are input to the second text encoder;

computing a third loss based on the predicted masked input text tokens.

15. The system of claim 14 , wherein the operations further comprise:

generating, by the video-language model, an alignment between a video input and a text input;

computing a fourth loss based on the generated alignment;

computing a weighted sum of the first loss, the second loss, the third loss and the fourth loss; and

updating the video-language model based on the weighted sum.

16. A processor-readable non-transitory storage medium storing a plurality of processor-executable instructions for video-and-language alignment pretraining with entity prompts, the instructions being executed by a processor to perform operations comprising:

obtaining, via a data interface, a video frame and a set of text entity prompts that identify a pre-defined set of candidate entities;

encoding, by a first video encoder, an augmented view of the video frame into a video feature representation;

encoding, by a first text encoder, the set of text entity prompts into a set of prompt feature representations that is a candidate entity;

computing, for each candidate entity in the pre-defined set of candidate entities, a respective similarity score between a respective prompt feature representation corresponding to the respective candidate entity and the video feature representation;

computing an entity pseudo label as a probability distribution among the pre-defined set of candidate entities based on respective similarity scores corresponding to the pre-defined set of candidate entities;

generating, by a video-language model, an entity prediction in response to an input of the video frame, comprising:

encoding, by a second video encoder of the video-language model, the video frame into a second video feature representation,

encoding, by a second text encoder of the video-language model, a text descriptions into a second text feature representation,

encoding, by a multi-modal video-text encoder of the video-language model, the second video feature representation and the second text feature representation into a set of multimodal embeddings, and

generating, by a classifier of the video-language model, the entity prediction from the set of multimodal embeddings;

computing a first loss based on a cross-entropy between the entity prediction and the entity pseudo label that is the probability distribution; and

updating the video-language model comprising the second video encoder, the second text encoder and the multi-modal video-text encode based at least in part on the first loss that is computed based at least in part on outputs of the first video encoder and the first text encoder.

Assignments (2)
CHANGE OF NAME Recorded Aug 4, 2026
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 076118/0548 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 22, 2022
From: LI, DONGXU; LI, JUNNAN; HOI, CHU HONG
To: SALESFORCE.COM, INC.
Reel/Frame 059345/0487 →
Continuity (2)
Provisional Application 63279986 · Nov 16, 2021
Related Publication 20230154146A1 · May 18, 2023
References Cited (10)
US 10332508B1 · Hoffmeister · 2019 [cited by examiner]
US 20210026887A1 · Fukushima · 2021 [cited by examiner]
US 20220086401A1 · Hu · 2022 [cited by examiner]
US 20220327809A1 · Li · 2022 [cited by examiner]
US 20230104228A1 · Li et al. · 2023 [cited by applicant]
US 20230147550A1 · He · 2023 [cited by examiner]
US 20230154159A1 · Kim · 2023 [cited by examiner]
US 20230282362A1 · Saillard et al. · 2023 [cited by applicant]
US 20240070436A1 · Xu · 2024 [cited by examiner]
WO WO2022261570A1 · 2022 [cited by examiner]
Cited By (1)
US 12,619,342