Summarizing Clouds of Moving Points
Imagine a delivery company receiving millions of vehicle locations. Keeping every point makes later clustering accurate but expensive. Keeping only a few uniformly sampled points is cheap but may erase a remote village containing few vehicles. A coreset is a small weighted summary designed so that every allowed candidate solution has nearly the same objective cost on the summary as on the full data.
The objective matters. For $k$-center, the cost is the largest distance from any point to its nearest chosen center. For $k$-median, distances are summed. For $k$-means, squared distances are summed. A point far from the main cloud can dominate $k$-center, influence $k$-median, and influence $k$-means even more strongly. One sample cannot be called “a coreset” without naming the objective, metric, candidate family, and approximation guarantee.
Consider one-dimensional points $P=\{0,0,1,9,10,10\}$. For one center at $c=5$, the $k$-median cost is $5+5+4+4+5+5=28$, while the $k$-means cost is $25+25+16+16+25+25=132$. Replacing the two zeros by one weighted point $(0,2)$ and the two tens by $(10,2)$ preserves both costs exactly for every center because duplicate points are identical. Replacing the whole set by its mean preserves neither objective for arbitrary centers.
Streaming coresets commonly use merge-reduce. Small batches become weighted summaries; summaries of equal scale are merged and compressed again. This resembles carrying in binary addition and bounds memory logarithmically in stream length. However, approximation errors can accumulate across levels, so the local error budget must be chosen from the desired global guarantee.
A coreset is not merely a small representative-looking sample: it is a weighted summary with a uniform cost guarantee for a specified objective and candidate family. Change the objective, metric, weights, or query class, and the guarantee must be proved again.
| Concept | Intuitive meaning | Exact example | Non-example or boundary | Main assumption | Question answered |
|---|---|---|---|---|---|
| Weighted coreset | Small weighted set preserving objective costs | Duplicate point $p$ represented once with its multiplicity | Unweighted centroids with no uniform guarantee | Objective, metric, and candidate family are fixed | Can the full optimization be replaced by a small instance? |
| $k$-center | Minimize maximum client distance | One remote point can determine radius | Sum of distances | Metric and allowed centers are defined | How small can the worst service distance be? |
| $k$-median | Minimize weighted sum of distances | Cost $\sum_p w_p d(p,C)$ | Squared-distance objective | Nonnegative weights | What centers minimize total travel? |
| $k$-means | Minimize weighted sum of squared distances | Cost $\sum_p w_p d(p,C)^2$ | Maximum radius | Usually Euclidean or specified squared metric | What centers minimize variance-like cost? |
| Sensitivity | Worst relative influence of one point over candidate solutions | Isolated point receives higher sampling probability | Distance from the global mean alone | Denominator and zero-cost cases are handled | Which points are dangerous to miss? |
| Merge-reduce | Merge equal-scale summaries, then compress | Binary levels store at most one summary per level | Unioning summaries forever without reduction | Coreset family is composable with controlled error | How can a stream be summarized with bounded memory? |
Summarizing Clouds of Moving Points
Use $P=\{0,0,1,9,10,10\}$ with unit weights and one candidate center $c=5$.
- Compute the $1$-median cost: $28$.
- Compute the $1$-means cost: $132$.
- Form weighted summary $S=\{(0,2),(1,1),(9,1),(10,2)\}$. Recompute both costs and verify they remain exactly $28$ and $132$.
- Replace all points by the weighted mean $(5,6)$. Its cost at $c=5$ is zero for both objectives, which does not approximate the original costs.
Reflection: why is combining exact duplicates safe for every center while replacing distinct points by their average is only tailored to special calculations?
Coresets, Sensitivity and Geometric Objectives
Let $P$ be a weighted point multiset, $\mathcal C$ a family of candidate solutions, and $f(p,C)\ge0$ the contribution of point $p$ to candidate $C$. Define
$$ \operatorname{cost}_P(C)=\sum_{p\in P}w_p f(p,C). $$
A strong $\varepsilon$-coreset $S$ satisfies
$$ (1-\varepsilon)\operatorname{cost}_P(C)\le\operatorname{cost}_S(C)\le(1+\varepsilon)\operatorname{cost}_P(C) $$
for every $C\in\mathcal C$. A weak coreset may guarantee only that optimizing on $S$ yields a near-optimal solution for $P$. These are different quantifiers.
For clustering, $f(p,C)=d(p,C)^z$, where $d(p,C)=\min_{c\in C}d(p,c)$ and $z=1$ gives $k$-median while $z=2$ gives $k$-means. The $k$-center objective uses a maximum rather than a sum and generally requires different summaries. Facility location adds opening costs, so preserving assignment cost alone may not preserve the full objective.
The sensitivity of point $p$ is conceptually
$$ \sigma(p)=\sup_{C:\operatorname{cost}_P(C)>0}\frac{w_p f(p,C)}{\operatorname{cost}_P(C)}. $$
Sampling probabilities use computable upper bounds $s(p)\ge\sigma(p)$ rather than exact sensitivities. A sampled point gets inverse-probability weight so each fixed candidate’s estimated cost is unbiased. Uniform control over every candidate requires concentration plus a complexity argument for $\mathcal C$, such as a finite net, dimension, or pseudo-dimension bound.
Bounding boxes are composable exact summaries for coordinate extrema: the bounding box of a union is obtained from coordinate-wise minima and maxima of the parts. They preserve range queries of that form, not clustering costs. Mergeability is objective-specific.
flowchart TD
A[Point stream P with weights] --> B[Choose objective and candidate family C]
B --> C[Point contribution f of p and C]
C --> D[Define cost as weighted sum]
D --> E[Bound sensitivity of each point]
E --> F[Sample with probability from sensitivity upper bounds]
F --> G[Assign inverse-probability weights]
G --> H[Concentration for one fixed candidate]
H --> I[Uniform argument over all candidates]
I --> J[Strong epsilon coreset]
J --> K[Optimize weighted small instance]
A --> L[Batch summaries]
L --> M[Merge-reduce levels]
M --> J
B -. change k, metric, or exponent .-> X[Guarantee must be re-established]
classDef navy fill:#17365D,color:#fff,stroke:#17365D;
classDef teal fill:#147D84,color:#fff,stroke:#0D565B;
classDef crimson fill:#C6284D,color:#fff,stroke:#861B35;
classDef purple fill:#6C3BAA,color:#fff,stroke:#472675;
class A,B,C,D navy;
class E,F,G,H purple;
class I,J,K,M teal;
class L teal;
class X crimson;
| Definition or claim | Exact scope | Required assumptions | What it does not imply | Counterexample or consequence |
|---|---|---|---|---|
| Strong coreset | Preserves cost for every allowed candidate $C$ | Fixed objective, metric, $k$, weights, and candidate family | Preserves a different objective | A $k$-median coreset need not preserve $k$-center radius |
| Weak coreset | Optimizing summary yields near-optimal full-data solution | Specific optimizer-transfer theorem | Uniform cost preservation for arbitrary candidates | Diagnostic evaluation of other centers may be wrong |
| Sensitivity sampling | High-influence points receive higher inclusion chance | Valid upper bounds, inverse-probability weights, adequate sample size | Exact sensitivity is always easy to compute | Underestimated remote point is sampled too rarely |
| Uniform convergence | Fixed-candidate concentration extends over $\mathcal C$ | Candidate complexity or covering bound | One fixed-center tail bound suffices automatically | Infinite candidate family cannot use a naive finite union bound |
| Merge composability | Union of coresets summarizes union under compatible definitions | Nonnegative weights and objective-additive cost | Repeated reduction adds no error | Per-level multiplicative errors compound |
| Bounding box merge | Coordinate minima and maxima merge exactly | Fixed coordinates and consistent units | Clustering or density preservation | Same box can contain radically different point clouds |
The coreset invariant is uniform objective preservation: one weighted summary must approximate the cost of every allowed candidate, not just the solution used to build it. Sensitivity controls pointwise influence; candidate-family complexity converts fixed-candidate concentration into that uniform guarantee.
From Weighted Samples to Approximation
Suppose $m$ points are sampled independently with probability $q(p)$ and a selected copy of $p$ receives weight $w_p/(m q(p))$. For fixed $C$, one draw contributes $w_p f(p,C)/(m q(p))$. Summing $m$ draws gives expectation $\operatorname{cost}_P(C)$. Sensitivity-based probabilities bound each normalized contribution relative to the total cost, allowing concentration.
Uniform approximation needs more than unbiasedness. If candidate solutions are finite, a union bound may suffice. For continuous center locations, the proof uses geometric discretization or statistical dimension. Sample size depends on total sensitivity $S=\sum_p s(p)$, error $\varepsilon$, failure probability $\delta$, and complexity of the candidate family. Exact formulas vary by objective and construction.
Merge-reduce uses composability. If $S_1$ and $S_2$ each approximate their batches for every candidate, then their weighted union approximates the union because costs add. Reducing that union introduces another error. Along a path of $L$ reductions, factors like $(1\pm\eta)^L$ accumulate, so choosing $\eta$ on the order of $\varepsilon/L$ keeps global distortion near $\varepsilon$.
This logic can fail with negative weights, incompatible metrics, or summaries constructed for different $k$. It can also fail operationally when floating-point weights overflow or when late data are merged into the wrong window. The algebra of composition assumes the metadata has the same meaning.
flowchart TD
A[Valid sensitivity upper bounds] --> B[Set sampling probabilities]
B --> C[Sample and inverse-probability reweight]
C --> D[Unbiased cost for one fixed candidate]
D --> E[Bound each normalized contribution]
E --> F[Apply concentration]
F --> G[Control all candidates by complexity argument]
G --> H[Strong local coreset]
H --> I[Merge summaries of equal scale]
I --> J[Cost additivity preserves local approximation]
J --> K[Reduce merged weighted set]
K --> L[Compose errors along hierarchy]
L --> M[Global streaming coreset]
A -. sensitivity underestimated .-> X[Rare influential point can be missed]
K -. negative or incompatible weights .-> Y[Composition proof fails]
classDef navy fill:#17365D,color:#fff,stroke:#17365D;
classDef teal fill:#147D84,color:#fff,stroke:#0D565B;
classDef crimson fill:#C6284D,color:#fff,stroke:#861B35;
classDef purple fill:#6C3BAA,color:#fff,stroke:#472675;
class A,B,C navy;
class D,E,F,G purple;
class H,I,J,K,L,M teal;
class X,Y crimson;
From Weighted Samples to Approximation
Suppose a stream uses $L=4$ merge-reduce levels and each reduction produces a strong $\eta$-coreset.
- Along a worst-case path, the upper cost factor is $(1+\eta)^4$ and the lower factor is $(1-\eta)^4$.
- If $\eta=0.02$, the upper factor is about $1.0824$ and the lower factor is about $0.9224$. Thus a local $2\%$ error does not remain $2\%$ globally.
- If the global target is about $10\%$, $\eta=0.02$ is acceptable for this simple bound. Verify both sides rather than checking only the upper factor.
- If $L$ grows with stream length, choose level budgets from the maximum depth or use a nonuniform allocation whose composed product meets the contract.
Assumption-breaking variation: one level builds a $k$-median coreset and the next treats it as a $k$-means coreset. Cost additivity still holds algebraically, but the local preservation premise is for the wrong function, so the global conclusion is invalid.
| Analytical tool | What it establishes | Assumptions | Tightness or limitation | Representative failure case |
|---|---|---|---|---|
| Inverse-probability weighting | Fixed-candidate cost estimator is unbiased | Positive known sampling probabilities | No concentration or uniform guarantee alone | One rare sample receives enormous weight |
| Sensitivity upper bounds | Limits normalized influence of each draw | Bounds dominate true sensitivities | Loose bounds increase sample size | Underestimated outlier destroys accuracy |
| Concentration inequality | High-probability error for one candidate or controlled class | Bounded/subexponential contributions and sample assumptions | Constants depend on distribution | Heavy reweighting creates high variance |
| Candidate complexity | Extends fixed-candidate control uniformly | Finite net, dimension, or pseudo-dimension theorem | Objective-specific | Naive union bound over uncountably many centers |
| Composability | Union of compatible strong coresets summarizes union | Additive nonnegative objective costs | Does not remove prior error | Mixing different metrics or $k$ values |
| Merge-reduce accounting | Bounds memory and accumulated error | Known hierarchy depth and per-level guarantees | Multiplicative factors can be conservative | Reusing full $\varepsilon$ at every level |
| Exact geometric envelope | Preserves specific extrema without probability | Consistent coordinate system | Weak for clustering | Same box hides multimodal and uniform data |
Fleet Locations, Clustering and Sensor Maps
For an approachable delivery problem, weighted coresets can summarize stops before testing depot locations. $k$-median matches total travel distance; $k$-center matches worst service radius; $k$-means emphasizes squared displacement. Selecting the wrong objective may satisfy a theorem and still violate the business goal.
For a fleet at scale, edge devices can build local coresets, which are merged centrally if they share coordinate reference systems, time windows, weights, objective, and parameters. Location uncertainty and map-network distance complicate the Euclidean model. A coreset for latitude/longitude Euclidean distance is not automatically valid for road travel time.
For sensor maps, a bounding box summarizes extrema exactly, while clustering coresets represent spatial density or facility cost. Missing sensors, duplicate telemetry, drift, and varying measurement reliability require explicit weights and population semantics.
Adversarial cases include a rare distant group omitted by uniform sampling, injected extreme points that dominate sensitivity, and clients adapting points after public randomness is known. Per-group coverage, robust objectives, bounded contributions, seed policies, and exact audit samples may be needed beyond the mathematical coreset guarantee.
Fleet Locations, Clustering and Sensor Maps: Geometric Streams & Coresets
A food bank considers one collection point for households at positions $0,1,2,9,10$ on a road.
- For $k$-median, the optimal center is median $2$ with cost $2+1+0+7+8=18$.
- For $k$-means, the mean is $4.4$; evaluate squared cost to understand why the center shifts toward the distant pair.
- For $k$-center, any center around $5$ minimizes maximum distance at about $5$ in the continuous-center model.
- These objectives recommend different facilities. A coreset must preserve the chosen one.
- Compare uniform sample $\{0,1,2\}$, which erases the distant community, with weighted summary $\{(1,3),(9.5,2)\}$. The latter is intuitive but must still be evaluated against multiple candidates; appearance is not a proof.
Success criteria: compute each objective’s recommended center/cost under the declared continuous-center model and test at least five candidate centers on both full and summarized data.
Fleet Locations, Clustering and Sensor Maps: Geometric Streams & Coresets
A mobility platform receives $20$ million GPS points per minute from $200$ regions. It needs hourly $k$-median and $k$-means analyses for $k\le100$, global cost error below $5\%$, critical-region error below $8\%$, and summaries under 2 GB. Some devices duplicate points, upload late, or report mixed coordinate systems.
Design: canonicalize coordinates into a metric appropriate to the decision; deduplicate by event identity; define event-time windows and weights; build local objective-specific sensitivity coresets; merge-reduce with per-level error budgets derived from maximum hierarchy depth; and retain stratified audit samples for regions and rare mobility modes. Build separate summaries if both median and means objectives are required by the available theorem.
Evidence: exact costs on sampled windows; uniform candidate tests, not only the chosen optimum; per-region distortion; rare/outlier inclusion; depth-wise error; weight and precision ranges; late-data corrections; merge-order tests; runtime, memory, and network cost; and adversarial injected points.
Risks: latitude/longitude Euclidean distance misstates travel, local summaries use incompatible versions, uniform sampling misses remote users, and repeated reduction compounds error. Metadata validation and a degraded state are preferable to merging incompatible summaries.
Decision: deploy only if upper confidence bounds meet both global and regional objectives across merge orders and time windows. Verify final candidate centers against a larger raw sample before operational placement decisions.
Construct a Geometry-Aware Summary Plan
Begin with the decision, not the compression. Define points, weights, metric, time window, candidate centers, constraints, objective exponent, and error quantifiers. Then choose sensitivity sampling, deterministic geometric summaries, or merge-reduce and show exactly how local guarantees compose.
Practice: Construct a Geometry-Aware Summary Plan
Use weighted points $P=\{(0,2),(2,1),(8,1),(10,2)\}$ on the real line, where each pair is $(position,weight)$.
Tier 1 — Definitions. Define strong and weak coresets, sensitivity, $k$-center, $k$-median, $k$-means, facility location, bounding box, and merge-reduce. State which objectives are sums and which use a maximum.
Tier 2 — Costs. At center $c=5$, compute weighted $1$-median cost $2\cdot5+1\cdot3+1\cdot3+2\cdot5=26$ and weighted $1$-means cost $2\cdot25+9+9+2\cdot25=118$. Verify the bounding box is $[0,10]$ but cannot determine either cost.
Tier 3 — Weighting. Expand the weights conceptually into duplicates and confirm the costs. Explain why dropping weights changes the represented population. Construct a duplicate-compressed coreset that is exact.
Tier 4 — Counterexamples. Give: two clouds with the same bounding box but different clustering costs; a remote point missed by uniform sampling; a summary valid for $k$-median but tested as $k$-means; and four merge levels each using the full global error budget.
Tier 5 — Error composition. For $L=5$ levels and local error $\eta=0.01$, calculate $(1+\eta)^5$ and $(1-\eta)^5$. Decide whether the resulting interval meets a $6\%$ global target.
Tier 6 — Professional artifact. Write a coreset contract with coordinate system, metric, weights, time semantics, objective, $k$, strong/weak guarantee, $\varepsilon$, $\delta$, sensitivity bounds, candidate complexity, batch size, hierarchy depth, local budgets, precision, merge metadata, regional audits, and fallback.
Debugging prompts: if rare regions vanish, inspect sensitivity and stratification; if costs drift with merge order, inspect metadata and error depth; if weights explode, inspect tiny sampling probabilities; if centers look plausible but costs fail, test many candidates; if road decisions fail, inspect the metric.
Stretch goal: compare one summary intended for $k\le100$ with separate summaries per $k$. Discuss size, flexibility, theorem scope, and operational versioning.
Rubric (10 points): definitions and scopes 2; weighted costs 2; valid counterexamples 2; error composition 2; measurable summary contract 2. Full credit requires separating representational error, sampling error, optimization error, and merge-reduce accumulation.
Decision checklist: define geometry, population, weights, objective, candidate family, $k$, time window, and error; protect sensitive points; preserve weights; budget every reduction level; version merge metadata; and audit many candidates and critical slices. A bounding box is not a clustering coreset, unbiased sampling is not uniform cost preservation, and a coreset for one objective is not automatically reusable for another. These ideas connect streaming geometry to distributed summaries, facility-location optimization, robust clustering, and communication-efficient learning.
Next in the Series
In Distributed, Parallel & Mergeable Sketches, we'll explore Scale sketches across partitions without changing their meaning..