IP Library Granted Patent US 12,475,357
Granted Patent B2
US 12,475,357 · App. 17/342,356 · Granted Nov 18, 2025

Dynamic utility functions for inference in machine-learned models

Inventor: Jeffrey William Pasternack (Fremont, CA)
Assignee: Microsoft Technology Licensing, LLC
G06N3/045G06F16/9538G06N5/04G06N20/00
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,475,357
App. No.
17/342,356
Granted
Nov 18, 2025
Kind
B2
Abstract

In an example embodiment, a technique is presented that accesses training data that includes information about items, queries for items, and labels for the combinations of items and queries. The labels may correspond to different events, and there may be multiple different labels for the same combination of item and query. A machine learned model is then trained to learn a function for embedding each item to which a label pertains and a function for embedding each query to which a label pertains. Then, for each item in the training data, the items are embedded using the machine learned model, and the item embeddings for the item are concatenated into a single item embedding. At inference time, a similar concatenation is performed for multiple query embeddings. The concatenated embeddings are then used as input to an approximate k-nearest neighbor search function.

Claims (50)

1 . A system for training and using a machine learned model, comprising:

a processor and memory configured to:

access training data including information about items, information about queries for items, and a plurality of labels for each combination of query and item;

train a machine learned model, the training including learning, for each label in the plurality of labels, a function for embedding each item to which the label pertains, and a function for embedding each query to which the label pertains;

for each item in the training data:

embed the item into a plurality of item embeddings using the trained machine learned model;

concatenate the plurality of item embeddings for the item into a concatenated item embedding;

at inference time:

receive a first query;

embed the first query into a plurality of first query embeddings using the trained machine learned model; and

concatenate the plurality of first query embeddings into a concatenated query embedding, by multiplying each first query embedding by a weight assigned specifically to a corresponding label, as defined in a utility function;

modify the concatenated query embedding based on an aggregation of the concatenated query embedding and one or more concatenated query embeddings of users other than a user corresponding to the first query; and

perform a k-nearest neighbor search function to obtain the concatenated query embedding and one or more concatenated item embeddings and calculate a set of items that the k-nearest neighbor search function has determined to be highest scoring.

2 . The system of claim 1 , wherein the processor is further configured to perform the embedding of the item and the concatenating of the plurality of item embeddings for one or more items not in the training data.

3 . The system of claim 1 , wherein the one or more concatenated query embeddings of users other than a user corresponding to the first query are weighted in the aggregation based on degree of connectedness between each corresponding user and the user corresponding to the first query.

4 . The system of claim 1 , wherein the machine learned model is a deep neural network.

5 . The system of claim 4 , wherein the deep neural network is a two-towers neural network.

6 . The system of claim 5 , wherein the two-towers neural network has a first neural network corresponding to queries and a second neural network corresponding to items.

7 . The system of claim 1 , wherein each item is a feed item and the calculated set of items are included in a display of feed items in a graphical user interface.

8 . A computer-implemented method comprising:

accessing training data including information about items, information about queries for items, and a plurality of labels for each combination of query and item;

training a machine learned model, the training including learning, for each label in the plurality of labels, a function for embedding each item to which the label pertains, and a function for embedding each query to which the label pertains;

for each item in the training data:

embedding the item into a plurality of item embeddings using the trained machine learned model;

concatenating the plurality of item embeddings for the item into a concatenated item embedding;

at inference time:

receiving a first query;

embedding the first query into a plurality of first query embeddings using the trained machine learned model;

concatenating the plurality of first query embeddings into a first concatenated query embedding, by multiplying each first query embedding by a weight assigned specifically to a corresponding label, as defined in a utility function;

modifying the first concatenated query embedding based on an aggregation of the first concatenated query embedding and one or more concatenated query embeddings of users other than a user corresponding to the first query; and

feeding the first concatenated query embedding and a plurality of item embeddings into an approximate k-nearest neighbor search function, the approximate k-nearest neighbor search function calculating a set of items that the k-nearest neighbor search function has determined to be highest scoring.

