IP Library Granted Patent US 12,380,121
Granted Patent B2
US 12,380,121 · App. 18/053,738 · Granted Aug 5, 2025

Anomaly detection with local outlier factor

Inventors: Xi Cheng (Kirkland, WA); Zichuan Ye (Mountain View, CA); Peng Lin (Mountain View, CA); Jiashang Liu (Kirkland, WA); Amir Hormati (Mountain View, CA); Mingge Deng (Kirkland, WA)
Assignee: Google LLC
G06F16/2462G06F16/215G06F16/256
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,380,121
App. No.
18/053,738
Granted
Aug 5, 2025
Kind
B2
Abstract

A method for anomaly detection includes receiving an anomaly detection query from a user. The anomaly detection query requests data processing hardware determine one or more anomalies in a dataset including a plurality of examples. Each example in the plurality of examples is associated with one or more features. The method includes training a model using the dataset. The trained model is configured to use a local outlier factor (LOF) algorithm. For each respective example of the plurality of examples in the dataset, the method includes determining, using the trained model, a respective local deviation score based on the one or more features. The method includes determining that the respective local deviation score satisfies a deviation score threshold and, based on the location deviation score satisfying the threshold, determining that the respective example is anomalous. The method includes reporting the respective anomalous example to the user.

Claims (42)

1. A computer-implemented method when executed by data processing hardware causes the data processing hardware to perform operations comprising:

receiving an anomaly detection query from a user, the anomaly detection query requesting the data processing hardware to determine one or more anomalies in a dataset comprising a plurality of examples, each example in the plurality of examples associated with one or more features;

training a model using the dataset, the trained model configured to use a standard local outlier factor (LOF) algorithm and a randomized LOF algorithm, the randomized LOF algorithm having a greater scalability for large datasets relative to the standard LOF;

determining that a size of the dataset satisfies a size threshold;

based on determining that the size of the dataset satisfies the size threshold, selecting the randomized LOF algorithm; and

for each respective example of the plurality of examples in the dataset:

determining, using the trained model and the selected randomized LOF algorithm, a respective local deviation score based on the one or more features;

determining that the respective local deviation score satisfies a deviation score threshold,

based on the deviation score satisfying the deviation score threshold, determining that the respective example is anomalous; and

reporting the respective anomalous example to the user.

2. The method of claim 1 , wherein the trained model uses locality sensitive hashing to determine pairwise distance computations between pairs of respective examples of the plurality of examples.

3. The method of claim 2 , wherein the trained model uses the randomized LOF algorithm based on random projection to generate a random vector based on the dataset.

4. The method of claim 2 , wherein the pairwise distance computations determined by the locality sensitive hashing comprise cosine distances.

5. The method of claim 2 , wherein the pairwise distance computations determined by the locality sensitive hashing comprise Euclidean distances.

6. The method of claim 2 , wherein determining, using the trained model, the respective local deviation score comprises:

determining, using the trained model, a number of nearest neighbors to the respective example; and

determining, using the trained model, a local reachable density of the respective example.

7. The method of claim 1 , wherein the anomaly detection query comprises a single Structured Query Language (SQL) query.

8. The method of claim 1 , wherein the data processing hardware resides on a cloud database system.

9. The method of claim 1 , wherein the operations further comprise removing duplicate examples from the plurality of examples.

10. A system comprising:

data processing hardware; and

memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:

receiving an anomaly detection query from a user, the anomaly detection query requesting the data processing hardware to determine one or more anomalies in a dataset comprising a plurality of examples, each example in the plurality of examples associated with one or more features;

training a model using the dataset, the trained model configured to use a standard local outlier factor (LOF) algorithm and a randomized LOF algorithm, the randomized LOF algorithm having a greater scalability for large datasets relative to the standard LOF;

determining that a size of the dataset satisfies a size threshold;

based on determining that the size of the dataset satisfies the size threshold, selecting the randomized LOF algorithm; and

for each respective example of the plurality of examples in the dataset:

determining, using the trained model and the selected randomized LOF algorithm, a respective local deviation score based on the one or more features;

determining that the respective local deviation score satisfies a deviation score threshold,

