IP Library › Granted Patent US 12,333,399
Granted Patent B2
US 12,333,399 · App. 17/348,294 · Granted Jun 17, 2025

Anomaly detection using machine learning models and similarity regularization

Inventors: Michael Imas (Purchase, NY); Ryan Saxe (Purchase, NY)
Assignee: PepsiCo, Inc.
G06N20/20G06F18/22
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,333,399
App. No.
17/348,294
Granted
Jun 17, 2025
Kind
B2
Abstract

Disclosed herein are embodiments for anomaly detection using machine learning models (MLMs) and similarity regularization. An embodiment operates by obtaining data for a first product, a second product, and a target product. The data include a set of sparse data points for the target product. Next, similarity scores between the target product and the first product and the second product may be calculated. The embodiment further operates by generating a target MLM associated with the target product using a regularization penalty. The regularization penalty is based on the similarity scores and distances between a target set of coefficients for the target MLM and coefficients for a first MLM and a second MLM associated with the first product and the second product, respectively. The embodiment may then detect an anomaly associated with the target product by feeding the target MLM with a feature vector associated with the target product.

Claims (70)

1. A method for anomaly detection using machine learning models and similarity regularization, comprising:

storing, by at least one processor, a plurality of data points for a plurality of products comprising a first product, a second product, and a target product in a memory, wherein the plurality of data points comprises a sparse set of data points for the target product;

calculating, by the at least one processor, in response to an indication from a trained machine learning (ML) model associated with the first product that a target ML model evaluation for the target product failed to detect an anomaly for the target product, a first similarity score between the first product and the target product and a second similarity score between the second product and the target product;

calibrating, by the at least one processor and in response to the sparse set of data points, the target ML model using a regularization penalty that is based on:

the first similarity score and the second similarity score,

a first distance between a first set of coefficients for the trained ML and a target set of coefficients for the target ML model, and

a second distance between a second set of coefficients for another trained ML model associated with the second product and the target set of coefficients; and

receiving, by the at least one processor, based on feeding a feature vector associated with the target product into the target ML model, an indication that the target ML model detected the anomaly for the target product.

2. The method of claim 1 , wherein the first product, the second product, and the target product are consumer packaged goods (CPGs).

3. The method of claim 1 , wherein the first product, the second product, and the target product are medical devices, and wherein the anomaly is failure of the target product.

4. The method of claim 1 , wherein calculating the first similarity score comprises:

calculating, by the at least one processor, a first cosine similarity between an embedding for the first product and an embedding for the target product;

comparing the first cosine similarity with a similarity threshold; and

in response to the first cosine similarity exceeding the similarity threshold, determining the first product and the target product are similar and setting the first similarity score to 1.

5. The method of claim 4 , wherein calculating the second similarity score comprises:

calculating, by the at least one processor, a second cosine similarity between an embedding for the second product and the embedding for the target product;

comparing the second cosine similarity with the similarity threshold; and

in response to the second cosine similarity falling below the similarity threshold, determining the second product and the target product are dissimilar and setting the second similarity score to 0.

6. The method of claim 1 , wherein the regularization penalty comprises:

a sum of at least a first contrastive loss function associated with the first distance and a second contrastive loss function associated with the second distance.

7. The method of claim 6 , wherein the first contrastive loss function comprises:

a product of Z T,1 d({right arrow over (β)} T , {right arrow over (β)} 1 ), wherein Z T,1 is the first similarity score between the first product and the target product, and wherein d({right arrow over (β)} T , {right arrow over (β)} 1 ) is the first distance.

8. The method of claim 6 , wherein the second contrastive loss function comprises:

a product of (1−Z T,2 )max {0,m−d({right arrow over (β)} T , {right arrow over (β)} 2 )}, wherein Z T,2 is the second similarity score between the second product and the target product, wherein d({right arrow over (β)} T , {right arrow over (β)} 2 ) is the second distance, and wherein m is a minimum margin parameter.

9. A system for anomaly detection using machine learning models and similarity regularization, comprising:

a memory; and

at least one processor coupled to the memory and configured to:

store a plurality of data points for a plurality of products comprising a first product, a second product, and a target product in the memory, wherein the plurality of data points comprises a sparse set of data points for the target product;

calculate, in response to an indication from a trained machine learning (ML) model associated with the first product that a target ML model evaluation for the target product failed to detect an anomaly for the target product, a first similarity score between the first product and the target product and a second similarity score between the second product and the target product;

calibrate, in response to the sparse set of data points, the target ML model using a regularization penalty that is based on:

the first similarity score and the second similarity score,

a first distance between a first set of coefficients for the trained ML and a target set of coefficients for the target ML model, and