9 . The method of claim 8 , further comprising performing the embedding of the item and the concatenating of the plurality of item embeddings for one or more items not in the training data.

10 . The method of claim 8 , wherein the one or more concatenated query embeddings of users other than a user corresponding to the first query are weighted in the aggregation based on degree of connectedness between each corresponding user and the user corresponding to the first query.

11 . The method of claim 8 , wherein the machine learned model is a deep neural network.

12 . The method of claim 11 , wherein the deep neural network is a two-towers neural network.

13 . The method of claim 12 , wherein the two-towers neural network has a first neural network corresponding to queries and a second neural network corresponding to items.

14 . The method of claim 8 , wherein each item is a feed item and the calculated set of items are included in a display of feed items in a graphical user interface.

15 . A non-transitory machine-readable storage medium comprising instructions which, when implemented by one or more machines, cause the one or more machines to perform operations comprising:

accessing training data including information about items, information about queries for items, and a plurality of labels for each combination of query and item;

training a machine learned model, the training including learning, for each label in the plurality of labels, a function for embedding each item to which the label pertains, and a function for embedding each query to which the label pertains;

for each item in the training data:

embedding the item into a plurality of item embeddings using the trained machine learned model;

concatenating the plurality of item embeddings for the item into a concatenated item embedding;

at inference time:

receiving a first query;

embedding the first query into a plurality of first query embeddings using the trained machine learned model;

concatenating the plurality of first query embeddings into a first concatenated query embedding, by multiplying each first query embedding by a weight assigned specifically to a corresponding label, as defined in a utility function;

modifying the first concatenated query embedding based on an aggregation of the first concatenated query embedding and one or more concatenated query embeddings of users other than a user corresponding to the first query; and

feeding the first concatenated query embedding and a plurality of item embeddings into an approximate k-nearest neighbor search function, the approximate k-nearest neighbor search function calculating a set of items that the k-nearest neighbor search function has determined to be highest scoring.

16 . The non-transitory machine-readable storage of claim 15 , wherein the operations further comprise performing the embedding of the item and the concatenating of the plurality of item embeddings for one or more items not in the training data.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 8, 2021
From: PASTERNACK, JEFFREY W
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 056474/0017 →
Continuity (1)
Related Publication 20220391671A1 · Dec 8, 2022
References Cited (21)
US 11163845B2 · Liu · 2021 [cited by examiner]
US 11244015B1 · Zhuang · 2022 [cited by examiner]
US 11443202B2 · Joglekar · 2022 [cited by examiner]
US 11682060B2 · Chaidaroon · 2023 [cited by examiner]
US 20070203908A1 · Wang · 2007 [cited by examiner]
US 20110029517A1 · Ji · 2011 [cited by examiner]
US 20190188295A1 · Sirotkovic · 2019 [cited by examiner]
US 20190378048A1 · Shrivastava · 2019 [cited by examiner]
US 20200004835A1 · Ramanath · 2020 [cited by examiner]
US 20200004886A1 · Ramanath · 2020 [cited by examiner]
US 20200005134A1 · Ramanath · 2020 [cited by examiner]
US 20210110208A1 · Ahmadvand · 2021 [cited by examiner]
US 20210312134A1 · Creed · 2021 [cited by examiner]
US 20210312237A1 · Duan · 2021 [cited by examiner]
US 20220335066A1 · Hedayati · 2022 [cited by examiner]
US 20220391435A1 · Xie · 2022 [cited by examiner]
US 20250021792A1 · Hsieh · 2025 [cited by examiner]
WO WO2019113257A1 · 2019 [cited by examiner]
WO WO2021221828A1 · 2021 [cited by examiner]
Li et al., “Deep Interest-Shifting Network with Meta-Embeddings for Fresh Item Recommendation”, Oct. 28, 2020, Wiley, pp. 1-13 (Year: 2020). [cited by examiner]
Li et al., “From Semantic Retrieval to Pairwise Ranking: Applying Deep Learning in E-Commerce Search”, Jul. 25, 2019, SIGIR 2019, pp. 1383-1384. (Year: 2019). [cited by examiner]