Visual entity recognition using generative neural networks

By employing semantic codes generated by an entity decoder neural network, the system effectively addresses the challenges of large datasets in visual entity recognition, achieving efficient and accurate recognition even with millions of entities.

WO2025117964A1PCT designated stage expired Publication Date: 2025-06-05GOOGLE LLC

Patent Information

Application Number
PCT/US2024/058115
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-01
Filing Date
2024-12-02
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

Existing visual entity recognition approaches struggle with large datasets, as classification-based methods become computationally expensive and dual-encoder methods face challenges with indirect optimization, information loss, and high memory requirements.

Method used

The use of semantic codes generated by an entity decoder neural network allows for efficient visual entity recognition, even with large datasets, by ensuring compact and discriminative codes that reflect semantic similarity between entities.

Benefits of technology

This approach enables accurate visual entity recognition for any set of database entities, including those with millions of entries, by leveraging compact and unique semantic codes that are well-suited for generative models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2024058115_05062025_PF_FP_ABST
    Figure US2024058115_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for performing visual entity recognition. In particular, semantic codes that represent database entities are used to effectively recognize specific database entities in input images.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] VISUAL ENTITY RECOGNITION USING GENERATIVE NEURAL NETWORKS

[0002] CROSS-REFERENCE TO RELATED APPLICATIONS

[0003] This application claims the benefit of priority to U.S. Provisional Application No. 63 / 605,440 filed on December 1, 2023, the contents of which are hereby incorporated by reference.

[0004] BACKGROUND

[0005] This specification relates to processing images using machine learning models.

[0006] As one example, 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 another layer in the network, e.g., 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 weights.

[0007] SUMMARY

[0008] This specification describes a system implemented as one or more computer programs on one or more computers that that performs visual entity recognition.

[0009] Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages.

[0010] Visual entity recognition requires identifying the specific entity that is depicted within a given input image. When the number of “database’' entities that the system must be able to accurately detect grows large, this task becomes difficult for existing approaches. For example, classification-based approaches, i.e., ones that generate a probability distribution over the entire set of entities and then select the correct entity using the probability distribution becomes too computationally expensive due to the large substantial parameter counts required to generate such a large probability distribution. They also struggle due to engineering complexities in deploying a model that needs to generate such a large distribution. As another example, dual-encoder approaches leam a unified image-text feature space, thereby facilitating efficient nearest neighbor searches for recognition. Nonetheless, this approach exhibits its own drawbacks: (a) it does not directly optimize for the final recognition task but instead relies on indirect optimization through contrastive loss where a set of negative data has to be subsampled at training time, (b) compressing either the image or text into an embedding vector results in loss of information, detrimentally affecting performance for fine-grained recognition and (c) the memory requirements for storing dense representations scale proportionally with the size of the entity set.

[0011] This specification generally describes techniques for performing visual entity recognition that overcome these difficulties by using semantic codes. In particular, this specification describes how to use an entity decoder neural network to ‘"decode7’ a semantic code that identifies an entity that is depicted in a given input image.

[0012] By making use of semantic codes, the described techniques can perform visual entity recognition for any set of database entities and, more generally, can accurately perform visual entity recognition even when the set of database entities includes a very large number of entities, e.g., over a million entities or over five million entities. In other words, even when the number of database entities is prohibitively large for existing techniques to be able to effectively perform retrieval from arbitrary input images, the described techniques can still perform well due to the user of semantic codes, which are compact and well-suited to being generated by a generative model.

[0013] More specifically, the system generates semantic codes that have several different properties that allow a generative model, i.e., the entity decoder neural network, to accurately decode a semantic code that accurately identifies which visual entity is depicted in a given input image. In particular, the system generates the semantic codes so that similarity between semantic codes reflects semantic similarity between the corresponding database entities. More specifically, by generating the semantic codes from semantic tokens, e.g., generated by a text tokenizer, semantically similar visual entities will generally have semantic codes that have some overlapping semantic tokens. Additionally, the system generates the semantic tokens so that they are discriminative, i.e., compared to all other database entities, and compact, i.e., do not include an excessively large number of tokens. This makes the tokens significantly easier to leam for the model. To accomplish this, the system can generate codes that include more than one but less than all of the text tokens generated by the tokenizer for any given entity name. Despite this compactness, to allow for precise recognition, the system generates the semantic codes to be unambiguous, i.e., by ensuring that each semantic code is unique.