based on the deviation score satisfying the deviation score threshold, determining that the respective example is anomalous; and

reporting the respective anomalous example to the user.

11. The system of claim 10 , wherein the trained model uses locality sensitive hashing to determine pairwise distance computations between pairs of respective examples of the plurality of examples.

12. The system of claim 11 , wherein the trained model uses the randomized LOF algorithm based on random projection to generate a random vector based on the dataset.

13. The system of claim 11 , wherein the pairwise distance computations determined by the locality sensitive hashing comprise cosine distances.

14. The system of claim 11 , wherein the pairwise distance computations determined by the locality sensitive hashing comprise Euclidean distances.

15. The system of claim 11 , wherein determining, using the trained model, the respective local deviation score comprises:

determining, using the trained model, a number of nearest neighbors to the respective example; and

determining, using the trained model, a local reachable density of the respective example.

16. The system of claim 10 , wherein the anomaly detection query comprises a single Structured Query Language (SQL) query.

17. The system of claim 10 , wherein the data processing hardware resides on a cloud database system.

18. The system of claim 10 , wherein the operations further comprise removing duplicate examples from the plurality of examples.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 14, 2022
From: CHENG, XI; LIN, PENG; YE, ZICHUAN; LIU, JIASHANG; HORMATI, AMIR; DENG, MINGGE
To: GOOGLE LLC
Reel/Frame 061751/0701 →
Continuity (2)
Provisional Application 63263983 · Nov 12, 2021
Related Publication 20230153311A1 · May 18, 2023
References Cited (27)
US 10045218B1 · Stapleton · 2018 [cited by examiner]
US 10193912B2 · Mermoud · 2019 [cited by examiner]
US 11553005B1 · Narigapalli · 2023 [cited by examiner]
US 11580081B1 · Rodgers · 2023 [cited by examiner]
US 11663256B2 · Sastry · 2023 [cited by examiner]
US 20070217676A1 · Grauman · 2007 [cited by examiner]
US 20120137367A1 · Dupont · 2012 [cited by examiner]
US 20130297590A1 · Zukovsky · 2013 [cited by examiner]
US 20180316707A1 · Dodson · 2018 [cited by examiner]
US 20190102553A1 · Herwadkar · 2019 [cited by examiner]
US 20190164287A1 · Gregson · 2019 [cited by examiner]
US 20190188065A1 · Anghel · 2019 [cited by examiner]
US 20190188212A1 · Miller et al. · 2019 [cited by applicant]
US 20200053108A1 · Cili et al. · 2020 [cited by applicant]
US 20200265045A1 · Tepper · 2020 [cited by examiner]
US 20200285737A1 · Kraus · 2020 [cited by examiner]
US 20200382536A1 · Dherange et al. · 2020 [cited by applicant]
US 20210224267A1 · Dongaonkar · 2021 [cited by examiner]
US 20220329613A1 · Abbaszadeh et al. · 2022 [cited by applicant]
US 20220398272A1 · Sastry · 2022 [cited by examiner]
US 20220407889A1 · Narigapalli · 2022 [cited by examiner]
US 20230121812A1 · Yin · 2023 [cited by examiner]
CN 111401460A · 2020 [cited by applicant]
International Search Report and Written Opinion for the related Application No. PCT/US2022/079508, dated Jan. 25, 2023, 89 pages. [cited by applicant]
Minh Quoc Nguyen et al: “A Fast Randomized Method for Local Density-Based Outlier Detection in High Dimensional Data”, Aug. 30, 2010 (Aug. 30, 2010), SAT 2015 18TB International Conference, Austin, TX, USA, Sep. 24-27, … [cited by applicant]
Xu Zekun et al: “Automatic Hyperparameter Tuning Method for Local Outlier Factor, with Applications to Anomaly Detection”, 2019 IEEE International Conference on Big Data (Big Data), IEEE, Dec. 9, 2019 (Dec. 9, 2019), pp… [cited by applicant]
Response to Communication Pursuant to Rules 161(1) and 162 EPC dated Jun. 19, 2024, from counterpart European Application No. 22821817.8, filed Dec. 17, 2024, 47 pp. [cited by applicant]