Imagine you are running a high-frequency data pipeline, and you need to select a representative subset of data points under a strict memory budget. Alternatively, imagine you are hiring a team of temporary workers arriving one by one, and you must make an immediate, irrevocable decision to hire or reject each applicant on the spot.
In an ideal, offline world, you would look at all available options and apply a greedy algorithm: start with an empty set, scan the entire dataset, select the single best item, and repeat. For a broad class of problems characterized by diminishing returns—formally known as submodular maximization—this simple greedy strategy is remarkably close to optimal.
But in streaming and online settings, the luxury of scanning the dataset multiple times disappears. You see an item once, and it is gone. How can you replicate the guarantees of a greedy algorithm in a single pass?
The answer lies in marginal gain thresholding. Instead of searching for the absolute best item at each step, you establish a fixed or adaptive "quality bar" (a threshold). If an incoming item's marginal contribution to your current objective exceeds this bar, you select it immediately.
Why Thresholding Replicates Greedy Selection
To understand why thresholding works, we have to look at the mathematical property of submodularity. A function $f$ is submodular if adding an item to a small set yields a larger marginal gain than adding it to a larger set. That is, if $A \subseteq B$, then:
$$\Delta(e \mid A) \ge \Delta(e \mid B)$$
where $\Delta(e \mid S) = f(S \cup \{e\}) - f(S)$ represents the marginal utility of item $e$ given the current selection $S$.
In an offline greedy algorithm, we always choose $e = \arg\max \Delta(e \mid S)$. In a streaming setting, we cannot know if a better item is coming down the line. However, if we set a threshold $\theta$ and accept any item where $\Delta(e \mid S) \ge \theta$, submodularity gives us a powerful structural guarantee:
- High Value for Accepted Items: Every item we accept increases our total utility by at least $\theta$.
- Bounded Value for Rejected Items: If we reject an item because its marginal gain is less than $\theta$, its marginal gain will never rise above $\theta$ in the future, because our selected set $S$ only grows, and growing sets diminish marginal returns.
Thus, at the end of the stream, any item from the optimal offline solution that we missed must have provided a marginal utility of less than $\theta$ at the moment it was evaluated. By balancing the utility accumulated from accepted items against the bounded potential of rejected items, thresholding algorithms achieve provable approximation ratios (often getting within $1/2$ or $1 - 1/e$ of the offline optimum) in a single pass.
As Yanhao Wang demonstrates in Fair and Representative Subset Selection from Data Streams, this thresholding paradigm provides orders-of-magnitude speedups over traditional greedy approaches, making complex subset selection practical for high-velocity data environments.
The Unknown Optimum: Multi-Threshold Sieving
The core challenge of thresholding is calibration. If you set the threshold $\theta$ too high, the algorithm becomes overly selective and finishes with an empty budget. If you set $\theta$ too low, the algorithm accepts mediocre items early on, exhausting its capacity before high-value items arrive.
If we knew the value of the optimal offline solution ($OPT$), we could easily compute an ideal static threshold. But in a stream, $OPT$ is unknown.
To bypass this limitation, researchers use a technique called multi-threshold sieving. Instead of maintaining a single candidate set, the algorithm runs multiple instances in parallel, each governed by a different threshold. These thresholds are spaced logarithmically (e.g., $\theta, (1+\epsilon)\theta, (1+\epsilon)^2\theta, \dots$) across the range of possible item values.
Incoming Stream ───► [ Item e ]
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Threshold: 1 Threshold: 2 Threshold: 4
Δ(e|S₁) ≥ 1? Δ(e|S₂) ≥ 2? Δ(e|S₃) ≥ 4?
│ │ │
▼ ▼ ▼
[Accept] [Reject] [Reject]
In An Efficient Streaming Algorithm for the Submodular Cover Problem, Ashkan Norouzi-Fard et al. showed that this multi-threshold sieve acts as an effective proxy for greedy selection. Because the grid is logarithmic, at least one of the active thresholds is guaranteed to be a close approximation of the ideal offline step size. At the end of the stream, the algorithm simply outputs the best solution among all the parallel instances.
This sieving architecture is highly flexible. Qilian Yu et al. applied a logarithmic threshold array in Fast Budgeted Influence Maximization over Multi-Action Event Logs to track influence in massive networks, while Ethan R. Elenberg et al. combined deterministic thresholding with binary search in Streaming Weak Submodularity: Interpreting Neural Networks on the Fly to explain deep learning models in real time without prior knowledge of the data distribution.
Balancing Budgets: Density-Based Thresholding
In many real-world scenarios, items are not created equal; they carry different costs, such as file sizes, financial expenses, or computational overhead. When maximizing an objective under a knapsack (budget) constraint, evaluating raw marginal gain is no longer sufficient. A high-value item that consumes your entire budget is often worse than ten medium-value items that consume a fraction of it.
To handle this, the thresholding criteria shifts from raw utility to marginal density—the ratio of an item's marginal utility to its cost:
$$\frac{\Delta(e \mid S)}{c(e)} \ge \theta$$
In "Bring Your Own Greedy"+Max: Near-Optimal 1/2-Approximations for Submodular Knapsack, Grigory Yaroslavtsev et al. show that filtering items by this value-to-cost ratio allows streaming algorithms to approximate the optimal knapsack configuration within a single pass.
Density-based thresholding also provides a natural defense against adversarial conditions. For instance, Dmitrii Avdiukhin et al. developed an adversarially robust framework in Adversarially Robust Submodular Maximization under Knapsack Constraints by maintaining a structured summary of elements across exponentially decreasing density thresholds. If an adversary deletes items from the selected set after the stream concludes, the remaining elements are guaranteed to maintain a high density of utility relative to the budget.
Dynamic and Sample-Driven Adaptation
While a static sieve of thresholds works well for streaming datasets, online optimization problems—like the classic Secretary Problem or Prophet Inequality—often require thresholds that evolve over time.
One powerful approach is sample-driven thresholding. If the arrival order of the items is random, the algorithm can dedicate an initial "observation phase" to simply watching the stream without making any selections. This phase serves as a statistical sample to calibrate the threshold for the remaining items.
In Secretary Problems with Convex Costs, Seeun Umboh et al. utilize this observation strategy to estimate the quality of the total pool and establish a baseline value-to-resource ratio. Similarly, Rahul Vaze demonstrates in Online Knapsack Problem under Expected Capacity Constraint that an initial sample can effectively reveal the optimal weight-to-value ratio, allowing subsequent online decisions to closely track offline optimal performance.
Alternatively, thresholds can be updated dynamically based on the state of the current solution. In Online Submodular Maximization via Adaptive Thresholds, Zhengchen Yang et al. propose an adaptive mechanism where the threshold is tied directly to the marginal gains of the items currently held in memory. As the quality of the selected set improves, the threshold rises, ensuring that any subsequent item replacement yields a significant upgrade to the overall objective function.
High ──┐ ▲
│ │ As the selected set grows,
│ Threshold │ the quality bar rises to
│ Adapts │ ensure significant upgrades.
▼ │
Low ─────────────────────────────┴─────────────────────────────►
Early Stream Late Stream
This concept of dynamic thresholding is generalized beautifully by primal-dual frameworks. For example, Alina Ene et al. show in Streaming Algorithm for Monotone k-Submodular Maximization with Cardinality Constraints that dual variables can be interpreted as dynamic thresholds. By comparing the marginal utility of arriving elements against these mathematically rigorous, self-adjusting dual thresholds, the system makes optimal real-time decisions without ever needing to look ahead.
Key Foundational Work
Secretary Problems with Convex Costs (2011) — contributed 1 concept elements to this direction.
The online set cover problem (2003) — contributed 1 concept elements to this direction.