[0014] The details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.

[0015] BRIEF DESCRIPTION OF THE DRAWINGS

[0016] FIG. 1 A is a diagram of an example visual entity recognition system.

[0017] FIG. IB shows an example of an overview of the visual entity recognition process.

[0018] FIG. 2 is a flow diagram of an example process for performing visual entity recognition.

[0019] FIG. 3 is a flow diagram of an example process for generating a semantic code for one of the database entities.

[0020] FIG. 4 is an example of generating a semantic code for a database entity.

[0021] FIG. 5 is an example of performing the visual entity recognition process.

[0022] Like reference numbers and designations in the various draw ings indicate like elements.

[0023] DETAILED DESCRIPTION

[0024] This specification describes a system implemented as computer programs on one or more computers in one or more locations that performs visual entity' recognition on input images.

[0025] FIG. 1 A is a diagram of an example visual entity recognition system 100. The visual entity recognition system 100 is an example of a system implemented as computer programs on one or more computers in one or more locations, in which the systems, components, and techniques described below can be implemented.

[0026] The system 100 is a system that performs visual entity recognition on input images.

[0027] Visual entity recognition is the process of determining which entity from a predetermined set of entities (referred to in this specification as “database entities”) is represented in an input image.

[0028] The database entities can be any appropriate set of entities, e.g.. can include any of people, places, objects, animals, and so on.

[0029] The entities in the set of database entities can be general, e.g., bridges, specific, e.g., the Golden Gate Bridge, or a mix of both.

[0030] Moreover, the entities in the set of database entities can include real-world entities, e.g., entities that correspond to concepts that are found in the real-world, or synthetic entities, e.g., entities that correspond to concepts only found in generated media content, or both. In particular, the system 100 receives an input that includes (i) an input image 102 and (ii) a text query 104 that specifies an entity in the input image 102. That is, because multiple entities may be represented in a single image, the text query 104 specifies which entity in the input image needs to be recognized, i.e., references an entity that is represented in the input image 102 and that needs to be recognized by the sy stem 100.

[0031] For example, a single image may depict a bridge that crosses a body of water. If the request is to recognize the bridge, the text query 104 may be ‘"what is the name of this bridge?” If the request is to recognize the body of water, the text query 104 may be “what is the name of this river?”

[0032] In order to allow the system 100 to perform visual entity recognition, the sy stem 100 maintains code data 120 that specifies, for each of the database entities, a semantic code 122 that represents the database entity.

[0033] Each semantic code 122 is a set of semantic tokens from a vocabulary of semantic tokens. In some examples, the semantic codes 122 are ordered sequences of semantic tokens, i.e., so that two sequences that include the same semantic tokens but in a different order are considered different codes. In some other examples, the semantic codes 122 are unordered sets of semantic tokens, i.e., so that two sequences that include the same semantic tokens but in a different order are considered the same code.

[0034] The tokens are referred to as “semantic” tokens because each token has a semantic meaning that conveys semantic information relating to the entity. For example, the semantic tokens can be text tokens as generated by a text tokenizer that divides sequences of text into tokens, e.g., one or more of characters, words, word pieces, and so on. One example of a text tokenizer is the SentencePiece tokenizer.

[0035] In this example, some or all of the semantic tokens in a given semantic code 122 for a given entity can be text tokens that are included in a set of text tokens that are generated by tokenizing an entity name for the given entity using the text tokenizer.

[0036] Generally, the semantic codes 122 are also compact. For example, the total number of tokens in a given semantic code 122 for a given entity can be less than the total number of text tokens that are generated by tokenizing the entity name for the given entity using the text tokenizer.

[0037] Generating the semantic codes 122 for the database entities will be described in more detail below with reference to FIG. 3.

