# US 10,872,087 B2 · Systems and methods for stochastic generative hashing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,872,087 B2
- Document ID: US10872087B2
- Status: Granted
- Kind: B2
- Application number: 15/783,685
- Filed: 2017-10-13
- Published: 2019-04-18
- Granted: 2020-12-22
- Earliest claimed: 2017-10-13
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Ruiqi Guo; Bo Dai; Sanjiv Kumar
- Web page: https://patentgrep.com/patent/US10872087B2

## CPC

- G06F 16/24554: {Unary operations; Data partitioning operations}
- G06F 16/2255: {Hash tables}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/0475: Generative networks
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06N 20/00: Machine learning
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure provides systems and methods that perform stochastic generative hashing. According to one example aspect, a machine-learned hashing model that generates a binary hash for an input can be trained in conjunction with a machine-learned generative model that reconstructs the input from the binary hash. The present disclosure provides a novel generative approach to learn hash functions through Minimum Description Length principle such that the learned hash codes maximally compress the dataset. According to another example aspect, the present disclosure provides an efficient learning algorithm based on the stochastic distributional gradient, which avoids the notorious difficulty caused by binary output constraints, to jointly optimize the parameters of the hashing model and the associated generative model. The present disclosure also provides extensive experiments which show that the systems and methods described herein achieve better retrieval results than the existing state-of-the-art methods.

## Claims

### Claim 1

A computer system for learning to produce compressed binary hashes comprising:
a machine-learned hashing model configured to receive an input and, in response, output a binary hash for the input, wherein the binary hash comprises a compressed representation of the input, wherein the binary hash further comprises a binary value for each of a plurality of binary variables;
a machine-learned generative model configured to receive the binary hash and, in response, output a reconstruction of the input;
one or more processors; and
one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the computer system to perform operations, the operations comprising:
obtaining the input;
inputting the input into the machine-learned hashing model to receive the binary hash for the input;
inputting the binary hash into the machine-learned generative model to receive the reconstruction of the input;
evaluating an objective function based on at least one of the binary hash and the reconstruction of the input, wherein the objective function comprises a description length term that penalizes a description length of the binary hash; and
training at least the machine-learned hashing model based at least in part on the objective function.

### Claim 2 (depends on 1)

The computer system of claim 1, wherein the objective function does not include the plurality of binary variables as parameters.

### Claim 3 (depends on 1)

The computer system of claim 1, wherein the objective function comprises a plurality of stochastic neurons that reparameterize the plurality of binary variables.

### Claim 4 (depends on 1)

The computer system of claim 1, wherein training at least the machine-learned hashing model based at least in part on the objective function comprises performing distributional stochastic gradient descent to optimize the objective function.

### Claim 5 (depends on 1)

The computer system of claim 1, wherein training at least the machine-learned hashing model based at least in part on the objective function comprises optimizing one or more distributions of the plurality of binary variables.

### Claim 6 (depends on 1)

The computer system of claim 1, wherein training at least the machine-learned hashing model based at least in part on the objective function comprises backpropagating the objective function through the machine-learned hashing model using one or more stochastic gradient estimators.

### Claim 7 (depends on 1)

The computer system of claim 1, wherein the machine-learned hashing model comprises a machine-learned linear projection model that generates a linear projection of the input.

### Claim 8 (depends on 7)

The computer system of claim 7, wherein the machine-learned hashing model further comprises one or more machine-learned non-linear layers that receive the linear projection of the input and, in response, generate the binary hash for the input.

### Claim 9 (depends on 1)

The computer system of claim 1, wherein the machine-learned hashing model comprises a machine-learned neural network.

### Claim 10 (depends on 1)

The computer system of claim 1, wherein the machine-learned generative model comprises a machine-learned Gaussian model.

### Claim 11 (depends on 1)

The computer system of claim 1, wherein the machine-learned generative model comprises a machine-learned restricted Markov Random Fields model.

### Claim 12 (depends on 1)

The computer system of claim 1, wherein the machine-learned generative model comprises a machine-learned neural network.

### Claim 13 (depends on 1)

The computer system of claim 1, wherein the operations further comprise:
employing the machine-learned hashing model to generate a query binary hash for a query;
performing a search for similar items by comparing the query binary hash to a plurality of item binary hashes.

### Claim 14

A computer-implemented method for learning to produce compressed binary hashes, the method comprising:
obtaining, by one or more computing devices, an input;
inputting, by the one or more computing devices, the input into a machine-learned hashing model;
receiving, by the one or more computing devices, a binary hash for the input as an output of the machine-learned hashing model, wherein the binary hash comprises a compressed representation of the input;
inputting, by the one or more computing devices, the binary hash into a machine-learned generative model;
receiving, by the one or more computing devices, a reconstruction of the input as an output of the machine-learned generative model;
evaluating, by the one or more computing devices, an objective function based on at least one of the binary hash and the reconstruction of the input to obtain an objective value, wherein the objective function comprises a description length term that penalizes a description length of the binary hash; and
adjusting, by the one or more computing devices, one or more parameters of the machine-learned hashing model to improve the objective value.

### Claim 15 (depends on 14)

The computer-implemented method of claim 14, wherein the objective function comprises a plurality of stochastic neurons that reparameterize a plurality of binary variables.

### Claim 16 (depends on 14)

The computer-implemented method of claim 14, wherein adjusting, by the one or more computing devices, one or more parameters of the machine-learned hashing model comprises performing, by the one or more computing devices, distributional stochastic gradient descent to optimize the objective function.

### Claim 17 (depends on 14)

The computer-implemented method of claim 14, wherein adjusting, by the one or more computing devices, one or more parameters of the machine-learned hashing model comprises optimizing, by the one or more computing devices, one or more distributions of a plurality of binary variables.

### Claim 18 (depends on 14)

The computer-implemented method of claim 14, wherein adjusting, by the one or more computing devices, one or more parameters of the machine-learned hashing model comprises backpropagating, by the one or more computing devices, the objective function through the machine-learned hashing model using one or more stochastic gradient estimators.

### Claim 19

A computer system for learning to produce compressed binary hashes comprising:
a machine-learned hashing model configured to receive an input and, in response, output a binary hash for the input, wherein the binary hash comprises a compressed representation of the input, wherein the binary hash further comprises a binary value for each of a plurality of binary variables, wherein the machine-learned hashing model has been trained based at least in part on an objective function that evaluates the binary hash or a reconstruction of the input provided by a machine-learned generative model in response to receipt of the binary hash, wherein the objective function comprises a description length term that penalizes a description length of the binary hash, and wherein the objective function further comprises a plurality of stochastic neurons that reparameterize the plurality of binary variables;
one or more processors;
a database that stores item binary hashes for a plurality of items;
one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the computer system to perform operations, the operations comprising:
obtaining a query;
inputting the query into the machine-learned hashing model;
receiving a query binary hash as an output of the machine-learned hashing model; and
identifying one or more similar items from the plurality of items based at least on part on a comparison of the query binary hash to one or more of the item binary hashes.
