A Framework for Clustering Evolving Data Streams
Paper · 2003 · Charu C. Aggarwal, Jiawei Han, Jianyong Wang et al.
Summary
A stream of records can change while it is being collected. Groups that dominate its early history may become rare, and a brief burst of similar records may matter more than anything that came before it. Clustering groups records by similarity, so the period covered by a clustering changes what it can reveal. The authors ask how to find the groups that characterize a period selected by an analyst when records arrive too quickly to keep revisiting them and the desired period may only become clear after the data has passed.
Their framework, CluStream, separates the work done at arrival from the work done when someone asks a question. As records come in, it maintains many small groups called micro-clusters. Each stores a count and sums that describe the values and arrival times of its members. CluStream periodically saves this state, retaining closely spaced snapshots for the recent past and more widely spaced snapshots farther back. An analyst specifies how far back to look and how many broad groups to find. The framework matches micro-clusters across snapshots, subtracts their older contributions where it can establish a match, and groups the resulting summaries into macro-clusters.
The authors compare CluStream with STREAM on network connection records and charitable donation records, measuring how far records in a requested window fall from their nearest reported cluster centers. CluStream produces lower sums of squared distances in both settings. At time 160 on the network data, using a horizon of 1, STREAM’s average score exceeds its average score by nearly five orders of magnitude. The paper attributes the gap to the combination of window-specific clustering and a finer summary of incoming records. CluStream processes records more slowly during initialization on the real datasets and reaches a higher processing rate once the initial work is complete. Tests on generated streams also examine how processing time grows with the number of attributes and the number of underlying groups.
The snapshot history supports another question: which groups appear, disappear, or persist between periods? In one network example, the authors compare a period of normal connections with a later period dominated by a particular attack. Most records in the two windows fall into micro-clusters identified as disappearing and appearing, respectively. This comparison uses the identities of the maintained groups, and the authors check its interpretation against the original records. The paper gives a mathematical bound on the temporal approximation introduced by snapshot storage. The quality of the resulting clusters is evaluated separately in the experiments.
Deep dive: A Framework for Clustering Evolving Data Streams
CluStream summarizes evolving data as it arrives, then uses saved snapshots to find and compare clusters over time windows chosen by the analyst. · about 36 minutes to read
The problem and its context
A cluster describes a period as well as a population
Clustering starts with records described by some set of attributes. A record is treated as a point whose coordinates give the values of those attributes. A clustering groups points that are similar according to a distance measure or another criterion. For a fixed collection, the selection of records can be settled before the calculation begins. For a stream, the collection keeps changing. An analyst must decide which part of that process the result should describe.
A result for the whole history can be useful when the aim is to summarize what has happened since observation began. When the distribution changes, that result can give a poor account of a shorter period. Imagine a group that accumulated many records in the past and has received few recently. Its size still gives it influence in a clustering of the accumulated collection. A group that appeared recently can have far fewer records in total even if it accounts for much of the current activity. Both groups are part of the history, and their relative importance depends on the time span in the question.
A change in the time span can matter even if the end time stays fixed. A long window may bring together patterns from several periods, while a short one can isolate concentrations that were present only briefly. Moving the end time introduces another kind of comparison. An analyst can use equal-length windows ending at different times to ask whether similar groupings recur or whether an earlier pattern has given way to something else. The paper treats the end time and the duration as distinct parts of a clustering request.
The engineering difficulty comes from the rate and duration of the incoming stream. The authors treat the input as a continuing process whose total volume can grow indefinitely. A method that repeatedly scans an accumulated dataset would need to revisit ever more material. A one-pass method instead makes its updates as each record arrives, carrying forward a summary. Once the summary has replaced the original records for the purposes of computation, it determines which questions the system can answer later.
What earlier stream algorithms retained
The paper places its work alongside earlier efforts to make clustering practical on streams. In the authors' account, those methods addressed the cost of processing the input by reducing clustering to a one-pass calculation over the stream. They discuss STREAM in particular as an approach based on k-means, with cluster centers maintained and combined as computation proceeds. In k-means, the centers represent groups of points, and the placement of those centers determines the partition obtained by assigning points to their nearest center.
A compact set of centers can serve an aggregate calculation. The difficulty arises when centers that stand for different concentrations have already been merged and the analyst later wants to distinguish those concentrations. The new center represents the combined group, and the information used to construct the separate groups may have been lost. The order of arrival matters because it influences which points and centers have already been combined when a different pattern begins to emerge.
The paper also draws on BIRCH for a different idea: retaining a cluster feature vector. A feature vector summarizes an assigned group through quantities that can be updated by addition. CluStream extends that representation to include arrival times. The distinction between this borrowing and the comparison with STREAM is important. The vector supplies a way to represent a group economically. It takes a separate decision about the number of groups to maintain, and about which past states to save, to make that representation serve a changing stream.
One way to extend an aggregate method would be to maintain separate clustering calculations for several possible durations. The cost grows as the number of supported periods grows. Preserving answers for earlier end times would add yet more state. A fixed collection of durations can serve predetermined requests, but the authors want the analyst to choose a period interactively, including after the relevant records have passed. Maintaining a separate running result for every such choice would put that work on the same path as processing new arrivals.
CluStream therefore makes the analyst's choice later in the process. It uses the time available per arrival to preserve small spatial groups and keeps a history of those summaries at selected times. The offline calculation can then choose a duration and a level of detail without redoing ingestion. This design gives the system two different resolutions to manage. Spatial resolution determines how much local structure survives in the groups. Temporal resolution determines how closely a saved state can delimit the requested period. A small distance between saved times helps locate the period, and a fine partition of points helps describe the groups within it.
The method, step by step
From individual records to reusable summaries
CluStream starts by collecting an initial batch. It uses ordinary k-means on this batch to create the first micro-clusters, then changes to an incremental process. A micro-cluster represents a local group of records and retains enough statistics to update its location, spread, and time information. A macro-cluster is a broader group assembled from micro-clusters for a particular analysis. The maintenance process tries to keep many more micro-clusters than the analyst will eventually ask to see as macro-clusters.
After initialization, each arriving record is compared with the current micro-clusters. A nearby group can absorb the record if its boundary permits it. When the record is outside the boundary of its closest group, it starts a group of its own. The algorithm keeps a fixed number of groups in memory, so this second outcome requires retiring an old group or merging existing ones. The state of those groups is saved periodically. At query time, the offline procedure chooses an earlier snapshot and uses it together with the state at the end of the period.
How CluStream turns stream arrivals into window-specific clusters
The steps in order.
The stream supplies each record as a vector with an arrival timestamp. The mathematical description treats every spatial coordinate separately when accumulating sums. In the notation below, observations within the micro-cluster are indexed directly. Their original indices in the stream need not be kept as part of the statistics.
CFᵀ(C) = (CF²ₓ, CF¹ₓ, CF²ₜ, CF¹ₜ, n)
Here C is the collection of records assigned to a micro-cluster, and CFᵀ is the temporal cluster feature vector for that collection. CF²ₓ holds a sum of squares for each data coordinate. CF¹ₓ holds the ordinary sums for the same coordinates. CF²ₜ accumulates squared timestamps, CF¹ₜ accumulates timestamps, and n is the record count. Each spatial vector has d entries, where d is the number of coordinates in a record. The tuple therefore has 2 · d + 3 scalar entries. The identifier or list of identifiers used for tracking belongs to the state maintained alongside this tuple.
CF²ₓ[p] = Σⱼ (xⱼ[p])²
In this expression p selects a coordinate, xⱼ[p] is the value of that coordinate for observation j, and the sum runs over all observations in the group. The brackets on CF²ₓ select its entry for p. Squaring happens before summation. This order lets the statistic describe spread when it is used together with the ordinary sum.
CF¹ₓ[p] = Σⱼ xⱼ[p]
The indices j and p again designate the observations and the selected coordinate. CF¹ₓ[p] is the ordinary sum for that coordinate. The procedure keeps these entries for every spatial dimension in the same group and can combine them independently.
CF²ₜ = Σⱼ Tⱼ²
Tⱼ is the arrival timestamp of observation j. CF²ₜ is the sum of squared timestamps for the whole group. Time here is a scalar associated with the record. The online procedure later uses the timestamp statistics to make room for new groups, while it uses spatial distances to decide which group is closest to an arrival.
CF¹ₜ = Σⱼ Tⱼ
CF¹ₜ is the corresponding sum of arrival timestamps, with the index j ranging over the observations counted in n. Taking the ordinary and squared sums together makes it possible to calculate the mean and standard deviation of those times from the summary.
μₓ = CF¹ₓ / n
Here μₓ is the spatial centroid, a vector giving the mean coordinate values of the members. CF¹ₓ is the vector of spatial sums, and dividing by the record count n means dividing each entry by the same count. The centroid is a representative location for a nonempty group. The group can carry a large count even though the centroid occupies the same number of coordinates as an individual record.
The arithmetic is useful because the summaries accumulate linearly. If a record joins a group, the new state adds that record's feature vector to the group's state. If groups merge, their sums and counts can be pooled. The procedure applies this property to separate sets of records, so the same observation contributes once to the combined statistics.
CFᵀ(C₁ ∪ C₂) = CFᵀ(C₁) + CFᵀ(C₂)
C₁ and C₂ are disjoint collections, and the union symbol denotes their combined collection. CFᵀ is applied to each collection, and addition is entry by entry across their vectors and scalars. The individual records can have identical values and still count separately if they are distinct arrivals.
CFᵀ(C₁ − C₂) = CFᵀ(C₁) − CFᵀ(C₂)
Here C₂ is a subset of C₁, and the set difference on the left keeps just the records in C₁ that are outside C₂. The subtraction on the right is arithmetic on the matching entries of the feature vectors. The subset condition is central. A pair of groups that happen to occupy nearby positions can contain unrelated records, and subtracting their coordinate sums would then have no interpretation as a summary of arrivals. The identifier lists are how the algorithm finds the relevant subsets across time.
What happens at an arrival
The authors call the number of groups kept in memory q. At startup, they save the first batch on disk and cluster it into q groups. The batch size is called InitNumber, and the authors choose it with the cost of the initial k-means calculation in mind. After this preparation, q is governed by the space available for the active summaries. The intention is to represent local structure at much finer granularity than the eventual grouping, while keeping the working state small compared with the volume of a long stream.
For a new record, the algorithm computes its distance to each active centroid and selects the nearest micro-cluster. The selected group has a boundary based on its own spread. The authors define the spread for this test as a root mean square deviation. In terms of distances to the centroid, the root mean square takes the mean squared distance and then takes its square root.
R(M) = √((Σⱼ d(xⱼ, μₓ)²) / n)
M denotes the micro-cluster under consideration, and R(M) denotes its root mean square deviation. In this expression, xⱼ is the full spatial vector of member j, μₓ is the group's centroid, and d inside the parentheses is the distance function. The sum is over the n members. The squaring and square root apply to those distances. The spatial sums and sums of squares are the statistics used to represent the group's location and spread.
B(M) = t · R(M)
B(M) is the group's maximum boundary distance, t is the boundary multiplier, and R(M) is the root mean square deviation. A record within the boundary of the closest micro-cluster is added to it. Increasing t makes the distance test more permissive for a given group. The procedure gives a group with only 1 member a heuristic boundary based on the distance to its nearest other cluster. A singleton can thus acquire more observations even before it has a measured spread from multiple members.
An arrival outside the closest group's boundary is an exception to the normal insertion rule. It could be an isolated unusual value, or it could be the first member of a group that will receive many more records. The same initial response can accommodate either outcome. The procedure gives the record its own micro-cluster and assigns that group a fresh identifier. If similar observations follow, the group can grow. If activity moves elsewhere, the group can eventually become a candidate for removal.
Before adding the new group, the algorithm has to free a slot. Its first choice is to retire a sufficiently old micro-cluster. This decision is based on time information because a group may have many members from periods when it was active and still have little connection to current arrivals. Counting members would give such a group an advantage even if a much smaller group were continually receiving records. The authors aim for a measure that reflects the late arrivals of each group.
They describe the ideal measure as the average timestamp of the latest m arrivals, with m denoting the number of recent members of interest. Keeping those recent timestamps for every group would use space that could otherwise support a larger number of micro-clusters. The approximation uses the moments already stored. For a group with fewer than 2 · m records, the procedure uses the mean of all its timestamps.
μₘ = CF¹ₜ / n
Here μₘ denotes the mean timestamp for micro-cluster M, written with a lower-case subscript in the formula, while m in the recent-arrival rule is the separate count of arrivals of interest. CF¹ₜ is the sum of timestamps in M and n is the count for M. This mean summarizes the entire time history represented by the group.
σₘ = √(CF²ₜ / n − (CF¹ₜ / n)²)
The symbol σₘ denotes the standard deviation of the timestamps in M. CF²ₜ is their sum of squares, CF¹ₜ is their sum, and n is the count. The first term inside the square root is the mean of the squared timestamps. The second term is the square of the mean timestamp.
m / (2 · n)
This is the fraction the authors use to specify the percentile for their relevance stamp under an assumed normal distribution of timestamps. The parameter m gives the number of recent records of interest and n gives the number of records summarized by the group. The purpose is to use the fitted time distribution as a proxy for recent arrivals. The paper describes the percentile by this fraction and motivates it through the late arrivals it wants to represent.
The procedure finds the group with the least recent relevance stamp and tests it against a threshold denoted by δ. A sufficiently old group can be removed to free a slot. If the groups are all too recent for this rule, CluStream instead merges the closest pair. It adds their feature vectors and gives the combined group the union of their identifier lists. The new arrival then starts its group in the freed slot. An identifier assigned at creation is thus still visible within a surviving group after that group has been merged.
How the snapshot history is kept
Each saved snapshot contains the active feature vectors and their identifier lists, indexed by the time of storage. The relevant state for a long historical window might come from well before the recent activity. Keeping every state would make storage grow with elapsed time at the finest clock granularity. Keeping states at just one coarse interval would leave few good choices for the start of a short window. The pyramidal time frame retains states at several intervals, with denser coverage near the present.
Δᵢ = αⁱ
Here Δᵢ is the spacing in clock units between snapshots eligible for order i. The parameter α is the integer base that controls the growth in spacing, and i is the order. Order 0 covers the underlying clock granularity. Higher orders give coarser spacing for a base greater than 1. A time qualifies for order i when it is divisible by the spacing for that order.
A physical snapshot can satisfy the rule for several orders at once. The paper uses clock time 8 with α = 2 to illustrate this: the same state qualifies at orders 0, 1, 2, and 3. There is one state of the stream at that moment. Its eligibility for coarser storage gives a reason to keep it after its place among the most recent fine-grained states has expired. The authors describe assigning nonredundant saves by divisibility and dropping old snapshots as the retention rule advances.
L = αˡ + 1
L is the retention count per order in the generalized rule, and l is the retention parameter. The base α is the same one used for the spacing. The basic scheme keeps α + 1 recent entries of an order. Allowing more entries per order gives the algorithm more opportunities to find an older snapshot from a relatively fine time scale. A snapshot shared by orders only needs one stored copy.
(αˡ + 1) · logₐ(T)
This is the paper's storage estimate for the generalized snapshot scheme. T is the time elapsed from the beginning of the stream, and logₐ(T) denotes the logarithm to base α. The term αˡ + 1 is the retention count. The logarithmic factor expresses the growth in the number of useful time scales. The estimate counts retention across orders and does not take credit for physical snapshots shared between orders. It describes the number of stored states, while the size of each state depends on the summaries it contains.
The authors give a sample archive with α = 2 and l = 2, at clock time 55. The retained times include every clock reading from 50 through 55. Farther back, the sample includes 32, 24, and 16. This illustrates what happens as the same storage rule advances across the different orders. A recent request can choose from closely spaced times. A request with a much older start has fewer choices, but it is also asking about a longer duration, so a larger gap can be small relative to the interval of interest.
How close the selected snapshot can be
Suppose the analyst wants the last h clock units as of time t꜀. The ideal starting boundary is t꜀ − h. CluStream looks for the last available snapshot before that boundary and calls its time tₛ. The selected snapshot reaches a little farther into the past than the requested boundary whenever the boundary lies between saved times. The authors' first bound covers the basic retention scheme.
t꜀ − tₛ ≤ 2 · h
The quantity t꜀ − tₛ is the duration represented by the chosen pair of endpoints, and h is the requested duration. The value 2 is the factor in the first lemma. The proof identifies an order whose spacing is shorter than the requested interval and whose retained run extends back far enough to straddle the desired start.
αʳ⁻¹ < h ≤ αʳ
In the proof, r is the smallest integer whose order has spacing at least h, and α is the base of the time frame. The preceding order has spacing αʳ⁻¹. Its retention rule provides a snapshot at or just before the desired start in the setting of the lemma. The interval from that snapshot to the desired start is at most that order's spacing. Adding the requested duration gives the claimed bound on the selected duration.
t꜀ − tₛ ≤ (1 + 1 / αˡ⁻¹) · h
This is the second lemma's bound for the generalized scheme. The meanings of t꜀, tₛ, and h stay the same. The parameter l controls the number of snapshots kept per order, and α controls how spacing grows. The factor decreases as l grows for a base greater than 1. The result concerns clock time. A clock gap can contain very different numbers and kinds of observations depending on how the stream behaves there.
The paper illustrates the storage cost with a stream running for 100 years at a granularity of 1 second. The basic example with α = 2 gives an estimate of approximately 95 snapshots. With α = 2 and l = 10, the authors give an estimate of roughly 32,343 snapshots and say the duration can be approximated within 0.2%. These are illustrations of the storage and time bounds. Historical states can be kept on disk, leaving the active state in main memory. The authors also suggest a schedule aligned with calendar boundaries and note that its storage and approximation properties would differ from those of the power-based schedule.
How a query becomes a clustering
A macro-clustering request supplies the horizon h and the number k of broad groups to produce. The horizon controls which period contributes data. The requested count controls how finely the resulting data summaries are grouped. Because these inputs enter after ingestion, different requests can use the same retained state. A short horizon can be examined with several choices of k, and a fixed k can be used to compare results over different horizons.
CluStream takes the state at the end of the query and retrieves the snapshot preceding the requested start. It inspects the identifier list of each micro-cluster in the end state, seeking earlier groups whose identifiers are included in it. If some earlier groups later merged, the end state's list can show that they contribute to the same surviving group. CluStream subtracts the feature vectors of those earlier groups from the vector of their descendant. When a surviving group's identifiers have no predecessor in the earlier snapshot, there is no corresponding earlier contribution to subtract.
CFᵂ(M) = CFᵀ(M) − Σᴬ CFᵀ(A)
Here M denotes a micro-cluster in the end state, CFᵀ(M) is its cumulative feature vector, and A ranges over its matched ancestors in the start snapshot. The sum accumulates each matched feature vector once. CFᵂ(M) denotes the resulting window-specific summary for that micro-cluster. The start snapshot determines the effective interval, and the surviving group's lineage determines the records from that interval that are represented in its feature vector.
This step preserves an important distinction between old groups and old contributions. A micro-cluster can have been created long before the selected window, yet receive many points during it. Subtraction can remove the earlier points while preserving the recent ones. A group with no arrivals after the start snapshot can have its count canceled entirely. A group with a positive remaining count can be represented by its new centroid and count, both computed from the remaining feature vector. Its location may differ from the centroid of its full history.
The system then treats each nonempty window-specific group as a point with a weight. Its location is the new centroid, and its weight is the number of records it represents. This gives k-means a smaller collection to process. The authors change the initialization of k-means so that groups with more observations have a greater chance of supplying a seed.
Pr(j) = nⱼ / (Σₐ nₐ)
In this expression Pr(j) denotes the weight-proportional probability of choosing micro-cluster j as a seed candidate from the collection being sampled. Its count is nⱼ, and index a ranges over the eligible micro-clusters whose counts form the denominator. The location used as the seed is the centroid of the selected micro-cluster. The formula expresses the sampling weights. The paper gives the initialization rule at that level.
During assignment, each micro-cluster goes to the nearest seed according to the distance between its centroid and the seed. Its count matters for the update of the seed, which gives more influence to centroids that stand for more records.
c(P) = (Σⱼ∈ᴾ nⱼ · μⱼ) / (Σⱼ∈ᴾ nⱼ)
P is one partition of assigned micro-clusters, and c(P) is the updated center of that partition. The index j runs over the micro-clusters in P, nⱼ is the window-specific count for group j, and μⱼ is its spatial centroid. The numerator accumulates location vectors weighted by count. The denominator is the total number of represented records in the partition. This procedure can refine the placement of the broad centers while keeping the groups produced by the online stage intact as units of assignment.
How the framework compares periods
Evolution analysis takes an earlier and a later end time and uses the same requested horizon for both. It computes window-specific micro-clusters at each endpoint. The comparison follows their identifier lists. A group in the later result with no identifiers present in the earlier result is treated as added. A group from the earlier result with no identifiers present in the later result is treated as deleted. A later group with at least some identifiers in common with the earlier result is treated as retained, even if it also contains other identifiers.
These rules make the result interpretable in terms of the history maintained by the algorithm. A merge can carry a group into a new location or combine it with other groups while leaving a trace of its earlier identity. A retained group can therefore have changed in position and composition. Conversely, a recently created group can have no matching identifier even in a part of the data space where related activity was seen in the past. The comparison concerns correspondence across the selected summaries.
The authors apply macro-clustering separately to the added, deleted, and retained groups. This can give a broader description where many small summaries contribute to a change. The retained share offers a way to judge stability from the algorithm's view of the stream. The actual records are still useful when interpreting a change. For example, the authors use known connection labels to check whether changes flagged by the algorithm correspond to changes in the kind of network traffic present.
Experiments and results
The streams and the comparison
The experiments address several distinct questions. The real datasets allow the authors to compare the geometric quality of clusterings, measure arrival processing, and examine particular changes in the stream. The synthetic datasets let them vary the number of records, the dimensionality, and the number of underlying clusters under controlled conditions. The machine used for the experiments has an Intel Pentium III processor and 512 MB of memory and runs Windows XP Professional.
The direct baseline is STREAM K-means. The authors say they implement it following its published procedure. Both systems receive records at the same speed and use the same amount of memory for intermediate and final clusters in the comparison. The paper mentions BIRCH because earlier work compared STREAM with it on the network data. Here the reported measurements compare CluStream with STREAM. The main difference in the task each performs is the use of history: CluStream reconstructs a summary for the requested window, and STREAM computes its centers from the accumulated input.
The KDD-CUP’99 Network Intrusion dataset contains TCP connection records from two weeks of network traffic. The records represent normal connections as well as attacks, with the attack labels organized into four broad categories and 24 more specific types. Periods with concentrated activity of a particular type make the stream suitable for asking whether a local clustering represents a short interval. Each record has 42 attributes. As in the earlier use of the dataset described by the paper, the experiment uses the 34 continuous attributes and removes one outlier. The comparison requests 5 clusters from each algorithm.
The KDD-CUP’98 Charitable Donation dataset provides a setting with relatively little change in the distribution. It contains 95,412 records describing people who donated in response to a mailing. The authors use 56 fields from the 481 available for each record. To create a stream, they keep the original input order and let the records arrive at a uniform rate. That construction gives a contrast with the network data: the donation stream tests the methods under an ordering imposed for the experiment.
For their generated datasets, the authors vary base sizes from 100K to 1000K points, cluster counts from 4 to 64, and dimensionality from 10 to 100. The records are drawn from a series of Gaussian distributions. The generation process changes the mean and variance of the current distribution every 10K points to make the stream evolve. Because these distributions are chosen as part of the experiment, the authors can set the underlying group count when measuring processing costs.
Unless the experiment specifies another choice, the paper gives α = 2 and l = 10 for saving snapshots, InitNumber = 2000 for initialization, δ = 512 for the relevance threshold, and t = 2 for the boundary factor. Stream speeds are expressed as arrivals per time unit in the setup. The separate processing-rate measurements count how many points the algorithm handles per second. The former sets the amount of input covered by a clock interval in the experiment. The latter measures computation on the test machine.
How the clustering scores are measured
The main measure of clustering quality on the real data is the sum of squared distances, abbreviated SSQ. The authors use the original points in the evaluation window to score the centers supplied by a method. For each point, they find the closest of those centers and square the distance to it. Consequently the score measures how well the supplied centers cover the window, even if the method used an approximate snapshot boundary or a longer history when choosing them.
SSQ(T꜀, H) = Σᵢ d(pᵢ, C(pᵢ))²
SSQ(T꜀, H) denotes the score for the window of length H ending at time T꜀. The index i runs over the observations in that window. The point being evaluated is pᵢ, and C(pᵢ) is the location of its nearest reported macro-cluster center. The function d measures distance between the point and that center. Lower SSQ means the reported centers place the evaluated points closer to a center according to this measure.
This evaluation differs from simply measuring the distances from the compressed centroids used during macro-clustering. Points with different locations can be represented by a single micro-cluster centroid during the query, and they can contribute different amounts of error when scored individually. The original points used for assessment reveal that dispersion. The class labels play a different role: the authors look at them when checking the meaning of clusters in particular network examples.
Clustering quality on the real data
On the network dataset, the authors run each algorithm 5 times and average the SSQ measurements. In one comparison the horizon is 1 and the input speed is 2000 points per time unit. CluStream scores better at almost all plotted times, frequently by several orders of magnitude. At time 160, STREAM’s average SSQ exceeds its average SSQ by nearly five orders of magnitude. The paper uses a logarithmic vertical scale to display the range of values.
A second network comparison uses a horizon of 256 and an input speed of 200 points per time unit. CluStream's average SSQ remains below STREAM's at the reported times, with gaps of orders of magnitude. At time 1250 the authors report a gap of more than 5 orders of magnitude in favor of CluStream. The paper states these examples as relative magnitudes. They describe the distance objective for the specified windows and do not give an absolute SSQ for either of those observations in the numerical discussion.
The authors also describe the CluStream results across runs as usually identical or very similar. Their interpretation of the overall quality comparison gives weight to both parts of the design. The snapshot subtraction changes which history supplies the clustering, and the abundance of micro-clusters gives the offline calculation a finer representation of that history. The baseline's centers can remain influenced by earlier points, even though the evaluation uses points from the selected window.
A label check at time 320 illustrates what the fine grouping can capture. For horizons shorter than 16, all the connections in the queried period carry the neptune label. CluStream's online stage absorbs them into a single micro-cluster, which then appears within a single macro-cluster. The authors report that STREAM mixes those connections with normal traffic or with other attacks. The example shows that the local group can be coherent under the known labels even though the clustering procedure works from the continuous features.
Further examples identify a neptune cluster at time 640, neptune and smurf clusters at time 650, and a smurf cluster at time 1280. These observations describe the composition of particular windows. They help explain what lower distances can mean in this dataset: a cluster center and its members can reflect the locally predominant activity, including a type that has little weight in the stream's accumulated past.
The donation comparisons use an input rate of 200 points per time unit and horizons of 4 and 16. CluStream produces lower SSQ in the comparisons the paper shows. The result broadens the empirical setting beyond the abrupt traffic changes seen in the network records. It applies to the donation records in the input order adopted for the experiment, where the authors expected the aggregate baseline to do reasonably well.
Processing rate and scalability
Throughput for the real datasets is reported in points processed per second, with incoming stream speed set at 2000 points per time unit in the displayed comparisons. CluStream begins at a lower processing rate than STREAM while it builds its initial micro-clusters. Later it achieves a higher processing rate on both streams, even with periodic snapshot writes. The authors explain the difference through the recurrent computations: STREAM performs iterations of k-means, whereas a typical CluStream arrival is assigned by a centroid search, a boundary test, and an update of its feature vector.
The scalability experiments focus on total processing time for the online micro-clustering stage. The authors report that macro-clustering took relatively little time in these runs because its input consists of compact summaries. For the scalability study they set the active micro-cluster count to 10 times the number of underlying clusters. The benchmark can use this rule because the group counts are known when the datasets are generated. For a fixed stream size and feature set, increasing the number of maintained groups increases the work of finding a nearest centroid.
In the dimensionality experiment, the authors keep the number of points and underlying clusters fixed within a series and vary the input dimensionality from 10 to 80. The smallest series named in the discussion is B100C5, with 100K points and 5 clusters. The paper also reports B200C10 and B400C20. For B400C20, the total online processing time is 55 seconds at 10 dimensions and 396 seconds at 80 dimensions. The authors describe the reported growth with dimensionality as linear over the tested range.
CluStream micro-clustering time at different dimensionalities on synthetic B400C20
Processing the same stream takes longer as each record gains dimensions.
The numbers
| System or setting | seconds |
|---|---|
| CluStream at 10 dimensions (this paper) | 55 |
| CluStream at 80 dimensions | 396 |
A separate set of synthetic series keeps the stream size and dimensionality fixed and increases the number of underlying groups from 5 to 40. The paper illustrates the naming convention with B100D10, which contains 100K points and 10 dimensions. It again reports linear growth in processing time over the conditions plotted. Because the maintained group count is tied to the underlying group count, this experiment measures the cost of increasing the required summary resolution along with the complexity of the generated stream.
What the change analysis retrieved
The authors use a rate of 200 connections per time unit for the evolution examples. A comparison ending at times 29 and 30 with a horizon of 1 finds 3 added micro-clusters containing 8 points, 1 deleted micro-cluster containing 1 point, and 22 retained micro-clusters containing 192 points. The paper reports that 0.5% of connections in the earlier interval disappeared and 4% were added in the later one. Inspection of the corresponding records shows normal connections in the added and deleted groups. The authors attribute their unusual positions to particular features, such as the amount of data transferred. The predominant outcome is retention during a period when the traffic has no attacks.
For a more pronounced change, the authors compare the windows ending at 35 and 40, again using a horizon of 1. The earlier period contains normal connections and the later period contains smurf connections. The procedure places 99% of the later smurf connections, or 198 connections, into two added micro-clusters. It also places 99% of the earlier normal connections into 21 deleted micro-clusters. The label check gives an interpretation of the change detected through the identifier lists: the traffic represented in the two windows is substantially different.
The authors also compare windows ending at 640 and 1280 with horizon 16. The points from the later interval, (1264, 1280), belong to one added micro-cluster. The points from the earlier interval, (624, 640), belong to one deleted micro-cluster. According to the recorded labels, the later window contains smurf connections and the earlier one neptune connections. The contrast illustrates why an evolution query can be informative even when both periods are internally concentrated. Each can be described by a compact cluster, and the comparison shows that the clusters have different histories.
What the ablations show
How finely the online stage should summarize
The paper offers parameter sensitivity tests in place of an ablation that removes each major component in turn. One test varies the number of active micro-clusters while asking for macro-clusters over the same duration. The authors express the memory provision as a micro-ratio, the number of maintained micro-clusters divided by the number of natural groups in the data. This relates the size of the summary to the scale of the structure it is intended to preserve.
Both real datasets are tested at an input rate of 200 points per time unit and a horizon of 16. The query ends at time 200 for Charitable Donation and time 1000 for Network Intrusion. The authors score the extracted macro-clusters by SSQ. When the count of micro-clusters equals the underlying group count, the results have high error. As the micro-ratio grows, average SSQ drops. The improvement levels off at a micro-ratio of about 10 on the two datasets at the chosen endpoints.
This comparison isolates the effect of giving the online representation more spatial capacity within CluStream. With a coarse representation, each online assignment has more influence over the eventual grouping because a single summary may already combine observations that would be useful to distinguish. More groups let the offline stage choose among finer centroids. The observed leveling suggests diminishing returns in the tested cases. The experiment does not break down the influence of the snapshot schedule or change the macro-clustering rule.
There is also a computational counterpart to this sensitivity test. A larger summary gives the centroid search more candidates for each arrival, increases the state written per snapshot, and gives offline clustering more pseudo-points. The comparison therefore addresses a practical question about the design: how much more detail can be useful before the measured gain in SSQ becomes small? The location of that plateau is an empirical result for these two real-data queries. The experiments using a micro-ratio of 10 for generated streams use it as a setting for studying cost.
What the boundary multiplier changes
The other sensitivity test varies t, the multiplier applied to the micro-cluster's root mean square deviation. The authors count exceptions, meaning incoming points that fall outside the boundary of their closest micro-cluster. This is a measure of how frequently the ordinary absorption path fails. A failure sends the algorithm through the route that creates a singleton group and finds space for it. An exception can represent the start of a group or an isolated value, so the count describes algorithm behavior before those possibilities can be distinguished.
Exception rate by boundary factor on the Network Intrusion dataset
Wider boundaries reduce the share of arrivals that fail the closest-group boundary test.
The numbers
| System or setting | percent of points |
|---|---|
| Boundary factor 1 | 14.85 |
| Boundary factor 2, the authors' chosen setting (this paper) | 1.62 |
| Boundary factor 4 | 0.176 |
| Boundary factor 6 | 0.0144 |
| Boundary factor 8 | 0.0085 |
The donation stream shows the same overall direction. Its exception rates are 11.18% at t = 1, 0.12% at t = 2, and 0.0074% at t = 4. Both t = 6 and t = 8 give 0.0021% on that dataset. The authors use t = 2 in the main experiments. They regard it as yielding a manageable frequency of exceptions while leaving room for points outside the local boundary to form new groups. Lower exception rates at wider boundaries simply mean fewer exclusions by this test. The metric gives no direct measure of how many new groups the system should have created.
The multiplier test emphasizes how a decision at the level of an individual arrival shapes the state available later. Narrow boundaries can spend many of the available slots on short-lived groups, creating more pressure to retire or merge others. Wide boundaries can assimilate a point that differs from an established group and give later offline analysis only the combined statistics. The measured exception rates show the sensitivity of that decision. To establish which choice best recovers changing groups would require evaluating the groupings or comparing flagged events with known changes at each setting.
What the remaining comparisons isolate
The two quality datasets give the method a changing stream and a relatively stable one. That comparison shows that the reported advantage extends beyond the cases with obvious bursts in the network data. It leaves the source of the advantage partly open because the datasets also differ in their features and in how their stream order is obtained. Similarly, the two network horizons show the advantage under both recent and longer requests, but stream speed also differs between the displayed settings. Those plots establish performance for each combination of conditions.
The evolution examples serve a different purpose. They show what the identity comparison returns when neighboring windows are similar, when traffic changes from normal to attack connections, and when one concentrated attack type replaces another. The check against labels gives those individual examples meaning. The examples do not constitute a controlled test of each identity rule or a rate of correct change detection across all windows. Taken with the sensitivity experiments, they give more detail about where the framework's behavior comes from than the aggregate SSQ comparison alone can supply.
Limitations
Choices and assumptions the authors identify
The authors distinguish the desired window from the interval recoverable from saved states. The generalized time bound can be tightened by retaining more snapshots, at a storage cost. A calendar-based schedule is also possible, with different approximation properties. These qualifications follow from the design: a query can select only a saved state as its subtraction boundary. Comparison with a previous endpoint likewise relies on the relevant historical states being available.
The size of the initial batch is constrained by the cost of running k-means, and the number of active summaries by memory. The paper advises using many more micro-clusters than natural groups and explicitly recognizes that the natural count is generally unknown in a stream. In the synthetic scalability tests the authors control that count. The setup makes the effect of changing it measurable, while picking an appropriate number of summary slots in other streams remains a separate problem.
Recency is approximate too. The authors derive the relevance stamp from a normal approximation to the timestamps represented by a group, using an average when the group is small. Two periods of activity with a long quiet interval between them could produce a timestamp distribution poorly described by those moments. The exact latest arrivals are unavailable from the stored sums alone. The treatment of singleton spatial boundaries and the choice to merge the nearest groups when no group can be retired are also explicit design choices. They let the method continue within its fixed state budget.
The authors present the framework as a basis for applying other clustering paradigms to streams and identify that extension as future work. The macro-clustering investigated in the paper is weighted k-means on micro-cluster summaries. Its treatment of locality and its reported performance arise from that procedure and the chosen distance objective.
What the representation leaves unresolved
The guarantee for the pyramidal time frame is about the length of the selected interval. It supplies no upper bound on the change in SSQ caused by choosing that interval. Extra time near the boundary can contain a large burst of observations, and those observations can shift the window-specific centroids. The temporal error may be small when measured against h while its effect on point counts is appreciable. A separate analysis would be needed to connect the time guarantee to a particular spatial accuracy guarantee.
The subtraction arithmetic is exact for represented subsets. Its usefulness for reconstructing the whole window depends on which groups have survived until the query endpoint. A group can be removed from the active state after receiving records inside a window. The end snapshot then has no surviving descendant through which those records could enter the window summary by the procedure described. The active state is designed to represent dominant micro-clusters with bounded memory, and a past snapshot can only show the groups it captured at its own save time.
A merge preserves the combined moments and identifiers, which can show where the aggregate came from. The current summary does not store a separate coordinate total for every constituent identifier. Consequently the offline routine can cancel the old totals available from the start snapshot, but it cannot produce arbitrary subdivisions of the merged group at the end. Weighted k-means then treats each resulting group as an indivisible pseudo-point. This is the spatial approximation that accompanies the approximation of the starting time.
The same constraint informs interpretation of the evolution categories. A retained identifier can signal continuity through a substantial change in location or membership. Added and deleted designations can also respond to the boundaries of the windows or the retirement rules for group state. Those outputs are useful descriptions of the maintained groups. The connection labels supply the independent evidence that some reported changes correspond to a change in traffic type.
What the experiments establish
The baseline comparison evaluates the practical benefit of CluStream for window-specific questions. It pairs a framework that builds its centers from a summary of the requested history with a baseline that uses the full stream history. A low SSQ for the former shows that its centers describe the requested points more closely. Attribution of the entire gap to the snapshot policy, micro-cluster count, or weighted k-means would require comparisons that separately change those parts while keeping the others fixed.
The scores also have a specific interpretation. SSQ measures geometric fit to the closest centers. The paper checks labels for selected clusters and windows, while error rates for detecting intrusions across the complete dataset remain outside the reported comparison. The result on the donation data applies to the selected fields and the simulated arrival order. Generalization to other evolving streams would require evidence from different distributions and time structures.
Finally, the running times come from the stated machine, input scenarios, and growth ranges. Typical arrival work involves a scan over all active centroids. An exception can additionally trigger retirement or selection of a pair to merge, and snapshotting adds periodic storage work. The reported overall scaling trends describe how those costs combined in the tested settings. The paper gives no bound on the maximum time an individual arrival can take under repeated exceptions or on the latency of an arbitrary historical query.
What came after
The paper closes by proposing that other clustering methods could use the same division between online statistical collection and offline analysis. This is a broader direction than reusing its particular centroid calculation. The framework identifies the state an arrival process must preserve and gives a procedure that a later analysis can call with a time horizon. A different analysis would still need to decide which aspects of the arriving data to keep and how to recover the portion relevant to a query.
A later citation comes from work on identifying risk events from noisy customer incident streams in real time at enterprise scale. Its stated subject connects to CluStream's question of how ongoing arrivals can reveal a newly prominent group. In CluStream that question is approached by preserving small groups and comparing their membership histories across time windows. The later work's title establishes the application and the citation establishes the connection. Which parts of CluStream it adopts or changes remains unspecified. TingIS
Cite
Cite as Charu C. Aggarwal, Jiawei Han, Jianyong Wang and Philip S. Yu. 2003. A Framework for Clustering Evolving Data Streams. VLDB 2003.
@inproceedings{aggarwal2003framework,
title = {{A Framework for Clustering Evolving Data Streams}},
author = {Charu C. Aggarwal, Jiawei Han, Jianyong Wang and Philip S. Yu},
booktitle = {VLDB 2003},
year = {2003}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/aggarwal-2003-framework-clustering-evolving-data-streams/