IP Library Granted Patent US 10,637,826
Granted Patent B1
US 10,637,826 · App. 16/056,134 · Granted Apr 28, 2020

Policy compliance verification using semantic distance and nearest neighbor search of labeled content

Inventors: Enming Luo (Fremont, CA); Emanuel Alexandre Strauss (San Mateo, CA)
Assignee: Facebook, Inc.
H04L63/0227G06K9/6215G06K9/6276G06K9/726G06N3/0472
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 10,637,826
App. No.
16/056,134
Granted
Apr 28, 2020
Kind
B1
Abstract

An online system determines whether a test content item violates a policy of the online system. The online system extracts a semantic from the test content item and determines a distance between the extracted semantic vector and the stored semantic vectors for content items that have been labeled to indicate whether they violate a policy. Using a nearest neighbor search, the online system selects a set of the stored semantic vectors and assigns a weight to the selected semantic vectors that is inversely related to the distances. The online system then determines whether the test content item violates a policy using a weighed voting scheme, where the labels of the stored semantic vectors are aggregated based on their associated weights. The online system may first attempt to match the test content with known bad content and terminate the more complex nearest neighbor search if such a match is found.

Claims (71)

1. A computer-implemented method comprising:

storing, in an online system, a plurality of semantic vectors, each semantic vector representing a content item within the online system and assigned a label indicating whether the content item has violated a policy of the online system, the policy identifying one or more attributes of content items considered ineligible for presentation to users of the online system;

receiving, at the online system, a test content item from a user of the online system;

extracting a semantic vector from the test content item based on features within the test content item, the semantic vector indicating one or more semantic features of the test content item;

determining a distance between each stored semantic vector and the extracted semantic vector of the test content item;

selecting a nearest subset of the stored semantic vectors based on the determined distances;

assigning a weight to each of the nearest subset of the stored semantic vectors, wherein the weight is inversely related to the determined distance; and

determining whether the test content item violates the policy of the online system by aggregating the labels assigned to the selected nearest subset of the stored semantic vectors weighted according to the assigned weights for the selected nearest subset of the stored semantic vectors.

2. The method of claim 1 , wherein the plurality of stored vectors comprises:

one or more semantic vectors assigned a label indicating that an image is consistent with policies of the online system; and

one or more semantic vectors assigned a label indicating whether the image has violated a policy of the online system.

3. The method of claim 1 , wherein extracting the semantic vector from the test content item further comprises:

extracting text from the test content item, the extracted text corresponding to a body of text of the test content item;

providing the extracted text as input to a neural networking comprising a plurality of layers; and

extracting the semantic vector representing the extracted text based upon an output of a hidden layer of the neural network.

4. The method of claim 1 , wherein the weight assigned to each stored semantic vector is inversely proportional to the determined distance.

5. The method of claim 1 , further comprising:

assigning a label to the test content item indicating whether the image has violated a policy of the online system; and

updating the plurality of semantic vectors stored by the online system with the extracted semantic vector of the test content item.

6. The method of claim 1 , wherein determining whether the test content item violates the policy further comprises:

identifying the test content item as ineligible for presentation to users of the online system based on one or more policies of the online system.

7. The method of claim 1 , further comprising:

determining that the test content item complies with the policies of the online system based on the label assigned to the weighted semantic vector with the distance representing the smallest distance between the stored semantic vector of the test content item; and

identifying the test content item as eligible for presentation to users of the online system based on one or more policies of the online system.

8. The method of claim 1 , further comprising:

identifying semantic vectors of the stored semantic vectors that are compliant with the policies of the online system;

for a semantic vector determined to be in violation of a policy of the online system, identifying a plurality of compliant semantic vectors within a threshold distance of the ineligible semantic vector; and

removing the semantic vector in violation of the policy of the online system from the stored semantic vectors when the number of compliment semantic vectors meets a threshold number.

9. The method of claim 1 , wherein the distance comprises a Euclidean distance or a Hamming distance.

10. A computer-implemented method comprising:

storing, in an online system, a plurality of semantic vectors, each semantic vector representing a content item within the online system and assigned a label indicating whether the content item has violated a policy of the online system, the policy identifying one or more attributes of content items considered ineligible for presentation to users of the online system;

