Weighted Sampling Without Replacement Using Random Scores

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for weighted sampling without replacement are inefficient, requiring O(n·m) time, which poses significant computing challenges and costs when dealing with large datasets from social networks.

Innovation Solution

The proposed solution involves assigning random scores to data elements based on their weights, using a formula like si=r/wi, and employing algorithms like the Median of Medians or SQL queries to select samples, allowing for weighted sampling without replacement in O(n) time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional weighted sampling methods are used, then sampling accuracy is maintained, but processing time increases to O(n·m)

Engineering Contradiction:
Improvesampling accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the sampling process into two independent phases: (1) generating random scores for all n elements using the formula si = r/wi where r is a uniform random value, and (2) selecting the top m elements with highest scores. This segmentation allows the scoring phase to be performed once for all elements, reducing the overall time complexity from O(n·m) to O(n) while preserving sampling accuracy through the mathematical properties of the scoring function.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary action by pre-computing random scores for all data elements before the actual sampling selection. By generating scores si = r/wi for all n elements in advance, the system eliminates the need for repeated weight-based calculations during sampling iterations, thereby reducing processing time from O(n·m) to O(n) while maintaining the correctness of weighted sampling without replacement.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If O(n·m) time complexity method is used, then weighted sampling without replacement is achieved, but computing cost increases for large datasets

Engineering Contradiction:
Improvesampling correctnessVSAvoidcomputing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent fundamentally changes the parameter representation from direct weight values to transformed scores using the relationship si = r/wi. This parameter transformation allows the sampling algorithm to select elements based on score rankings rather than iterative weight-based probability calculations, reducing time complexity from O(n·m) to O(n) and significantly improving computing efficiency for large datasets while preserving sampling correctness.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If random scores are assigned using si=r/wi formula, then sampling speed improves to O(n), but implementation complexity increases

Engineering Contradiction:
Improvesampling speedVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces random scores si = r/wi as an intermediary representation between the original weights and the final sampling selection. This intermediary scoring system simplifies the sampling process to a straightforward top-m selection based on score rankings, achieving O(n) speed while the implementation complexity is managed through the use of standard algorithms like Median of Medians or SQL queries for selecting the top m elements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10120838B2Systems and methods for weighted sampling
Publication Date: 2018.11.06 META PLATFORMS INC
  • US10120838B2 patent drawing
  • US10120838B2 patent drawing
  • US10120838B2 patent drawing

AI summary

Techniques provided herein allow for a plurality of weighted samplings without replacement to be performed in O(n) time. According to some embodiments, the weighted sampling without replacement may be performed on a data set X of data elements {x1, x2, x3, . . . , xn}, where each data element xi of the data set X has an associated weight wi. The data set X may comprise data generated by a social networking system. Each data element xi in the data set X may be assigned with a random score si based on the weight wi associated with the data element xi. The random score si can be used to perform weighted sampling without replacement.