[0038] As described above, the code data 120 specifies, for each of a plurality of database entities, a semantic code 122 that represents the database entity. For example, the code data 120 can associate each database entity with respective identifiers, e g., integers or other unique identifiers, for each of the semantic tokens in the semantic code 122 for the entity. As one example, the code data 120 can map a unique identifier for the database entity to an entity name for the entity and to the respective identifiers for the semantic tokens in the semantic code 122 for the entity.

[0039] Once the system 100 receives the input, the system 100 generates an input sequence 130 from the input image 102 and the text query 104.

[0040] As will be described in more detail below, the input sequence 130 is generally a sequence of embeddings in an embedding space that represents both the input image 102 and the text query 104.

[0041] The system 100 then processes the input sequence 130 using an entity decoder neural network 140 to generate an output sequence 150 that identifies a particular semantic code 160.

[0042] The entity decoder neural network 140 is a generative neural network that generates the output sequence 1 0. For example, the output sequence 150 can be a sequence of identifiers for semantic tokens and the entity decoder neural network can auto-regressively generate the sequence, one identifier after another.

[0043] The system 100 then maps, using the code data 120, the particular semantic code 160 to a particular database entity of the database entities. That is, the system identifies, in the code data 120, which database entity’ is associated with the particular semantic code 160.

[0044] The system 100 then provides, in response to the input, a visual entity' recognition output 162 that includes data indicating that the particular database entity is the entity referenced in the text query 104.

[0045] For example, the system 100 can provide the entity name of the particular database entity, the unique identifier for the particular database entity, or both, as the output of the visual entity recognition process.

[0046] FIG. IB shows an example 180 of an overview of the visual recognition process.

[0047] As shown in FIG. IB, upon receiving a request to perform visual entity recognition for a set of database entities, the system 100 first performs a semantic code generation process 182 to generate a respective semantic code for each database entity in the set.

[0048] As a simplified example, FIG. IB shows the code data 120 specilying respective semantic codes 122 for three entities. As shown in FIG. IB, the code data 120 specifies the semantic codes as sets of identifiers that identity’ the semantic tokens in the semantic code. For example, the entity having the name “American Black Duck’' has a semantic code that includes tokens with the identifiers 99, 18, and 31.

[0049] The system 100 then receives an image 102 of an entity on which visual entity recognition is to be performed and then uses the entity decoder neural network 140 to generate an output sequence 150 that includes a set of identifiers for semantic tokens. While not shown in FIG. IB, the input will generally also include a text query that specifies which entity is to be recognized in the input image. Examples of text queries can include “which animal is on the right of the photo” and “which animal is on the left of the photo.”

[0050] The system 100 can then map the identifiers in the output sequence 150, i.e., the identifiers 86, 5, and 3, to the entity having the name “black-and-white colobus.”

[0051] FIG. 2 is a flow diagram of an example process 200 for performing visual entity recognition. For convenience, the process 200 will be described as being performed by a system of one or more computers located in one or more locations. For example, a visual entity recognition system, e.g., the visual entity recognition system 100 depicted in FIG. 1A, appropriately programmed in accordance with this specification, can perform the process 200.

[0052] The system maintains code data specifying, for each of a plurality' of database entities, a semantic code that represents the database entity (step 202). As described above, each semantic code is a set of semantic tokens from a vocabulary of semantic tokens.

[0053] For example, each semantic token in the vocabulary can be represented by a respective identifier and the code data can associate, for each of the plurality of database entities, the database entity' with a set of identifiers that represent the semantic tokens in the semantic code that represents the database entity'. For example, the identifiers for the semantic tokens can be randomly assigned by the system or can be pre-determined by the text tokenizer used to generate the semantic tokens. As a particular example, the respective identifiers can be integers, so that each semantic token is represented by a different integer.

[0054] As a particular example, the semantic tokens for any given entity' can be text tokens generated by a text tokenizer, e.g., from an entity name for the entity. In particular, for each entity, the set of semantic tokens in the semantic code for the entity contains fewer text tokens than are generated by the text tokenizer by tokenizing the entity name for the entity.

