Training a speaker neural network using one or more listener neural networks
Abstract
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for training a speaker neural network using one or more listener neural networks.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 11 · Forward citations: 0.
Claims (22 — 3 Independent, 19 Dependent)
- Claim 1Independent Claim
A method performed by one or more computers, the method comprising: obtaining a set of one or more training images; for each training image in the set: processing the training image using a speaker neural network to generate a text caption for the training image; generating a plurality of listener inputs, each listener input comprising (i) the text caption for the training image and (ii) a respective set of images, wherein the respective set of images includes a corresponding version of the training image and a corresponding set of one or more distractor images that are each different from the training image; for each listener input, processing the listener input using a respective listener neural network from a set of one or more listener neural networks to generate a respective match score for each image in the respective set of images in the listener input; and generating a reward for the training image based at least in part on the respective match scores for the training image generated by processing each of the listener inputs; and training the speaker neural network using the rewards for the training images.
- Claim 2Depends on #1
The method of claim 1, wherein the speaker neural network comprises: a vision encoder neural network configured to process the training image to generate an encoded representation of the training image; an adapter neural network configured to process the encoded representation to generate an adapted representation of the training image; and a language neural network configured to process the adapted representation to generate the text caption of the training image.
- Claim 3Depends on #2
The method of claim 2, wherein the adapter neural network is configured to apply one or more QKV-attention layers over the encoded representation to generate the adapted representation.
- Claim 4Depends on #2
The method of claim 2, wherein training the speaker neural network using the rewards for the training images comprises: updating the adapter neural network while holding the vision encoder neural network and the language neural network fixed.
- Claim 5Depends on #4
The method of claim 4, further comprising, prior to the training: pre-training the speaker neural network on an image captioning data set through supervised learning to pre-train the adapter neural network while holding the vision encoder neural network and the language neural network fixed.
- Claim 6Depends on #4
The method of claim 4, wherein the language neural network has been pre-trained on one or more language modeling tasks.
- Claim 7Depends on #4
The method of claim 4, wherein the vision encoder neural network has been pre-trained on one or more representation learning tasks.
- Claim 8Depends on #1
The method of claim 1, wherein the corresponding set of distractor images is the same set of distractor images for all of the listener inputs.
- Claim 9Depends on #1
The method of claim 1, wherein generating a reward for the training image based at least in part on the respective match scores for the training image generated by processing each of the listener inputs comprises: generating a respective accuracy score for each listener input based on whether the training image was assigned a highest match score of any image in the respective set of images in the listener input; and combining the respective accuracy scores to generate the reward.
- Claim 10Depends on #1
The method of claim 1, wherein generating a reward for the training image based at least in part on the respective match scores for the training image generated by processing each of the listener inputs comprises: determining whether only a designated subset of the listener inputs assigned a highest match score of any image in the respective set of images in the listener input to the training image; and assigning a maximum reward for the training image only in response to determining that only the designated subset of the listener inputs assigned a highest match score of any image in the respective set of images in the listener input to the training image.
- Claim 11Depends on #1
The method of claim 1, wherein the set of one or more listener neural networks includes only one listener neural network.
- Claim 12Depends on #1
The method of claim 1, wherein the set of one or more listener neural networks includes a plurality of different listener neural networks, wherein each listener input is processed by a different one of the different listener neural networks, and wherein the corresponding version of the training image in each of the training inputs is the same for all of the training inputs.
- Claim 13Depends on #12
The method of claim 12, wherein one of the different listener neural networks has been trained on training data that reflects preferences of a particular user.
- Claim 14Depends on #12
The method of claim 12, further comprising: after the training, determining, based on test text captions generated by the speaker neural network by processing test images, a level of bias exhibited by one or more of the plurality of different listener neural networks.
- Claim 15Depends on #1
The method of claim 1, wherein, for a first listener input of the plurality of listener inputs, the corresponding version of the training image is the training image.
- Claim 16Depends on #1
The method of claim 1, wherein, for at least one of the listener inputs of the plurality of listener inputs, the corresponding version of the training image is the training image after a corresponding image transformation has been applied to the training image.
- Claim 17Depends on #16
The method of claim 16, wherein the corresponding image transformation comprises one or more of: a transformation that changes one or more color values in the training image; a transformation that crops a portion of the training image; a transformation that rotates at least a portion of the training image; or a transformation that blurs at least a portion of the training image.
- Claim 18Depends on #1
The method of claim 1, wherein training the speaker neural network using the rewards for the training images comprises: training the speaker neural network using the rewards through reinforcement learning.
- Claim 19Depends on #18
The method of claim 18, wherein training the speaker neural network using the rewards through reinforcement learning comprises: training the speaker neural network using a policy gradient reinforcement learning technique.
- Claim 20Depends on #19
The method of claim 19, wherein the policy gradient reinforcement learning technique is REINFORCE.
- Claim 21Independent Claim
A system comprising: one or more computers; and one or more storage devices storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations comprising: obtaining a set of one or more training images; for each training image in the set: processing the training image using a speaker neural network to generate a text caption for the training image; generating a plurality of listener inputs, each listener input comprising (i) the text caption for the training image and (ii) a respective set of images, wherein the respective set of images includes a corresponding version of the training image and a corresponding set of one or more distractor images that are each different from the training image; for each listener input, processing the listener input using a respective listener neural network from a set of one or more listener neural networks to generate a respective match score for each image in the respective set of images in the listener input; and generating a reward for the training image based at least in part on the respective match scores for the training image generated by processing each of the listener inputs; and training the speaker neural network using the rewards for the training images.
- Claim 22Independent Claim
One or more non-transitory computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations comprising: obtaining a set of one or more training images; for each training image in the set: processing the training image using a speaker neural network to generate a text caption for the training image; generating a plurality of listener inputs, each listener input comprising (i) the text caption for the training image and (ii) a respective set of images, wherein the respective set of images includes a corresponding version of the training image and a corresponding set of one or more distractor images that are each different from the training image; for each listener input, processing the listener input using a respective listener neural network from a set of one or more listener neural networks to generate a respective match score for each image in the respective set of images in the listener input; and generating a reward for the training image based at least in part on the respective match scores for the training image generated by processing each of the listener inputs; and training the speaker neural network using the rewards for the training images.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATION This application claims priority to U.S. Provisional Application No. 63/343,960, filed on May 19, 2022. The disclosure of the prior application is considered part of and is incorporated by reference in the disclosure of this application. BACKGROUND This specification relates to processing images using neural networks. Neural networks are machine learning models that employ one or more layers of nonlinear units to predict an output for a received input. Some neural networks include one or more hidden layers in addition to an output layer. The output of each hidden layer is used as input to the next layer in the network, i.e., the next hidden layer or the output layer. Each layer of the network generates an output from a received input in accordance with current values of a respective set of parameters. SUMMARY This specification describes a system implemented as computer programs on one or more computers that that trains a speaker neural network. The speaker neural network is a neural network that processes an image to generate a text caption for the image. In particular, during the training, the system uses one or more listener neural networks to adapt the text captions generated by the speaker neural network, e.g., to adapt the captions to refer to only some characteristics of images, to avoid referring to one or more characteristics of images, or both. For example, the system can adapt the speaker neural network to avoid referring to colors that are present in images, to avoid referring to certain portions of the image, or to describe images based only on the color of various portions of the image instead of any other details of the object(s) depicted in the image. Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages. This specification describes techniques for adapting a speaker neural network that generates image captions. By
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (11)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 12,210,825 B2 | Image captioning | 2025 | 1 |
Non-Patent Literature (10)
- Yun et al,
- “
- Gated Object-Attribute Matching Network for Detailed Image Caption
- ”
- (pp. 1-11). (Year: 2020).
- He et al.,
- “
- A Modularized Architecture of Multi-Branch Convolutional Neural Network for Image Captioning
- ”
- (pp. 1-15) (Year: 2019).