Anomaly detection using machine learning models and similarity regularization
Similarity regularization improves anomaly detection models by using coefficients from similar entities with dense data, addressing performance issues with sparse data sets and enhancing detection accuracy.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- PEPSICO INC
- Filing Date
- 2022-06-14
- Publication Date
- 2026-07-29
AI Technical Summary
Machine learning models for anomaly detection suffer from impaired performance when trained with sparse data sets, leading to false negatives and false positives.
Utilize similarity regularization by leveraging coefficients from similar entities with dense data sets to train models for entities with sparse data, using cosine similarity scores and regularization penalties to minimize objective loss functions.
Enhances the performance of anomaly detection models by reducing false positives and negatives, even with sparse data sets, through similarity regularization.
Smart Images

Figure 0007897277000050 
Figure 0007897277000051 
Figure 0007897277000052
Abstract
Description
[Technical Field]
[0001] (Cross-reference of related applications) This application claims priority to U.S. Patent Application No. 17 / 348,294, filed on 15 June 2021, which is incorporated herein by reference in its entirety. [Background technology]
[0002] Machine learning models are frequently used to solve or mitigate industrial and technical problems. For example, machine learning models are often used to perform anomaly detection and thus identify unexpected (e.g., suspicious) items or events in a data set. To meaningfully train a machine learning model for anomaly detection and / or other operations, it is often necessary to have a large (e.g., dense) training data set. If the training data set is sparse for any reason, the performance of the machine learning model may be impaired. For example, in the case of anomaly detection, a sparse training data set may result in the machine learning model missing unexpected (e.g., suspicious) items / events (e.g., false negatives) and / or improperly flagging routine items / events (e.g., false positives) when it is not expected. [Brief explanation of the drawing]
[0003] The attached drawings are incorporated herein and form part of this specification. [Figure 1] A block diagram of a system for anomaly detection using machine learning models and similarity regularization, according to one or more embodiments, is shown. [Figure 2] A flowchart is shown for anomaly detection using machine learning models and similarity regularization, according to one or more embodiments. [Figure 3] This document presents an exemplary computer system useful for implementing various embodiments.
[0004] In the drawings, like reference numerals generally indicate identical or similar elements. Additionally, generally, the leftmost digit of a reference numeral identifies the drawing in which that reference numeral first appears.
Embodiments for Carrying Out the Invention
[0005] This specification provides embodiments of systems, devices, apparatuses, methods, and / or computer program products for anomaly detection using machine learning models and similarity regularization, and / or combinations and sub - combinations thereof. One or more embodiments include storing data points of a plurality of entities (e.g., products, devices, etc.), the data points including a sparse set of data points of a target entity (e.g., a target product). One or more machine learning models may be generated for an entity. To determine the coefficients of a machine learning model associated with a target entity (having a sparse set of data points), the coefficients of other models associated with other entities that are similar to the target entity may be utilized. This may be referred to as similarity regularization. Similarity regularization may eliminate or at least mitigate false negatives and false positives that may arise from anomaly detection using machine learning models trained using sparse data sets. The generated model may then be used to perform anomaly detection in various industries and technical fields.
[0006] For example, anomaly detection may correspond to detecting potential failures in devices such as medical devices. The input to the machine learning model may be a feature vector based on sensor readings from the device, and the output of the machine learning model may be the probability that the device will fail within a certain time window. When the device is new, only a sparse set of training data points may be available for training the machine learning model. However, if the device is similar to other devices that have been available for multiple years (and thus, there are dense training data points for these similar devices), similarity regularization may be used to train the machine learning model (discussed below).
[0007] As another example, anomaly detection may be applicable to fraud detection in credit card transactions. A credit card company may need to estimate the likelihood that an actual transaction is fraudulent. The input to the machine learning model may be one or more attributes of the transaction (e.g., price, zip code, time, type of store, type of item, number of items, etc.), and the output of the machine learning model may be the probability that the transaction is fraudulent. If the consumers of the transactions belong to a group of consumers with a sparse set of training data points and only this sparse set of training data points is used to train the machine learning model, the performance of the machine learning model may be impaired (e.g., false positives for fraud). However, if one or more similar groups of consumers have a dense set of training data points, similarity regularization is used to train the machine learning model (discussed below) and false positives can be reduced.
[0008] In the context of consumer packaged goods (CPG), it may be advantageous to detect anomalies in the manufacturing process (e.g., production of a lot of defective products) or in the business or economic environment (e.g., competition, sales, market share, adverse marketing results, or external shocks such as a global viral pandemic). As a specific example, assume that there is an established market for tortilla chips and then a new entrant arrives in the market where the product is highly preferred by consumers. The introduction of a strong competing brand affects the pricing power and market share dynamics of the existing brand / product in an abnormal way. These effects can be captured by various econometric models, but these models can be enhanced using similarity regularization (e.g., using a dense set of training data points associated with similar products).
[0009] Figure 1 shows a system 100 for anomaly detection using machine learning models and similarity regularization, according to one or more embodiments. System 100 may have multiple components, including a dataset repository 110, a model generator 150, and a trained machine learning model repository 170. Each of these components may be implemented on a computer system, such as the computer system 300 discussed below with reference to Figure 3. Two or more of the components (e.g., the dataset repository 110 and the model generator 150) may be connected by a communication link 120. The communication link 120 may support Ethernet, cellular, infrared, fiber optic, Bluetooth®, and the like. In short, the communication link 120 may support any type of wired and / or wireless connection.
[0010] In one or more embodiments, the dataset repository 110 stores a dataset D 115. The dataset D 115 may contain multiple data points of multiple entities. Each data point may correspond to an entity. There may be K entities (K≧2) in the dataset D 115, and therefore there may be K sets of data points. Different entities may have different numbers of data points in the dataset D 115. For example, some entities may have many data points (i.e., a dense set of data points), while other entities may have fewer data points (i.e., a sparse set of data points).
[0011] Each data point is a feature vector
[0012]
number
[0013] In one or more embodiments, each of the K entities may be a product such as, for example, a device (e.g., a medical device) or a consumer good. In such a scenario, the feature vector may correspond to an attribute of the product or even a sensor reading value obtained by the product, and the output may be the probability that the product will fail. Additionally or alternatively, each of the K entities may be a group or cluster of consumers sharing similar socioeconomic characteristics or spending patterns. In such a scenario, the feature vector may be an attribute of a transaction such as a credit card transaction involving a consumer from the group, and the output may be the probability that the transaction is fraudulent.
[0014] In one or more embodiments, the model generator 150 is configured to generate a supervised machine learning model for a plurality of entities. The data points within the dataset D 115 may be used to train the model, and the model generator 150 may include a memory 152 for storing some or all of the data points for generating the model. For example, the model M generated for entity j j may have the form Mj(X j ) = Y j + ε, where ε is the error.
[0015] In one or more embodiments, generating a supervised machine learning model includes fitting a set of coefficients
[0016]
Number
[0017] In one or more embodiments, the trained machine learning model repository 170 stores machine learning models generated by the model generator 150. As shown in Figure 1, the trained machine learning model repository 170 may store machine learning model 1 172A, machine learning model K 172K, and so on. Each of the machine learning models 172 may correspond to one of the entities. Each of the machine learning models 172 may include and utilize a set of coefficients to generate an output based on an input feature vector. For example, machine learning model 1 172A may include a set of coefficients 1 175A, and machine learning model K 172K may include a set of coefficients K 175K. Depending on the entities and features in the feature vector, as will be discussed below, one or more of the machine learning models 172 may be used for anomaly detection, including detecting failures of the corresponding entities (e.g., devices), detecting fraudulent transactions, detecting network security breaches, and so on.
[0018] Figure 2 is a flowchart of Method 200 for Anomaly Detection Using Machine Learning Models and Similarity Regularization, according to one or more embodiments. Method 200 can be carried out by processing logic that may include hardware (e.g., circuits, dedicated logic, programmable logic, microcode, etc.), software (e.g., instructions executed on a processing device), or a combination thereof. It should be understood that not all steps are required to carry out the disclosure provided herein. Furthermore, as will be understood by those skilled in the art, some of the steps may be performed simultaneously or in a different order than that shown in Figure 2.
[0019] Method 200 will be described with reference to Figure 1. However, Method 200 is not limited to its exemplary embodiments.
[0020] In step 205, the model generator 150 may acquire and store the dataset D115. Part or all of the dataset 115 may be acquired from the dataset repository 110 via the communication link 120. The dataset D115 may contain multiple data point sets, each data point set corresponding to an entity. As described above, the dataset D has K entities (K≧2), and therefore there may be K data point sets. Each data point is a feature vector
[0021]
number
[0022] In one or more embodiments, the target entity T, which is at least one of a plurality of entities, has a sparse set of data points. T (X T ,Y T ) or simply D T D represents the set of data points belonging to the target entity T. T (X T ,Y T ) is D T The number of data points within (i.e., |D T |) is D TA dataset may be referred to as sparse because it may contain fewer than the number of features in the feature vector of each data point. In one or more embodiments, this sparse set of data points is intentional. For example, the dataset repository 110 may have additional data points for the target entity T, but these additional data points are not sent to the model generator 150 in order to reduce bandwidth consumption on the communication link 120. Additionally or alternatively, these additional data points are not sent to the model generator 150 in order to reduce the memory space required within the model generator 150 to store the data points.
[0023] In one or more embodiments, a sparse set of data points for the target entity T is a result of storage corruption and / or data theft. For example, at some point in the past, the dataset repository 110 may have stored additional data points for the target entity T, but these data points were lost because the dataset repository was damaged or corrupted (e.g., file corruption, hard drive failure) or because the data points were accidentally or intentionally deleted. Additionally or alternatively, these additional data points may have been stolen during a security breach of the dataset repository 110 by a hacker.
[0024] In one or more embodiments, a sparse data point set for the target entity T is a result of an accelerated sampling scheme. Such a scheme takes fewer sample data points, thus potentially reducing the time required to perform sampling. This represents a trade-off between the number of samples and the time required to acquire the sample set. Additionally or alternatively, a sparse data point set may also result from the target entity T being a new product on the market, thus requiring little time to acquire data points for the target entity T and / or having little customer feedback regarding the target entity T.
[0025] In 210, the model generator 150 may calculate similarity scores between the target entity T and each of the other entities. In one or more embodiments, the similarity scores between two entities are based on embeddings for each entity, where the embeddings are vectors of numbers that describe / represent the entities. For example,
[0026]
number
[0027]
number
[0028] In one or more embodiments, the cosine similarity can then be compared to a similarity threshold θ. If the cosine similarity exceeds the threshold, the target entity T and entity j may be considered similar, and the similarity score Z of the target entity and entity j is calculated. T,j This is set to 1. If the cosine similarity is less than or equal to the similarity threshold, target entity T and entity j may be considered dissimilar, and the similarity score Z of target entity and entity j T,j It is set to zero. Mathematically, this can be expressed as follows:
[0029]
number
[0030] In 215, the model generator 150 can generate supervised machine learning models M for each of K entities, including the target entity T. The machine learning model for entity j is M j It is sometimes referred to as such. Similarly, the machine learning model for the target entity T is M TIt is sometimes referred to as D. j M j It can be used as training data for D. T M T It can be used as training data.
[0031] A person skilled in the art who has an interest in this disclosure will know that generating a supervised machine learning model is possible, and that the coefficient set
[0032]
number
[0033]
number
[0034]
number
[0035]
number
[0036] In one or more embodiments, the fitting procedure during the generation of the machine learning model is coefficient
[0037]
number
[0038]
number
[0039] Similarly, the objective loss function of Mj is the regularization penalty P j It may have and can be expressed as follows.
[0040]
number
[0041] Traditional regularization penalties are,
[0042]
number
[0043]
number
[0044]
number
[0045] Therefore, in one or more embodiments, M T Regularization penalty P in the objective loss function T This can be expressed as follows:
[0046]
number
[0047]
number
[0048]
number
[0049]
number
[0050]
number
[0051]
number
[0052]
number
[0053]
number
[0054]
number
[0055]
number
[0056]
number
[0057]
number
[0058]
number
[0059] Therefore, M T The objective loss function can be expressed as follows:
[0060]
number
[0061] By using this regularization penalty (including the sum of the contrast loss function), a high-quality set of coefficients (e.g., even when only a sparse set of data points for the target entity T exists) can be obtained.
[0062]
number
[0063] Thus, if the sparse set of data points of the target entity T is the result of corrupted storage, deletion, theft during a security breach, intentional exclusion of some data points to reduce communication bandwidth, intentional exclusion of some data points to reduce memory storage requirements, or the implementation of accelerated sampling schemes (as discussed above), then the use of this regularization penalty (including the sum of contrast loss functions) may be used to overcome (or at least mitigate) the sparseness of the data points. Thus, the use of this regularization penalty is substantially a contribution and / or improvement to one or more technical fields, including data recovery, data compression for storage, communication bandwidth reduction, accelerated sampling schemes, etc.
[0064] In 220, one or more of the generated machine learning models may be used for anomaly detection (e.g., device failure detection, fraud detection in credit card transactions, anomaly detection in the context of CPGs). For example, the feature vector associated with the target entity T is used as input to M T It can be supplied to M. TThe output may be a value that reflects the probability that the feature vector is anomalous and / or the probability that the target entity T is experiencing a rare or suspicious event. In one or more embodiments, an anomaly is declared if the probability exceeds some threshold (e.g., 65%). T Similarity regularization was used to generate M T It is less likely to generate incorrect probabilities, and therefore less likely to produce false positives and / or false negatives.
[0065] Various embodiments can be implemented using one or more well-known computer systems, such as the computer system 300 shown in Figure 3. One or more computer systems 300 can be used, for example, to implement any of the embodiments described herein, as well as combinations and partial combinations thereof.
[0066] The computer system 300 may include one or more processors (also called a central processing unit or CPU), such as a processor 304. The processor 304 may be connected to a communication infrastructure or a bus 306.
[0067] The computer system 300 may also include user input / output devices 303 such as a monitor, keyboard, and pointing device, which can communicate with the communication base 306 via a user input / output interface 302.
[0068] One or more of the processors 304 may be graphics processing units (GPUs). In one embodiment, a GPU may be a processor that is a dedicated electronic circuit designed to process mathematically intensive applications. A GPU may have a parallel structure that is efficient for parallel processing of large blocks of data, such as mathematically intensive data common to computer graphics applications, images, videos, etc.
[0069] The computer system 300 may also include main memory, or primary memory 308, such as random access memory (RAM). The main memory 308 may include one or more cache levels. The main memory 308 may store control logic (i.e., computer software) and / or data.
[0070] The computer system 300 may also include one or more secondary storage devices or memories 310. The secondary memory 310 may include, for example, a hard disk drive 312 and / or a removable storage device or drive 314. The removable storage drive 314 may be a floppy disk drive, a magnetic tape drive, a compact disk drive, an optical storage device, a tape backup device, and / or any other storage device / drive.
[0071] The removable storage device 314 may interact with the removable storage unit 318. The removable storage unit 318 may include a computer-enabled or readable storage device that stores computer software (control logic) and / or data. The removable storage unit 318 may be a floppy disk, magnetic tape, compact disk, DVD, optical storage disk, and / or any other computer data storage device. The removable storage drive 314 may read from and / or write to the removable storage unit 318.
[0072] The secondary memory 310 may include other means, devices, components, tools, or other approaches to enable computer programs and / or other instructions and / or data to be accessed by the computer system 300. Examples of such means, devices, components, tools, or other approaches include removable storage units 322 and interfaces 320. Examples of removable storage units 322 and interfaces 320 include program cartridges and cartridge interfaces (such as those found in video game devices), removable memory chips (such as EPROMs or PROMs) and associated sockets, memory sticks and USB ports, memory cards and associated memory card slots, and / or any other removable storage units and associated interfaces.
[0073] The computer system 300 may further include a communication or network interface 324. The communication interface 324 may enable the computer system 300 to communicate with and interact with any combination of external devices, external networks, external entities, etc. (referenced individually and collectively by reference number 328). For example, the communication interface 324 may enable the computer system 300 to communicate with an external or remote device 328 via a communication path 326, which may be wired and / or wireless (or a combination thereof) and may include any combination of LAN, WAN, Internet, etc. Control logic and / or data may be transmitted to and from the computer system 300 via the communication path 326.
[0074] The computer system 300 may also be, to give some non-limiting examples, a personal digital assistant (PDA), a desktop workstation, a laptop or notebook computer, a netbook, a tablet, a smartphone, a smartwatch or other wearable device, an appliance, part of the Internet of Things, and / or an embedded system, or any combination thereof.
[0075] Computer system 300 includes, but is not limited to, remote or distributed cloud computing solutions, including, clients or servers accessing or hosting any applications and / or data via any delivery paradigm, local or on-premises software ("on-premises" cloud-based solutions), "as-a-service" models (e.g., content as a service (CaaS), digital content as a service (DCaaS), software as a service (SaaS), managed software as a service (MSaaS), platform as a service (PaaS), desktop as a service (DaaS), framework as a service (FaaS), backend as a service (BaaS), mobile backend as a service (MBaaS), and infrastructure as a service (a This may be a hybrid model including a service (such as IaaS), and / or any combination of the aforementioned embodiments or other service or delivery paradigms.
[0076] Any applicable data structures, file formats, and schemas within the computer system 300 may be derived from standards including, but not limited to, JavaScript Object Notation (JSON), Extensible Markup Language (XML), Yet Another Markup Language (YAML), Extensible Hypertext Markup Language (XHTML), Wireless Markup Language (WML), MessagePack, XML User Interface Language (XUL), or any other functionally similar representations, either alone or in combination. Alternatively, proprietary data structures, formats, or schemas may be used either exclusively or in combination with known or open standards.
[0077] In some embodiments, a tangible temporary device or product comprising a tangible non-temporary computer-usable or readable medium storing control logic (software) may also be referred to herein as a computer program product or program storage device. This includes, but is not limited to, a computer system 300, a main memory 308, a secondary memory 310, removable storage units 318 and 322, and a tangible product embodying any combination thereof. When such control logic is executed by one or more data processing devices (such as the computer system 300), such data processing devices may be made to operate as described herein.
[0078] Based on the teachings contained herein, it will be apparent to those skilled in the art how embodiments of the disclosure may be constructed and used with data processing devices, computer systems, and / or computer architectures other than those shown in Figure 3. Specifically, embodiments may operate with software, hardware, and / or operating system implementations other than those described herein.
[0079] It should be understood that the “Modes for Carrying Out the Invention” section, and any other sections, are not intended to be used to interpret the claims. Other sections may describe one or more, but not all, exemplary embodiments envisioned by the inventors, but are not intended to limit the scope of this disclosure and the appended claims.
[0080] While this disclosure describes exemplary embodiments for exemplary fields and uses, it should be understood that this disclosure is not limited thereto. Other embodiments and modifications thereof are possible and are within the scope and spirit of this disclosure. For example, without limiting the generality of this paragraph, embodiments are not limited to software, hardware, firmware, and / or entities illustrated in the drawings and / or described herein. Furthermore, embodiments (whether expressly described herein or not) may have significant utility in fields and uses beyond the examples described herein.
[0081] Embodiments have been described using functional building blocks that illustrate the implementation of specific functions and their relationships. The boundaries of these functional building blocks are arbitrarily defined herein for the sake of clarity. Alternative boundaries may be defined to the extent that specific functions and relationships (or their equivalents) are adequately implemented. Furthermore, alternative embodiments may implement functional blocks, processes, operations, methods, etc., using a different order than that described herein.
[0082] References such as “one embodiment,” “an embodiment,” and “an exemplary embodiment” indicate that the described embodiments may include certain features, structures, or characteristics, but not all embodiments may necessarily include those features, structures, or characteristics. Furthermore, such phrases do not necessarily refer to the same embodiment. Moreover, when describing certain properties, structures, or characteristics in relation to one embodiment, it is within the knowledge of those skilled in the art to incorporate such features, structures, or characteristics into other embodiments, regardless of whether they are explicitly mentioned or described herein. In addition, some embodiments may be described using the expressions “connected” and “linked” with respect to their derivatives. These terms are not necessarily intended to be synonymous with each other. For example, some embodiments may be described using the terms “connected” and / or “linked” to indicate that two or more elements are in direct physical or electrical contact with each other. However, the term “linked” may also mean that two or more elements are not in direct contact with each other but still cooperate or interact with each other.
[0083] The scope and breadth of this disclosure should not be limited by any of the exemplary embodiments described above, but should be defined solely by the following claims and their equivalents.
Claims
1. A method for anomaly detection using machine learning models and similarity regularization, The method involves storing multiple data points of multiple products, including a first product, a second product, and a target product, in memory using at least one processor, wherein the multiple data points include a sparse set of data points of the target product. The at least one processor calculates 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. The at least one processor generates a target machine learning (ML) model associated with the target product in response to the sparse data point set, using a regularization penalty, wherein the regularization penalty is: The first similarity score and the second similarity score, The first distance between the first set of coefficients of the first ML model associated with the first product and the target set of coefficients of the target ML model, To generate based on the second distance between the second set of coefficients of the second ML model associated with the second product and the target set of coefficients, A method comprising detecting anomalies in the target product by supplying feature vectors associated with the target product to the target ML model.
2. The method according to claim 1, wherein the first product, the second product, and the target product are consumer goods (CPGs).
3. The method according to claim 1, wherein the first product, the second product, and the target product are medical devices, and the abnormality is a failure of the target product.
4. Calculating the first similarity score is The at least one processor calculates a first cosine similarity between the embedding of the first product and the embedding of the target product, Comparing the first cosine similarity with a similarity threshold, The method according to claim 1, comprising determining that the first product and the target product are similar in response to the first cosine similarity exceeding the similarity threshold, and setting the first similarity score to 1.
5. Calculating the second similarity score is The at least one processor calculates a second cosine similarity between the embedding of the second product and the embedding of the target product, Comparing the second cosine similarity with the similarity threshold, The method according to claim 4, comprising determining that the second product and the target product are dissimilar in response to the second cosine similarity falling below the similarity threshold, and setting the second similarity score to zero.
6. The aforementioned regularization penalty is, The method according to claim 1, comprising at least the sum of a first contrast loss function associated with the first distance and a second contrast loss function associated with the second distance.
7. The first comparative loss function is, [Math 1] It is represented as, Here, [Math 2] The first similarity score between the first product and the target product, [Math 3] This is the first distance, The second comparative loss function described above is: [Math 4] It is represented as, Here, [Math 5] The second similarity score between the second product and the target product, [Math 6] The second distance is The method according to claim 6, wherein m is the minimum margin parameter.
8. A system for anomaly detection using a machine learning model and similarity regularization, Memory and The system comprises at least one processor connected to the memory, and the at least one processor is The memory stores multiple data points of multiple products, including a first product, a second product, and a target product, wherein the multiple data points include a sparse set of data points of the target product. Calculating 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, In response to the sparse data set, generate a target machine learning (ML) model associated with the target product using a regularization penalty, wherein the regularization penalty is: The first similarity score and the second similarity score, The first distance between the first set of coefficients of the first ML model associated with the first product and the target set of coefficients of the target ML model, To generate based on the second distance between the second set of coefficients of the second ML model associated with the second product and the target set of coefficients, A system configured to detect anomalies in the target product by supplying feature vectors associated with the target product to the target ML model.
9. In order to calculate the first similarity score, the at least one processor, Calculating a first cosine similarity between the embedding of the first product and the embedding of the target product, Comparing the first cosine similarity with a similarity threshold, The system according to claim 8, further configured to determine that the first product and the target product are similar and to set the first similarity score to 1 in response to the first cosine similarity exceeding the similarity threshold.
10. In order to calculate the second similarity score, the at least one processor, Calculating a second cosine similarity between the embedding of the second product and the embedding of the target product, Comparing the second cosine similarity with the similarity threshold, The method according to claim 9, further configured to determine that the second product and the target product are dissimilar in response to the second cosine similarity falling below the similarity threshold, and to set the second similarity score to zero.
11. The regularization penalty is, The system according to claim 8, comprising at least the sum of a first contrast loss function associated with the first distance and a second contrast loss function associated with the second distance.
12. The first comparative loss function is: [Number 7] It is represented as, Here, [Number 8] The first similarity score between the first product and the target product, [Number 9] This is the first distance, The second comparative loss function described above is: [Number 10] It is represented as, Here, [Math 11] The second similarity score between the second product and the target product, [Math 12] The second distance is m is the minimum margin parameter. The system according to claim 11.
13. A non-temporary computer-readable medium storing instructions for anomaly detection using a machine learning model and similarity regularization, wherein, when the instructions are executed by at least one computing device, the instructions are stored on the at least one computing device. The method involves storing multiple data points of multiple products, including a first product, a second product, and a target product, in memory, wherein the multiple data points include a sparse set of data points of the target product. Calculating 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, In response to the sparse data set, generate a target machine learning (ML) model associated with the target product using a regularization penalty, wherein the regularization penalty is: The first similarity score and the second similarity score, The first distance between the first set of coefficients of the first ML model associated with the first product and the target set of coefficients of the target ML model, To generate based on the second distance between the second set of coefficients of the second ML model associated with the second product and the target set of coefficients, A non-temporary computer-readable medium that performs an operation including detecting anomalies in the target product by supplying feature vectors associated with the target product to the target ML model.
14. The calculation of the first similarity score is: Calculating a first cosine similarity between the embedding of the first product and the embedding of the target product, Comparing the first cosine similarity with a similarity threshold, The non-temporary computer-readable medium according to claim 13, further comprising determining that the first product and the target product are similar in response to the first cosine similarity exceeding the similarity threshold, and setting the first similarity score to 1.
15. The calculation of the second similarity score is: Calculating a second cosine similarity between the embedding of the second product and the embedding of the target product, Comparing the second cosine similarity with the similarity threshold, The non-temporary computer-readable medium according to claim 14, further comprising determining that the second product and the target product are dissimilar in response that the second cosine similarity falls below the similarity threshold, and setting the second similarity score to zero.
16. The regularization penalty is, The non-temporal computer-readable medium according to claim 13, comprising at least the sum of a first contrast loss function associated with the first distance and a second contrast loss function associated with the second distance.
17. The first comparative loss function is: [Number 13] It is represented as, Here, [Number 14] The first similarity score between the first product and the target product, [Number 15] This is the first distance, The second comparative loss function described above is: [Number 16] It is represented as, Here, [Number 17] The second similarity score between the second product and the target product, [Number 18] The second distance is The non-temporary computer-readable medium according to claim 16, wherein m is the minimum margin parameter.