[0055] The system obtains a visual entity recognition input that includes an input image and a text query' that references an entity represented in the input image (step 204).

[0056] The system generates an input sequence from the input image and the text query (step Generally, the input sequence includes image embeddings representing the input image and text embeddings representing the text query. For example, the input sequence can include the image embeddings followed by the text embeddings or the text embeddings followed by the image embeddings.

[0057] To generate the image embeddings, the system can process the input image using an image encoder neural network to generate one or more image embeddings representing the input image. The image encoder neural network can generally have any appropriate architecture that allows the image encoder neural network to map an image to a set of embeddings. For example, the image encoder neural network can be a convolutional neural network, e.g., a ResNet. As another example, the image encoder neural network can be a vision Transformer neural network. As yet another example, the image encoder neural network can be a neural network that includes both convolutional and self-attention layers.

[0058] To generate the text embeddings, the system can apply a text tokenizer to the text query to generate a sequence of text tokens and then map each text token to a respective text embedding. For example, the system can use the same text tokenizer used to generate the semantic codes or a different text tokenizer.

[0059] The system processes the input sequence using an entity decoder neural network to generate an output sequence that identifies a particular semantic code (step 208).

[0060] For example, the entity decoder neural network can be an auto-regressive neural network that is configured to process the input sequence to auto-regressively generate the output sequence. Examples of such neural networks include causally-masked, decoder-only Transformer neural networks, recurrent neural networks, and neural networks that include both causally-masked self-attention layers and recurrent layers.

[0061] More specifically, in some examples the entity decoder neural network can generate a given output sequence by, for any given output sequence, identifying, for any position that precedes the particular position in the given output sequence, a respective token embedding of the semantic token identified at the position in the output sequence.

[0062] The entity decoder neural network can then process a current input sequence that includes the input sequence and the token embeddings of the semantic tokens corresponding to any positions that precede the particular position in the output sequence to generate a score distribution over the vocabulary of semantic tokens.

[0063] In some cases, the system greedily decodes a single output sequence using the entity decoder neural network. In this case, once an output sequence if finalized, the system can determine whether the output sequence is valid, i.e., maps to one of the semantic codes in the code data, and, if not, re-generate a new output sequence, e.g., starting from the last valid prefix. Alternatively, the system can perform ' constrained sampling” to ensure that each token added to the output sequence results in a valid prefix for one or more of the codes in the code data.

[0064] In some other cases, the system can perform a beam search using the entity decoder neural network to generate the output sequence. That is, the system can maintain a ‘"beam” of multiple candidate output sequences that is updated at each generation step and, after the candidates in the beam have been finalized, select the highest-scoring candidate as the final output sequence. In these cases, if the highest-scoring candidate is not a valid output sequence because it does not correspond to any of the semantic codes in the code data, the system can select the next-highest-scoring candidate from the beam.

[0065] The system maps, using the code data, the particular semantic code to a particular database entity of the database entities (step 210).

[0066] The system provides, in response to the visual entity recognition input, data indicating that the particular database entity is the entity referenced in the text query (step 212).

[0067] Prior to performing visual entity recognition, the system or another training system trains the entity decoder neural network on training data.

[0068] For example, the system can obtain a training data set that includes (i) training images that depict database entities and (ii) for each training image, a ground truth label identifying the database entity depicted in the training image. The system can then generate a respective training example for each training image by mapping the ground truth label for the training image to a ground truth output sequence, i.e., a ground truth output sequence that includes the identifiers from the semantic code for the database entity identified by the ground truth label.

[0069] The system can then train the entity decoder neural network on the training examples, e.g., to minimize any appropriate language modeling loss. For example, the language modeling loss can be a next token prediction loss, e.g., a softmax cross-entropy loss, optionally with label smoothing or other regularization techniques.

[0070] The system can also train any of a variety of components jointly with the training of the entity decoder neural network.

[0071] For example, the system can learn the text embeddings during training of the entity decoder neural network by backpropagating gradients of the language modeling loss through the entity decoder neural network. As another example, the system can train the image encoder jointly during the training of the entity decoder neural network by backpropagating gradients of the language modeling loss through the entity decoder neural network.

[0072] As yet another example, the system can learn the token embeddings during training of the entity decoder neural network by backpropagating gradients of the language modeling loss through the entity decoder neural network.

[0073] Optionally, the training system can pre-train the entity decoder neural network prior to training the entity decoder neural network using semantic codes. For example, the system can pre-train the entity decoder neural network on a task that requires predicting natural language entity names for entities that are depicted in training images of a pre-training dataset. The pretraining dataset includes a plurality of images with respective entity names. In some examples, each training image is assigned a single entity in order to avoid instability. The number of training examples per entity can be varied to produce pre-training datasets of different sizes, e.g., the amount of retrieved examples ca be varied from k = 2 to k = 100 per entity.

[0074] FIG. 3 is a flow diagram of an example process 300 for generating a semantic code for a given entity'. For convenience, the process 300 will be described as being performed by a system of one or more computers located in one or more locations. For example, a visual entity recognition system, e.g., the visual entity recognition system 100 depicted in FIG. 1A. appropriately programmed in accordance with this specification, can perform the process 300.

[0075] The system can perform the process 300 for each entity in the set of database entities to generate a respective semantic code for each of the database entities.

[0076] The system identifies a name for the database entity (step 302). For example, the system can receive, as input, a respective entity name for each of the database entities. The name can be any text reference to the database entity and can be a single word or a multiword phrase, e.g., “Tower Bridge’' or “Nile River.”

[0077] The system tokenizes the entity name for the database entity into a plurality of text tokens (step 304). For example, as descnbed above, the system can apply a text tokenizer, e.g., SentencePiece or another appropriate tokenizer, to the entity name to generate the plurality of tokens. By generating the semantic codes from the tokens generated by a text tokenizer, semantically similar visual entities will generally have semantic codes that have some overlapping semantic tokens. This allows the decoder neural network to effectively learn relationships between related entities. The system then generates the semantic code for the database entity by selecting a subset of the plurality of text tokens (step 306). In particular, for each entity, the set of semantic tokens in the semantic code for the entity contains fewer text tokens than are generated by the text tokenizer by tokenizing the entity name for the entity.

[0078] In some examples, the system can maintain, for each of the text tokens in the vocabulary, a respective frequency of occurrence of the text tokens in tokenized entity names for the plurality of database entities. For example, the frequency of occurrence can be a count of the number of times the text token appears in an entity name for an entity or a count of the number of entity names in which the text token appears at least once.

[0079] The system can then select the subset of tokens using the frequencies of occurrence for the text tokens generated from the entity name.

[0080] For example, the system can select, from the plurality of text tokens, a specified number of least frequently occurring text tokens according to the frequencies of occurrence. That is, the system can rank the text tokens by frequency and then select a fixed number of tokens that are the least frequent according to the ranking. By using the least frequent tokens (instead of all of the tokens or the most frequent tokens), the system generates codes that are discriminative, i.e., compared to all other database entities, and compact, i.e., do not include an excessively large number of tokens. This makes the tokens significantly easier to learn for the model.

[0081] In some cases, using only the fixed number of least frequently occurring text tokens can result in multiple different entity’ names being mapped to the same semantic code. To account for this, the system can include, in the semantic code for the database entity7and in addition to the specified number of least frequently occurring text tokens, one or more additional tokens from the vocabulary that result in the semantic code for the database entity being unique from each other semantic code for each other database entity.

[0082] For example, the system can include in each semantic code one additional token that ensures the uniqueness of the semantic codes. As one example of this, the system can greedily assign the last code token to the next least frequent token of the tokenized entity name until the resulting code is different from all existing codes. If this still fails to create a unique code, the system can assign the token to a random token value from the vocabulary so that the resulting code is unique.

[0083] FIG. 4 shows an example 400 of generating a semantic code for a given database entity. As shown in the example 400, the system tokenizes 402 the entity name “Black-and- white colobus” for a given database entity into a plurality of text tokens 404 (“[black] [- ] [and] [-] [white] [col] [ob] [us]”).

[0084] The system then ranks 406 the text tokens by frequency, yielding the order [col] [ob] [white] [black] [us] [-][-] [and] and then selects 408 (“keeps”) the / .- I least frequent. In the example 400, L is equal to 4 and therefore the system selects [col] [ob] [white] as the semantic tokens in the semantic codes. Optionally, as described above, the system can then add one or more additional tokens to the code to ensure that the semantic code is unique.

[0085] The system can then map each semantic token to a respective identifier 410 and store the identifiers in association with data identifying the entity for later use in performing visual entity recognition.

[0086] FIG. 5 shows an example 500 of performing visual entity recognition.

[0087] As shown in the example 500, the system receives an input that includes an image 502 and a text sequence 504 (“what is the main object?”).

[0088] The system generates an input sequence 520 for the decoder neural network 140 by processing the image 502 using an image encoder neural network 510 to generate a set of image embeddings and tokenizing and embedding the text sequence 504 to generate a set of text embeddings.

[0089] The system then processes the input sequence 520 using the decoder neural network 140 to generate an output sequence 530 that, in the example 500, includes a sequence of token identifiers.

[0090] The system can then map the sequence of token identifiers to a particular database entity from the set of database entities using the code data, as described above.

[0091] This specification uses the term “configured” in connection with systems and computer program components. For a system of one or more computers to be configured to perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by data processing apparatus, cause the apparatus to perform the operations or actions.

[0092] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, e.g., one or more modules of computer program instructions encoded on a tangible non transitory storage medium for execution by, or to control the operation of, data processing apparatus. The computer storage medium can be a machine- readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus.

[0093] The term '‘data processing apparatus” refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can optionally include, in addition to hardware, code that creates an execution environment for computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0094] A computer program, which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network.

[0095] In this specification, the term "database” is used broadly to refer to any collection of data: the data does not need to be structured in any particular way, or structured at all, and it can be stored on storage devices in one or more locations. Thus, for example, the index database can include multiple collections of data, each of which may be organized and accessed differently.

[0096] Similarly, in this specification the term “engine” is used broadly to refer to a software-based system, subsystem, or process that is programmed to perform one or more specific functions. Generally, an engine will be implemented as one or more software modules or components, installed on one or more computers in one or more locations. In some cases, one or more computers will be dedicated to a particular engine; in other cases, multiple engines can be installed and running on the same computer or computers.

[0097] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and one or more programmed computers.

[0098] Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read only memory or a random access memory7or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memorydevices for storing instructions and data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry-. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few.

[0099] Computer readable media suitable for storing computer program instructions and data include all forms of non volatile memory, media and memory devices, including by way of example semiconductor memory- devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks.

[0100] To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user’s device in response to requests received from the web browser. Also, a computer can interact with a user by sending text messages or other forms of message to a personal device, e.g., a smartphone that is running a messaging application, and receiving responsive messages from the user in return.

[0101] Data processing apparatus for implementing machine learning models can also include, for example, special-purpose hardware accelerator units for processing common and compute-intensive parts of machine learning training or production, e.g., inference, workloads.

[0102] Machine learning models can be implemented and deployed using a machine learning framework, .e.g., a TensorFlow framework or a Jax framework.

[0103] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface, a web browser, or an app through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.

[0104] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data, e.g., an HTML page, to a user device, e.g.. for purposes of displaying data to and receiving user input from a user interacting with the device, which acts as a client. Data generated at the user device, e.g.. a result of the user interaction, can be received at the server from the device.

[0105] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially be claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

[0106] Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0107] Particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.