a second distance between a second set of coefficients for another trained second ML model associated with the second product and the target set of coefficients; and

receive, based on feeding a feature vector associated with the target product into the target ML model, an indication that the target ML model detected the anomaly for the target product.

10. The system of claim 9 , wherein to calculate the first similarity score the at least one processor is further configured to:

calculate a first cosine similarity between an embedding for the first product and an embedding for the target product;

compare the first cosine similarity with a similarity threshold; and

in response to the first cosine similarity exceeding the similarity threshold, determine the first product and the target product are similar and setting the first similarity score to 1.

11. The system of claim 10 , wherein to calculate the second similarity score the at least one processor is further configured to:

calculate a second cosine similarity between an embedding for the second product and the embedding for the target product;

compare the second cosine similarity with the similarity threshold; and

in response to the second cosine similarity falling below the similarity threshold, determine the second product and the target product are dissimilar and setting the second similarity score to 0.

12. The system of claim 9 , wherein the regularization penalty comprises:

a sum of at least a first contrastive loss function associated with the first distance and a second contrastive loss function associated with the second distance.

13. The system of claim 12 , wherein the first contrastive loss function comprises:

a product of Z T,1 d ({right arrow over (β)} T , {right arrow over (β)} 1 ), wherein Z T,1 is the first similarity score between the first product and the target product, and wherein d({right arrow over (β)} T , {right arrow over (β)} 1 ) is the first distance.

14. The system of claim 12 , wherein the second contrastive loss function comprises:

a product of (1−Z T,2 )max{0, m−d({right arrow over (β)} T , {right arrow over (β)} 2 )}, wherein Z T,2 is the second similarity score between the second product and the target product, wherein d({right arrow over (β)} T , {right arrow over (β)} 2 ) is the second distance, and wherein m is a minimum margin parameter.

15. A non-transitory computer-readable medium having instructions stored thereon for anomaly detection using machine learning models and similarity regularization, the instructions, when executed by at least one computing device, cause the at least one computing device to perform operations comprising:

storing a plurality of data points for a plurality of products comprising a first product, a second product, and a target product in a memory, wherein the plurality of data points comprises a sparse set of data points for the target product;

calculating, in response to an indication from a trained machine learning (ML) model associated with the first product that a target ML model evaluation for the target product failed to detect an anomaly for the target product, a first similarity score between the first product and the target product and a second similarity score between the second product and the target product;

calibrating, in response to the sparse set of data points, the target ML model using a regularization penalty that is based on:

the first similarity score and the second similarity score,

a first distance between a first set of coefficients for the trained ML and a target set of coefficients for the target ML model, and

a second distance between a second set of coefficients for another trained ML model associated with the second product and the target set of coefficients; and

receiving, based on feeding a feature vector associated with the target product into the target ML model, an indication that the target ML model detected the anomaly for the target product.

16. The non-transitory computer-readable medium of claim 15 , wherein calculating the first similarity score further comprises:

calculating a first cosine similarity between an embedding for the first product and an embedding for the target product;

comparing the first cosine similarity with a similarity threshold; and

in response to the first cosine similarity exceeding the similarity threshold, determining the first product and the target product are similar and setting the first similarity score to 1.

17. The non-transitory computer-readable medium of claim 16 , wherein calculating the second similarity score further comprises:

calculating a second cosine similarity between an embedding for the second product and the embedding for the target product;

comparing the second cosine similarity with the similarity threshold; and

in response to the second cosine similarity falling below the similarity threshold, determining the second product and the target product are dissimilar and setting the second similarity score to 0.

18. The non-transitory computer-readable medium of claim 15 , wherein the regularization penalty comprises:

a sum of at least a first contrastive loss function associated with the first distance and a second contrastive loss function associated with the second distance.

19. The non-transitory computer-readable medium of claim 18 , wherein the first contrastive loss function comprises:

a product of Z T,1 d({right arrow over (β)} T , {right arrow over (β)} 1 ), wherein Z T,1 is the first similarity score between the first product and the target product, and wherein d({right arrow over (β)} T , {right arrow over (β)} 1 ) is the first distance.

20. The non-transitory computer-readable medium of claim 18 , wherein the second contrastive loss function comprises:

a product of (1−Z T,2 )max{0, m−d({right arrow over (β)} T , {right arrow over (β)} 2 )}, wherein Z T,2 is the second similarity score between the second product and the target product, wherein d({right arrow over (β)} T , {right arrow over (β)} 2 ) is the second distance, and wherein m is a minimum margin parameter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 17, 2021
From: IMAS, MICHAEL; SAXE, RYAN
To: PEPSICO, INC.
Reel/Frame 056574/0134 →
Continuity (1)
Related Publication 20220398503A1 · Dec 15, 2022
References Cited (35)
US 6922700B1 · Aggarwal · 2005 [cited by examiner]
US 11494612B2 · Chen · 2022 [cited by examiner]
US 20150363688A1 · Gao · 2015 [cited by examiner]
US 20160147799A1 · Cohen · 2016 [cited by examiner]
US 20160165178A1 · al-Salem · 2016 [cited by examiner]
US 20170285123A1 · Kaditz · 2017 [cited by examiner]
US 20190095313A1 · Xu · 2019 [cited by examiner]
US 20190108444A1 · Song · 2019 [cited by examiner]
US 20190244253A1 · Vij · 2019 [cited by examiner]
US 20190347523A1 · Rothberg · 2019 [cited by examiner]
US 20200028862A1 · Lin · 2020 [cited by examiner]
CN 111602149A · 2020 [cited by examiner]
WO WO02095534A2 · 2002 [cited by examiner]
WO WO2014205231A1 · 2014 [cited by examiner]
WO WO2020118517A1 · 2020 [cited by examiner]
Kang, Feng, Rong Jin, and Joyce Y. Chai. “Regularizing translation models for better automatic image annotation.” Proceedings of the thirteenth ACM international conference on Information and knowledge management. (Year… [cited by examiner]
Wang, Gang, David Forsyth, and Derek Hoiem. “Improved object categorization and detection using comparative object similarity.” IEEE transactions on pattern analysis and machine intelligence 35.10 (2013): 2442-2453. (Ye… [cited by examiner]
International Search Report and Written Opinion of the International Searching Authority directed to related International Patent Application No. PCT/US2022/033403, mailed Oct. 18, 2022; 8 pages. [cited by applicant]
Porwal et al., “Outlier Detection by Consistent Data Selection Method,” arXiv, Aug. 21, 2018; 7 pages. [cited by applicant]
Wang et al., “Improved object categorization and detection using comparative object similarity,” IEEE, Transactions on Pattern Analysis and Machine Intelligence, vol. 35, No. 10, Mar. 19, 2013; pp. 1-14. [cited by applicant]
Felipe Almeida and Geraldo Xexéo. 2019. Word Embeddings: A Survey. arXiv:1901.09069 [cs.CL]. [cited by applicant]
Hongyun Cai, Vincent W. Zheng, and Kevin Chen-Chuan Chang. 2018. A Comprehensive Survey of Graph Embedding: Problems, Techniques and Applications. arXiv:1709.07604 [cs.AI]. [cited by applicant]
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hin-ton. 2020. A Simple Framework for Contrastive Learning of Visual Representations. arXiv:2002.05709 [cs.LG]. [cited by applicant]
Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. 2020. Big Self-Supervised Models are Strong Semi-Supervised Learners. arXiv:2006.10029 [cs.LG]. [cited by applicant]
R. Hadsell, S. Chopra, and Y. LeCun. 2006. Dimensionality Reduction by Learning an Invariant Mapping. In [cited by applicant]
Arthur E. Hoerl and Robert W. Kennard. 1970. Ridge Regression: Biased Estimation for Nonorthogonal Problems. [cited by applicant]
L. Jing and Y. Tian. 2020. Self-supervised Visual Feature Learning with Deep Neural Networks: A Survey. [cited by applicant]
E. Liebscher. 2012. A Universal Selection Method in Linear Regression Models. , 153-162 pages. https://doi.org/10.4236/ojs.2012.22017. [cited by applicant]
Robert Tibshirani. 1996. Regression Shrinkage and Selection Via the Lasso. [cited by applicant]
Hui Zou and Trevor Hastie. 2005. Regularization and Variable Selection via the Elastic Net. [cited by applicant]
Extended European Search Report for EP Application No. EP22825655.8, dated Apr. 23, 2025, 10 pages. [cited by applicant]
Tian, P., et al., “Consistent Meta-Regularization for Better Meta-Knowledge in Few-Shot Learning,” IEEE Transactions on Neural Networks and Learning Systems, vol. 33, No. 12, pp. 7277-788. (Jun. 9, 2021). [cited by applicant]
Li, Q., et al., “Model-Contrastive Federated Learning,” arXiv:2013.16257v1 [cs.LG], Cornell University Library, 12 pages, (Mar. 30, 2021). [cited by applicant]
Tanveer, M., et al., “Batch Constrative Regularization for Deep Neural Network,” Proceedings of the 12 [cited by applicant]
Tian, P. and Gao, Y., “Improvising meta-learning model via meta-contrastive loss,” Frontiers of Computer Science, vol. 16, No. 5, 165331, pp. 1-7, Springer, (Jan. 8, 2022). [cited by applicant]