IP Library Granted Patent US 11,704,558
Granted Patent B2
US 11,704,558 · App. 16/880,191 · Granted Jul 18, 2023

Method of and system for training machine learning algorithm for object classification

Inventors: Xiang Zhang (Montreal, CA); Alexandre Drouin (Montreal, CA)
Assignee: SERVICENOW CANADA INC.
G06N3/08G06N3/04
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 11,704,558
App. No.
16/880,191
Granted
Jul 18, 2023
Kind
B2
Abstract

A method and a system for training a machine learning algorithm (MLA) for object classification. The machine learning algorithm includes an embedding layer and a classification layer. A set of embedding indices representing a reference object is received. The set of embedding indices has been generated based on a byte representation of the reference object. A label associated with the reference object indicative of a reference class the objects belongs to is received. The MLA is iteratively trained to classify objects by embedding the set of embedding indices to obtain an input vector and by predicting an estimated class based on the input vector, and updating a parameter of at least one of the embedding layer and the updated embedding layer. The set of embedding indices is generated by parsing the byte representation to obtain byte n-grams and by applying a hash function on the byte n-grams.

Claims (83)

1. A method for training a machine learning algorithm (MLA) for object classification, the method being executed by a processor, the processor having access to the MLA, the method comprising:

receiving a set of embedding indices being associated with a reference object belonging to a reference class, the set of embedding indices having been generated by using a hash function on a byte sequence representing the reference object;

receiving a label indicative of the reference class associated with the reference object;

training the MLA for object classification, said training comprising:

embedding, using an embedding layer of the MLA, the set of embedding indices to obtain an input vector representing the reference object;

predicting, using a classification layer of the MLA, an estimated class for the reference object based on the input vector;

updating, based on the estimated class and the reference class, at least one of:

the classification layer to obtain an updated classification layer, and

the embedding layer to obtain an updated embedding layer; and outputting the trained MLA.

2. The method of claim 1 , further comprising prior to said receiving the set of embedding indices:

receiving a byte sequence representing the reference object associated with the set of embedding indices; and

generating, based on the byte sequence, the set of embedding indices.

3. The method of claim 2 , wherein said generating the set of embedding indices comprises:

parsing the byte sequence to obtain a set of byte chunks; and

applying a hash function on the set of byte chunks to obtain the set of embedding indices.

4. The method of claim 3 , wherein said parsing the byte sequence to obtain the set of byte chunks comprises iterating, based on a predetermined length, over the byte sequence to obtain the set of byte chunks.

5. The method of claim 3 , further comprising, prior to said parsing the byte sequence to obtain the set of byte chunks compressing the byte sequence to obtain a compressed byte sequence, wherein said parsing the byte sequence to obtain the set of byte chunks comprises parsing the compressed byte sequence to obtain the set of byte chunks.

6. The method of claim 1 , wherein:

the set of embedding indices comprises a first subset of embedding indices and a second subset of embedding indices; and

said embedding, using the embedding layer of the MLA, the set of embedding indices to obtain the input vector representing the reference object comprises:

embedding the first subset of embedding indices to obtain a first vector and embedding the second subset of embedding indices to obtain a second vector; and

combining the first vector and the second vector to obtain the input vector.

7. The method of claim 6 , wherein said receiving the subset of embedding indices comprising the first subset of embedding indices and the second subset of embedding indices comprises:

receiving a first set of weights associated with the first subset of indices, and receiving a second set of weights associated with the second subset of indices; and wherein

said combining the first vector and the second vector to obtain the input vector comprises:

weighting the first vector by the first set of weights to obtain a first weighted vector,

weighting the second vector by the second set of weights to obtain a second weighted vector, and

combining the first weighted vector and the second weighted vector to obtain the input vector.

8. The method of claim 1 , wherein:

the embedding layer executes an embedding matrix;

the classification layer executes a classification matrix; and

said updating, based on the estimated class and the reference class, the at least one of the classification layer to obtain the updated classification layer and the embedding layer to obtain the updated embedding layer comprises:

updating at least one parameter of the embedding matrix to obtain an updated embedding matrix, and updating at least one parameter of the classification matrix to obtain an updated classification matrix, respectively.

9. The method of claim 1 , wherein said training the MLA for object classification is performed using stochastic gradient descent and back-propagation.

10. The method of claim 1 , wherein said training the MLA for object classification comprises performing universum sampling.

11. The method of claim 1 , wherein the reference object comprises one of: at least a portion of a genome, at least one character, and at least a portion of an image.