[0108] What is claimed is:

Claims

CLAIMS1. A method performed by one or more computers, the method comprising: maintaining code data specifying, for each of a plurality of database entities, a semantic code that represents the database entity, wherein each semantic code is a set of semantic tokens from a vocabulary of semantic tokens; obtaining a visual entity recognition input that comprises an input image and a text query that references an entity represented in the input image; generating an input sequence from the input image and the text query; processing the input sequence using an entity decoder neural network to generate an output sequence that identifies a particular semantic code; mapping, using the code data, the particular semantic code to a particular database entity of the database entities; and providing, in response to the visual entity recognition input, data indicating that the particular database entity is the entity referenced in the text query.

2. The method of claim 1, wherein each semantic token in the vocabulary is represented by a respective identifier and wherein the code data associates, for each of the plurality of database entities, the database entity with a set of identifiers that represent the semantic tokens in the semantic code that represents the database entity'.

3. The method of claim 2, wherein the respective identifiers are integers.

4. The method of any preceding claim, wherein the semantic tokens are text tokens generated by a text tokenizer.

5. The method of claim 4, further comprising, for each of the plurality of database entities, generating the semantic code that represents the database entity from an entity7name for the database entity7.

6. The method of claim 4, wherein, for each of the plurality of database entities, the semantic code that represents the database entity has been generated from an entity7name for the database entity.