receiving, at the online system, a plurality of test content items from one or more users of the online system;

for each test content item, extracting a semantic vector based on features within the test content item, the semantic vector indicating one or more semantic features of the test content item;

determining a distance between each stored semantic vector and the extracted semantic vector of the test content item;

for each test content item of a first subset,

identifying a stored semantic vector within a first threshold distance, the distance representing a distance between the stored semantic vector and the extracted semantic vector of the test content item,

determining that the test content item violates a policy of the online system based on the label assigned to the identified stored semantic vector; and

for each test content items excluded from the first subset,

selecting a nearest subset of the stored semantic vectors based on the determined distances,

assigning a weight to each of the nearest subset of the stored semantic vectors, wherein the weight is inversely related to the determined distance, and

determining whether the test content item violates the policy of the online system by aggregating the labels assigned to the selected nearest subset of the stored semantic vectors weighted according to the assigned weights for the selected nearest subset of the stored semantic vectors.

11. The method of claim 10 , wherein the plurality of stored vectors comprises:

one or more semantic vectors assigned a label indicating that an image is consistent with policies of the online system; and

one or more semantic vectors assigned a label indicating whether the image has violated a policy of the online system.

12. The method of claim 10 , wherein extracting the semantic vector from the test content item further comprises:

extracting text from the test content item, the extracted text corresponding to a body of text of the test content item;

providing the extracted text as input to a neural networking comprising a plurality of layers; and

extracting the semantic vector representing the extracted text based upon an output of a hidden layer of the neural network.

13. The method of claim 10 , wherein the weight assigned to each stored semantic vector is inversely proportional to the determined distance.

14. The method of claim 10 , further comprising:

assigning a label to the test content item indicating whether the image has violated a policy of the online system; and

updating the plurality of semantic vectors stored by the online system with the extracted semantic vector of the test content item.

15. The method of claim 10 , wherein determining that the test content item violates a policy further comprises:

identifying the test content item as ineligible for presentation to users of the online system based on one or more policies of the online system.

16. The method of claim 10 , further comprising:

determining that the test content item complies with the policies of the online system based on the label assigned to the weighted semantic vector with the distance representing the smallest distance between the stored semantic vector of the test content item; and

identifying the test content item as eligible for presentation to users of the online system based on one or more policies of the online system.

17. The method of claim 10 , further comprising:

identifying semantic vectors of the stored semantic vectors that are compliant with the policies of the online system;

for a semantic vector determined to be in violation of a policy of the online system, identifying a plurality of compliant semantic vectors within a threshold distance of the ineligible semantic vector; and

removing the semantic vector in violation of the policy of the online system from the stored semantic vectors when the number of compliment semantic vectors meets a threshold number.

18. The method of claim 10 , wherein the distance comprises a Euclidean distance or a Hamming distance.

19. The method of claim 10 , wherein the second threshold distance is a greater distance than the first threshold distance.

20. A non-transitory computer readable medium storing instructions comprising:

storing, in an online system, a plurality of semantic vectors, each semantic vector representing a content item within the online system and assigned a label indicating whether the image has violated a policy of the online system, the policy identifying one or more attributes of content items considered ineligible for presentation to users of the online system;

receiving, at the online system, a test content item from a user of the online system;

extracting a semantic vector from the test content item based on features within the test content item, the semantic vector indicating one or more semantic features of the test content item;

determining a distance between each stored semantic vector and the extracted semantic vector of the test content item;

selecting a nearest subset of the stored semantic vectors based on the determined distances;

assigning a weight to each of the nearest subset of the stored semantic vectors, wherein the weight is inversely related to the determined distance; and

determining whether the test content item violates the policy of the online system by aggregating the labels assigned to the selected nearest subset of the stored semantic vectors weighted according to the assigned weights for the selected nearest subset of the stored semantic vectors.

Assignments (2)
CHANGE OF NAME Recorded Nov 18, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058897/0824 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 8, 2018
From: STRAUSS, EMANUEL ALEXANDRE; LUO, ENMING
To: FACEBOOK, INC.
Reel/Frame 046583/0288 →
Cited By (5)
US 12,229,839 US 12,293,294 US 12,505,470 US 12,597,413 US 12,705,113