# US 2023/0267367 A1 · Distance-based pair loss for collaborative filtering

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

- Number: US 2023/0267367 A1
- Document ID: US20230267367A1
- Status: Published application
- Kind: A1
- Application number: 17/969,238
- Filed: 2022-10-19
- Published: 2023-08-24
- Earliest claimed: 2021-10-21
- Assignees: The Toronto-Dominion Bank
- Applicants: The Toronto-Dominion Bank
- Inventors: Maksims Volkovs; Zhaoyue Cheng; Juan Felipe Perez Vallejo; Jianing Sun; Zhaolin Gao
- Web page: https://patentgrep.com/patent/US20230267367A1

## CPC

- G06N 3/042: Knowledge-based neural networks; Logical representations of neural networks
- G06N 20/00: Machine learning
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/098: Distributed learning, e.g. federated learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A recommendation system generates item recommendations for a user based on a distance between a user embedding and item embeddings. To train the item and user embeddings, the recommendation system user-item pairs as training data to focus on difficult items based on the positive and negative items with respect to individual users in the training set. In training, the weight of individual user-item pairs in affecting the user and item embeddings may be determined based on the distance of the particular user-item pair between user embedding and item embedding, as well as the comparative distance for other items of the same type for that user and for the distance of user-item pairs for other users, which may regulate the distances across types and across the training batch.

## Claims

### Claim 1

A system for training a set of user embeddings and a set of item embeddings for user-item recommendation, comprising:
a processor that executes instructions;
a non-transitory computer-readable medium having instructions executable by the processor for:
identifying a training set of user-item pairs for a respective user of a set of users with respect to a respective item of a set of items, the user-item pairs including positive user-item pairs labeled with a positive interaction type and negative user-item pairs labeled with a negative interaction type;
determining, for each user-item pair in the training set of user-item pairs, a distance between a user embedding, of a plurality of user embeddings, associated with the respective user and an item embedding, of a plurality of item embeddings, associated with the respective item;
determining a weight for each user-item pair in the training set of user-item pairs based on the distance of the user-item pair and the distance of at least one other user-item pair labeled with the same interaction type; and
training the plurality of user embeddings and the plurality of item embeddings based on the training set of user-item pairs and determined weight of each user-item pair.

### Claim 2 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance for the user-item pair increases.

### Claim 3 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance is relatively high compared to other positive interactions for the same user.

### Claim 4 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance is relatively high compared to other positive interactions for different users.

### Claim 5 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance for the user-item pair decreases.

### Claim 6 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance is relatively low compared to other negative interactions for the same user.

### Claim 7 (depends on 1)

The system of claim 1, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance is relatively low compared to other negative interactions for different users.

### Claim 8 (depends on 1)

The system of claim 1, wherein the instructions are further executable for identifying the training set of user-item pairs, including identifying a user-item pair having the negative interaction type with a minimum distance to a user and selecting user-item pairs having the positive interaction type for the training set that are within a threshold distance of the minimum distance.

### Claim 9 (depends on 1)

The system of claim 1, wherein the instructions are further executable for identifying the training set of user-item pairs, including identifying a user-item pair having the positive interaction type with a maximum distance to a user and selecting user-item pairs having the negative interaction type for the training set that are within a threshold distance of the maximum distance.

### Claim 10 (depends on 1)

The system of claim 1, wherein the instructions are further executable for training the plurality of user embeddings and the plurality of item embeddings includes training parameters of a recommendation model.

### Claim 11

A method for training a set of user embeddings and a set of item embeddings for user-item recommendation, comprising:
identifying a training set of user-item pairs for a respective user of a set of users with respect to a respective item of a set of items, the user-item pairs including positive user-item pairs labeled with a positive interaction type and negative user-item pairs labeled with a negative interaction type;
determining, for each user-item pair in the training set of user-item pairs, a distance between a user embedding, of a plurality of user embeddings, associated with the respective user and an item embedding, of a plurality of item embeddings, associated with the respective item;
determining a weight for each user-item pair in the training set of user-item pairs based on the distance of the user-item pair and the distance of at least one other user-item pair labeled with the same interaction type; and
training the plurality of user embeddings and the plurality of item embeddings based on the training set of user-item pairs and determined weight of each user-item pair.

### Claim 12 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance for the user-item pair increases.

### Claim 13 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance is relatively high compared to other positive interactions for the same user.

### Claim 14 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a positive interaction when the distance is relatively high compared to other positive interactions for different users.

### Claim 15 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance for the user-item pair decreases.

### Claim 16 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance is relatively low compared to other negative interactions for the same user.

### Claim 17 (depends on 11)

The method of claim 11, wherein the weight for a user-item pair has a component that increases for a negative interaction when the distance is relatively low compared to other negative interactions for different users.

### Claim 18 (depends on 11)

The method of claim 11, wherein identifying the training set of user-item pairs includes identifying a user-item pair having the negative interaction type with a minimum distance to a user and selecting user-item pairs having the positive interaction type for the training set that are within a threshold distance of the minimum distance.

### Claim 19 (depends on 11)

The method of claim 11, wherein identifying the training set of user-item pairs includes identifying a user-item pair having the positive interaction type with a maximum distance to a user and selecting user-item pairs having the negative interaction type for the training set that are within a threshold distance of the maximum distance.

### Claim 20 (depends on 11)

The method of claim 11, wherein training the plurality of user embeddings and the plurality of item embeddings includes training parameters of a recommendation model.