7. The method of claim 5 or 6, wherein generating the semantic code that represents the database entity from an entity name for the database entity comprises: tokenizing the entity name for the database entity into a plurality of text tokens; and generating the semantic code for the database entity, comprising selecting a subset of the plurality of text tokens.

8. The method of claim 7, wherein generating the semantic code for the database entity comprises: selecting, from the plurality of text tokens, a specified number of least frequently occurring text tokens according to a frequency of occurrence of the text tokens in tokenized entity names for the plurality of database entities.

9. The method of claim 8, wherein generating the semantic code further comprises: including, in the semantic code for the database entity and in addition to the specified number of least frequently occurring text tokens, one or more additional tokens from the vocabulary that result in the semantic code for the database entity being unique from each other semantic code for each other database entity.

10. The method of any preceding claim, wherein generating an input sequence from the input image and the text query comprises: processing the input image using an image encoder neural network to generate one or more image embeddings representing the input image; and generating a sequence of text embeddings representing the text query, wherein the input sequence includes the image embeddings and the text embeddings.

11. The method of claim 10, wherein generating a sequence of text embeddings representing the text query comprises: applying a text tokenizer to the text query to generate a sequence of text tokens; and mapping each text token to a respective text embedding.

12. The method of any preceding claim, wherein the entity decoder neural network is configured to process the input sequence to auto-regressively generate the output sequence by, for each particular position in the output sequence: identify ing, for any position that precedes the particular position in the output sequence, a token embedding of a semantic token identified at the position in the output sequence; and processing a current input sequence that comprises the input sequence and the token embeddings of the semantic tokens corresponding to any position that precedes the particular position in the output sequence to generate a score distribution over the vocabulary' of semantic tokens.