12. The method of claim 1 , further comprising, prior to said outputting the trained MLA:

receiving a plurality of sets of embedding indices, each one of the plurality of sets of embedding indices being associated with a respective reference object belonging to a respective reference class;

receiving, for each respective reference object, a respective label indicative of the respective reference class associated with the respective reference object; and

training the MLA iteratively on each one of the plurality of sets of embedding indices and the respective label.

13. A method for predicting an estimated class for a further object using the trained MLA of claim 1 , the method comprising:

receiving a further byte sequence representing the further object, the trained MLA not having been trained on the further object;

generating, based on the further byte sequence, a further set of embedding indices associated with the further object;

embedding, using the updated embedding layer of the trained MLA, the further set of embedding indices to obtain a further input vector; and

predicting, using the updated classification layer of the trained MLA, based on the further input vector, the estimated class for the further object.

14. A method for predicting an estimated class of an object, the method being executed by a processor, the processor having access to a machine learning algorithm (MLA) having been trained to classify objects, the MLA comprising an embedding layer and a classification layer, the method comprising:

receiving a byte sequence representation of the object;

generating, based on the byte representation, using a hash function, a set of embedding indices associated with the object;

embedding, using the embedding layer of the MLA, the set of embedding indices to obtain an input vector representing the object;

predicting, using a classification layer of the MLA, the estimated class for the object based on the input vector; and

outputting the estimated class.

15. A system for training a machine learning algorithm (MLA) for object classification, the system comprising:

a processor; and

a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer readable instructions;

the processor having access to the MLA, the processor, upon executing the computer readable instructions, being configured for:

receiving a set of embedding indices being associated with a reference object belonging to a reference class the set of embedding indices having been generated by using a hash function on a byte sequence representing the reference object;

receiving a label indicative of the reference class associated with the reference object;

training the MLA for object classification, said training comprising:

embedding, using an embedding layer of the MLA, the set of embedding indices to obtain an input vector representing the reference object;

predicting, using a classification layer of the MLA, an estimated class for the reference object based on the input vector;

updating, based on the estimated class and the reference class, at least one of:

the classification layer to obtain an updated classification layer, and

the embedding layer to obtain an updated embedding layer; and

outputting the trained MLA.

16. The system of claim 15 , wherein the processor is further configured for, prior to said receiving the set of embedding indices:

receiving a byte sequence representing the reference object associated with the set of embedding indices; and

generating, based on the byte sequence, the set of embedding indices.

17. The system of claim 16 , wherein said generating the set of embedding indices comprises:

parsing the byte sequence to obtain a set of byte chunks; and

applying a hash function on the set of byte chunks to obtain the set of embedding indices.

18. The system of claim 17 ,

wherein the processor is further configured for, prior to said parsing the byte sequence to obtain the set of byte chunks:

compressing the byte sequence to obtain a compressed byte sequence; and wherein

said parsing the byte sequence to obtain the set of byte chunks comprises parsing the compressed byte sequence to obtain the set of byte chunks.

19. The system of claim 15 , wherein the processor is further configured for, prior to said outputting the trained MLA:

receiving a plurality of sets of embedding indices, each one of the plurality of sets of embedding indices being associated with a respective reference object belonging to a respective reference class;

receiving, for each respective reference object, a respective label indicative of the respective reference class associated with the respective reference object; and

training the MLA iteratively on each one of the plurality of sets of embedding indices and the respective label.

20. A system for predicting an estimated class for a further object using the trained MLA of claim 15 , the processor being configured for:

receiving a further byte sequence representing the further object, the trained MLA not having been trained on the further object;

generating, based on the further byte sequence, a further set of embedding indices associated with the further object;

embedding, using the updated embedding layer of the trained MLA, the further set of embedding indices to obtain a further input vector; and

predicting, using the updated classification layer of the trained MLA, based on the further input vector, the estimated class for the further object.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 26, 2025
From: SERVICENOW CANADA INC.
To: SERVICENOW, INC.
Reel/Frame 070644/0956 →
MERGER Recorded Jan 27, 2022
From: ELEMENT AI INC.
To: SERVICENOW CANADA INC.
Reel/Frame 058887/0060 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 1, 2020
From: ZHANG, XIANG; DROUIN, ALEXANDRE
To: ELEMENT AI INC.
Reel/Frame 053949/0995 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 1, 2020
From: ZHANG, XIANG; DROUIN, ALEXANDRE
To: ELEMENT AI INC.
Reel/Frame 053951/0345 →
Continuity (1)
Related Publication 20210365772A1 · Nov 25, 2021