13. The method of claim 12, wherein the entity decoder neural network is causally - masked Transformer neural network.

14. The method of claim 12 or claim 13. wherein processing the input sequence using an entity' decoder neural network to generate an output sequence that identifies a particular semantic code comprises performing a beam search using the entity' decoder neural network to generate the output sequence.

15. The method of any preceding claim, when dependent on claim 11 wherein the text embeddings are learned during training of the entity7decoder neural network.

16. The method of any preceding claim, when dependent on claim 10, wherein the image encoder is trained jointly with the entity decoder neural network.

17. The method of any preceding claim, when dependent on claim 12, wherein the token embeddings are learned during the training of the entity decoder neural network.

18. The method of any preceding claim, wherein the semantic tokens are text tokens generated by a text tokenizer and wherein, for each entity, the set of semantic tokens in the semantic code for the entity contains fewer text tokens than are generated by the text tokenizer by tokenizing an entity name for the entity.

19. A system comprising: one or more computers; and one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform the respective operations of the method of any one of claims 1-18.

20. One or more computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform the respective operations of the method of any one of claims 1-18.

Citation Information

Patent Citations

  • Medical visual question answering

    US20220130499A1

  • Visually Guided Machine-learning Language Model

    US20230185844A1

Cited By

  • Generative semantic communication system for 3D content generation

    CN121547151A