wikillm

Paper · 2020-07-10 · cs.LG, stat.ML

Reactive Soft Prototype Computing for Concept Drift Streams

Reactive RSLVQ (RRSLVQ) adds a per-feature Kolmogorov-Smirnov drift detector to a prototype classifier. On detected drift it resets all prototypes to the mean of the recent window, then trains with RSLVQ updates. Author-reported overall mean accuracy is 0.7455, versus 0.6528 for plain RSLVQ and 0.8581 for SAMKNN, the best in the paper's comparison.

Concept driftPrototype learningstream-learninglearning-vector-quantizationkolmogorov-smirnov-test

arXivPDFCodeMarkdown19 min read

AI-compiled by claude-haiku-5-5 on 2026-11-12, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Data that arrives as a stream changes over time. A model that was right yesterday can be wrong today once the underlying pattern shifts. This paper works on classifiers that must keep learning while that happens, and it targets the case where the shifts come often.

The classifier keeps a small set of reference points, called prototypes, spread across the classes. A new item gets the label of the closest prototype. The authors add a change detector. It keeps a short window of the most recent inputs, compares them with older inputs feature by feature, and raises an alarm when the two groups look too different. When the alarm fires, all prototypes are reset to the average of the recent inputs, so the model can relearn the new pattern quickly. Between alarms, the prototypes are adjusted with ordinary updates.

The appeal is that the model stays small and its prototypes can be inspected. The authors report that it adapts quickly and stays stable during change. It is not the most accurate method in their own comparison, though.

TL;DR

  • Reactive RSLVQ combines a prototype classifier (RSLVQ) with a Kolmogorov-Smirnov drift detector that runs on each input feature §4.1.
  • On detection, every prototype is replaced by the mean of the recent window, and the model is then trained on that window §4.3.
  • The paper's cost claims: per-sample time grows with the prototype count m, and memory with d times (m + n), which makes the model suitable for small devices §4.5.
  • Author-reported: mean accuracy 0.7455 on 18 streams, against 0.6528 for RSLVQ and 0.8581 for SAMKNN tab. 4.
  • Relevant if you need a small, interpretable stream classifier with drift handling. Read the Pitfalls section before implementing, because the code and the paper differ in several places.

Problem

Streams with concept drift change their joint distribution over time, so a model trained on old data loses accuracy §3.2. Two issues are described. First, detectors that monitor classifier performance are weaker than detectors that monitor the data distribution, which is what the authors use §3.2. Second, prototype methods that adapt after a change often assume every class is present in the batch, or insert prototypes in an asymmetric way. Real streams can have unbalanced or missing classes, so the authors want an adaptation that tolerates missing classes §2.

The paper also argues that stream benchmarks usually contain few drifts, and it adds frequent reoccurring drift streams to the evaluation §3.2.

Method

The method has two parts. A drift detector (§4.1) decides when to react, and a prototype adaptation (§4.3) decides what to do. Both sit inside an online version of RSLVQ (§4.2), which is trained one sample at a time.

Sliding window and two sub-windows §4.1, eq:kswin_window. The detector keeps the last n samples in a sliding window. Two sub-windows are formed from it. R holds the r newest samples. W holds r samples drawn uniformly at random from the older part of the window. The paper argues that no distribution assumption is needed for W. Samples store their labels.

Kolmogorov-Smirnov test per feature §4.1, eq:empirical_distance, eq:kstest. For each of the d features, the test compares the empirical distributions of W and R. The detector fires when any feature's distance exceeds a threshold. For equal window sizes the threshold is the square root of minus ln(alpha) divided by r. Because the test runs on d features, it is applied d times per step. The paper applies a Bonferroni-style correction to alpha §4.1, but the arithmetic it gives does not hold (see Pitfalls).

RSLVQ classifier §4.2. Each prototype is a Gaussian centre with a shared variance, and each carries a class label. Prediction picks the closest prototype and returns its label §4.2, eq:rslvq_prediction. The learning signal is a posterior-based gradient that pulls a prototype toward a sample of its own class and pushes it away from samples of other classes §4.2, eq:rlsq_probs, eq:rslve_gradients. The gradient is scaled by a running root-mean-square ratio, in the style of Adadelta (the paper calls it momentum-based) §4.2, eq:update_gradients, eq:update_parameters, eq:rslvq_update.

Prototype replacement on drift §4.3, eq:replacement. If drift is detected, all m prototypes are set to the same vector: the mean of the window R. Class labels of the prototypes are kept. The paper argues this is a sensible starting point because the mean of the recent data is a rough mixture estimate regardless of class §4.3.

Training on the window after drift §4.3, alg. 1. After replacement, the paper trains all prototypes on every labelled sample in R, using the same update as in §4.2. Then the update runs for the current sample as well (see Paper vs code for the code's behaviour).

Stability argument §4.4. The paper includes a lemma with a short proof. It argues that a model trained on the new concept has a lower empirical risk on that concept than the old model, as long as the prior distributions of the two concepts differ enough. From this, the authors conclude that false alarms do no harm. The argument assumes a linear relation between the two priors (the constant is called delta in the lemma).

Cost §4.5. Prediction and ordinary updates cost time proportional to m. A drift check costs time proportional to r times m. Memory is proportional to d times (m + n). The paper suggests choosing m + n so that d times (m + n) fits the memory of the target device.

The algorithm, as written in the paper alg. 1, runs in three phases: initialise, predict, learn. The learn phase updates the window, computes the detector, optionally replaces the prototypes and trains on R, then trains on the current sample.

Pseudocode
# Reactive RSLVQ, one stream step  [alg. 1]
# Input:  prototypes theta (m, d) with labels; window psi of last n samples
# Input:  sample x_t (d,) with label y_t; recent size r; significance alpha
# Output: predicted label y_hat, made before learning from x_t

def process_sample(model, window, x_t, y_t):
    # Predict with the model as it is before this sample  [§3, §4.2]
    y_hat = predict_nearest(model, x_t)
    # Store the new sample; the oldest one leaves the window  [§4.1]
    window.push(x_t, y_t)
    # Split the window: R holds the r newest samples  [§4.1]
    # W holds r samples drawn uniformly from the older part  [eq:kswin_window]
    recent, older = split_recent_and_older(window, r)
    # Per feature: Kolmogorov-Smirnov distance between W and R  [§4.1]
    distances = [ks_distance(recent[:, i], older[:, i])
                 for i in range(d)]
    # Threshold for equal sizes at significance alpha  [§4.1, eq:kstest]
    threshold = sqrt(-ln(alpha) / r)
    if max(distances) > threshold:
        # Replace every prototype by the mean of R; labels stay  [§4.3]
        model.theta[:] = mean(recent, axis=0)
        # Train on every labelled sample in R  [§4.3, alg. 1]
        for x_r, y_r in labelled(recent):
            update_all_prototypes(model, x_r, y_r)
    # Regular RSLVQ update for the current sample  [§4.2, alg. 1]
    update_all_prototypes(model, x_t, y_t)
    return y_hat
Pseudocode
# Gradient of prototype j for one labelled sample  [§4.2, eq:rslve_gradients]
def gradient(model, j, x, y):
    # Posterior that x was generated by prototype j  [§4.2, eq:rlsq_probs]
    p_j = posterior(model, j, x)
    # Total posterior of prototypes whose label differs from y  [§4.2, eq:rslvq_lst]
    wrong_mass = sum(posterior(model, k, x)
                     for k in range(m) if model.label[k] != y)
    if model.label[j] == y:
        return -p_j * wrong_mass * (x - model.theta[j])
    return p_j * (1 - wrong_mass) * (x - model.theta[j])
Pseudocode
# Adaptive step for prototype j  [§4.2, eq:rslvq_update]
def update_prototype(model, j, x, y):
    # Gradient for this prototype  [§4.2, eq:rslve_gradients]
    g = gradient(model, j, x, y)
    # Running mean of squared gradients, decay gamma  [§4.2, eq:update_gradients]
    model.grad_acc[j] = gamma * model.grad_acc[j] + (1 - gamma) * g ** 2
    # Step size: ratio of running root-mean-squares, eps for stability  [§4.2]
    step = sqrt(model.step_acc[j] + eps) / sqrt(model.grad_acc[j] + eps) * g
    # Running mean of squared steps  [§4.2, eq:update_parameters]
    model.step_acc[j] = gamma * model.step_acc[j] + (1 - gamma) * step ** 2
    # Move the prototype against the step  [§4.2, eq:rslvq_update]
    model.theta[j] = model.theta[j] - step
Pseudocode
# Predict the label of the nearest prototype  [§4.2, eq:rslvq_prediction]
def predict_nearest(model, x):
    # Squared Euclidean distance to every prototype  [code: rrslvq.py#L168-L171]
    distances = [sum((x - model.theta[j]) ** 2) for j in range(m)]
    # Closest prototype wins; the paper's printed argmin would pick the farthest
    return model.label[argmin(distances)]

Key equations, as printed in the paper (LaTeX labels in brackets):

\mathrm{dist}_{w,r} > c(\alpha)\sqrt{\tfrac{n+r}{nr}}, \quad c(\alpha)=\sqrt{-\tfrac{1}{2}\ln\alpha}, \quad n=r \Rightarrow \sqrt{-\tfrac{\ln\alpha}{r}} §4.1, eq:kstest

P(j\mid x) = \frac{\exp\!\big(-\|x-\theta_j\|^2 / 2\sigma^2\big)}{\sum_{k:\,c_k\ne c_j}\exp\!\big(-\|x-\theta_k\|^2 / 2\sigma^2\big)} §4.2, eq:rlsq_probs

ls_t = \sum_{j:\,c_j\ne y_t} P(j\mid x_t) §4.2, eq:rslvq_lst

g_t = \begin{cases} -P(j\mid x_t)\,ls_t\,(x_t-\theta_j), & c_j=y_t \\ P(j\mid x_t)\,(1-ls_t)\,(x_t-\theta_j), & c_j\ne y_t \end{cases} §4.2, eq:rslve_gradients

\theta_{t+1} = \theta_t - \frac{\sqrt{E[\Delta\theta^2]_t+\epsilon}}{\sqrt{E[g^2]_t+\epsilon}}\, g_t §4.2, eq:rslvq_update

E[g^2]_t = \gamma E[g^2]_{t-1} + (1-\gamma)\, g_t^2 \qquad E[\Delta\theta^2]_t = \gamma E[\Delta\theta^2]_{t-1} + (1-\gamma)\,\Delta\theta_t^2 §4.2, eq:update_gradients, eq:update_parameters

\theta_i^{(new)} = \frac{1}{r}\sum_{x\in R} x \quad \forall i = 1,\dots,m §4.3, eq:replacement

Hyperparameters

Values stated in the paper are cited to the paper. Where the paper says nothing, the value used in the authors' code is given and labelled as such. Code paths are relative to the repository at code_commit.

NameValueWhereNotes
sliding window size n300§4.5 §5.2Used for the detector study and the classifier study. The code's default is 100 rrslvq.py; the Naive Bayes detector script uses 100 cd_naive_bayes.py
recent window r (size of R and W)30§4.1 §5.2The code's stat_size default and the detector scripts also use 30 rrslvq.py cd_naive_bayes.py
significance alpha of the KS test (classifier, detector study)0.0001§5.2Used as the confidence argument in the classifier study study_performance_rrslvq_others.py
Bonferroni-corrected alpha0.0001 (stated)§4.1The stated formula gives about 0.00083, not 0.0001; the code applies no correction. See Pitfalls
prototypes per class mnot stated in the paperstudy_performance_rrslvq_others.pyStudy script uses 4 per class. Grid search tried 1, 2, 5, 7, 9 gridsearch_parameters_rrslvq.py
kernel width sigmanot stated in the paperstudy_performance_rrslvq_others.pyStudy script uses 4. Grid search tried 1, 2, 5, 7, 9 gridsearch_parameters_rrslvq.py. Code default 1.0 rrslvq.py
decay gammanot stated in the paperrrslvq.pyCode default 0.9. Grid search tried 0.9 and 0.99 gridsearch_parameters_rrslvq.py
epsilon (numerical stability)not stated in the paperrrslvq.pyCode uses 1e-8
replacement on drifton§4.3 rrslvq.pyCode flag replace defaults to True
test-then-train batch size10§5.2 §5.3Each step predicts first, then learns
stream length1,000,000 samples§5.3 app. AAccuracy and kappa are moving averages over this length
abrupt drift position (non-reoccurring streams)500,000§5.3Gradual drift width 50,000 §5.3
frequent reoccurring driftstarts at 2,000; next drift 1,000 samples after the last one ends; gradual width 1,000§5.3Stream generators live in an external package; see Paper vs code
ADWIN alpha0.002§5.2Code calls the ADWIN default constructor cd_naive_bayes.py
DDM minimum test size, threshold30; 3§5.2Code calls the DDM default constructor cd_naive_bayes.py
EDDM window, beta30; 0.95§5.2Code calls the EDDM default constructor cd_naive_bayes.py
SEA noise10 %app. AThresholds 8, 9, 7 and 9.5 for the four blocks app. A
HYPER attributes, change magnitude, noise10; 0.001; 10 %app. A
RBF centroids, speed (moderate / fast)50; 0.0001 / 0.001app. A
classifier for the detector studyNaive Bayes§5.2Reset to a new model on each detected drift §5.2

Derived value, not in the paper: with n = r = 30 and alpha = 0.0001, the KS threshold from §4.1, eq:kstest is about 0.554.

Results

Author-reported throughout. The experiments run on synthetic and real streams with interleaved test-then-train evaluation, and the tables below are copied with their numbers. The bold winners are the paper's own.

SettingMetricBaselineThis paperSource
Stream classifiers, 18 streams, overall meanAccuracyRSLVQ 0.6528; OZA 0.7971; SAMKNN 0.8581 (best)RRSLVQ 0.7455tab. 4
Stream classifiers, artificial-stream meanAccuracyRSLVQ 0.6899; OZA 0.8178RRSLVQ 0.8072tab. 4
Stream classifiers, real-stream mean (6 datasets)AccuracyRSLVQ 0.5787; SAMKNN 0.8476 (best)RRSLVQ 0.6838tab. 4
Stream classifiers, overall meanKappaRSLVQ 0.3022; OZA 0.554; SAMKNN 0.6569 (best)RRSLVQ 0.4515tab. 5
Drift detectors with Naive Bayes, 12 streams, overall meanAccuracyADWIN 0.7120; DDM 0.6750; EDDM 0.6323KSWIN 0.7837 (best)tab. 3
Drift detectors, drift-point confusion countsTrue positives; false positivesADWIN 71; 173. DDM 0; 12KSWIN 20,659; 51,040tab. 2

Full drift-detector confusion counts tab. 2. Rows are detectors; columns are the four cells of the confusion matrix over all drift and non-drift time steps. Column labels are reworded here.

DetectorCorrect no-driftDrift, not flaggedFlagged, no driftCorrect drift
KSWIN748,956379,34551,04020,659
ADWIN799,823399,93317371
EDDM799,941399,9715533
DDM799,984400,004120

Interleaved mean accuracy of drift detectors with Naive Bayes tab. 3. Stream names follow the paper; a = abrupt, if = incremental fast, im = incremental medium, g = gradual, ra/rg = frequent reoccurring abrupt/gradual. The paper's summary rows are shown at the bottom.

StreamKSWINADWINEDDMDDM
MIXED_a0.86460.90240.50570.4998
MIXED_g0.86450.50040.50000.5001
Hyperplane0.57970.60900.58900.5883
RTG0.63250.70480.63180.6655
RBF_f0.65840.52990.49520.5009
RBF_m0.64590.65120.50340.6019
SEA_a0.84000.89090.70360.8876
SEA_g0.83340.83040.67870.8396
Standard mean0.74560.70890.58530.6435
MIXED_ra0.78300.49020.49000.4896
MIXED_rg0.77660.49210.49010.4975
SEA_ra0.83850.87660.81040.8745
SEA_rg0.83020.86880.80600.8470
Reoccurring mean0.82170.71500.67930.7065
Overall mean0.78370.71200.63230.6750

Interleaved mean accuracy of stream classifiers, 1,000,000 samples tab. 4. Columns: ARF, SAMKNN, HAT, RSLVQ, RRSLVQ (this paper), OZA. Bold marks the paper's winner per row.

StreamARFSAMKNNHATRSLVQRRSLVQOZA
COV0.6990.89370.82210.36470.72780.6909
ELEC0.8560.72500.77500.62200.64480.740
POKER0.80710.79510.64550.72060.57790.7904
WTHR0.73920.77840.67710.65020.67030.7827
GMSC0.9300.92700.88000.78000.92130.9196
SQR0.51140.96590.72960.3340.59930.4439
REAL MEAN0.75720.84760.75480.57870.68380.7556
MIXED_a0.9340.9900.8700.7330.89300.975
MIXED_g0.9120.9900.8700.7330.89380.975
Hyperplane0.50910.56020.6220.52540.62080.5731
RTG0.58270.70080.65820.57690.80750.656
RBF_if0.74570.93710.62420.59390.66480.9353
RBF_im0.79830.93890.73440.59920.67970.9557
SEA_a0.88660.88980.83620.80770.89240.881
SEA_g0.87640.88690.82950.80330.89960.8747
MIXED_ra0.84920.85350.52880.73160.77940.5464
MIXED_rg0.88160.85350.52880.72270.77900.5468
SEA_ra0.86680.87840.83120.80190.88570.9471
SEA_rg0.8510.88080.82730.80490.89080.9471
ARTIFICIAL MEAN0.80780.86330.730.68990.80720.8178
OVERALL MEAN0.79090.85810.73830.65280.74550.7971

Interleaved test-then-train Kappa of stream classifiers, 1,000,000 samples tab. 5. Same columns and bold convention as above.

StreamARFSAMKNNHATRSLVQRRSLVQOZA
COV0.42670.82850.713900.45980.8233
ELEC0.69810.43340.53470.21580.26160.4609
POKER0.66730.62590.36890.49690.34980.6162
WTHR0.33520.44390.26340.2680.27430.47
GMSC0.07880.0020.0069-0.00190.00170.0026
SQRE0.34860.95460.63940.1120.2090.2054
REAL MEAN0.42580.54810.42120.18180.25940.4297
MIXED_a0.86850.97910.73920.46430.81170.9505
MIXED_g0.8230.97910.73920.46430.81380.9505
Hyperplane0.01750.12040.24410.05080.25550.1462
RTG0.16310.34410.2730.13150.25740.1723
RBF_if0.47010.87360.24340.18610.24570.8658
RBF_im0.5940.87730.42970.16010.28310.9063
SEA_a0.74540.72820.60290.54340.73980.7082
SEA_g0.7230.76260.64350.59050.78960.7376
MIXED_ra0.69820.7070.05760.29980.44450.0928
MIXED_rg0.76310.7070.05760.29890.43130.0936
SEA_ra0.69970.71430.6090.57800.73240.8851
SEA_rg0.65610.74260.62860.58020.76460.8851
ARTIFICIAL MEAN0.60180.71130.4390.36230.54740.6162
OVERALL MEAN0.54310.65690.43310.30220.45150.554

No figures are reproduced. Figures fig. 1 to fig. 7 are described in the text: fig. 1 shows the drift types, fig. 2 the sliding-window memory strategy, fig. 3 the sensitivity of the KS distance to window size and alpha, fig. 4 the insertion and optimisation steps of the prototype adaptation, fig. 5 accuracy over time on the frequent reoccurring Mixed stream, fig. 6 memory use and fig. 7 time per sample.

Paper vs code

Repository: https://github.com/ChristophRaab/rrslvq, MIT licence (LICENSE). The GitHub owner matches the first author, Christoph Raab. The paper's footnote links it, so no further search was needed. Commit e265f62e023bd3ca23273b51e06035fd3c0b7c94. All code paths below are relative to the repository root.

  • Training after drift. Paper: after replacement, all prototypes are trained on every labelled sample in R §4.3, alg. 1. Code: after replacement only the current sample is passed to the optimiser rrslvq.py. The window R is never used for training.
  • Gradient. Paper: the gradient carries the factor ls_t, and P(j|x) is normalised over prototypes with labels other than c_j §4.2, eq:rslve_gradients, eq:rlsq_probs. Code: for same-class prototypes the gradient is (posterior among same-class prototypes minus the overall posterior) times (x - theta), and for other classes it is minus the overall posterior times (x - theta). The posterior is normalised over all prototypes rrslvq.py rrslvq.py. These are different formulas.
  • Kernel width. Paper: the kernel is exp(-||x-theta||^2 / (2 sigma^2)) §4.2, eq:rlsq_probs. Code: divides the squared distance by 2 sigma, not 2 sigma^2 rrslvq.py. The docstring calls sigma a variance rrslvq.py. Sigma values in the code therefore do not transfer directly to the paper's formula.
  • Prototype initialisation. Paper: prototypes are drawn from a zero-mean Gaussian with covariance sigma times identity alg. 1, initialisation. Code: prototypes start at the mean of the first batch's samples of each class, plus uniform noise in [-1, 1] rrslvq.py.
  • Uninitialised prototypes. Code: prototype storage is allocated with np.empty rrslvq.py. Only classes present in the first batch are filled rrslvq.py. A class missing from the first batch keeps uninitialised values and its uninitialised label.
  • Prediction. The paper's printed prediction rule takes the argmin of the kernel, which selects the farthest prototype, while its text says nearest §4.2, eq:rslvq_prediction. Code takes the nearest rrslvq.py.
  • Update accumulators after replacement. Code: the running averages of squared gradients and squared steps are not reset when prototypes are replaced rrslvq.py rrslvq.py. The paper does not say what they should be.
  • Detector. The per-feature KS test and the uniform sub-sample W are implemented by KSWIN from scikit-multiflow, which rrslvq.py imports rrslvq.py rrslvq.py. The README says the repository contains a KSWIN detector README.md, but no KSWIN source file is in this checkout, only stale compiled caches under __pycache__/. The sampling of W therefore could not be checked.
  • Window used for replacement. Code: the new prototype is the mean of the last stat_size values of each feature's KSWIN window rrslvq.py. The paper uses the mean of R §4.3, eq:replacement. These match only if the KSWIN recent part equals R.
  • Bonferroni correction. Paper: alpha is corrected with a Bonferroni-style factor §4.1. Code: no correction in rrslvq.py; the detector takes confidence directly rrslvq.py.
  • Detector experiment settings. Paper: KSWIN with alpha 0.0001, ADWIN with alpha 0.002, DDM with minimum test size 30 and threshold 3, EDDM with window 30 and beta 0.95 §5.2. Code: the detector wrapper defaults alpha to 0.001 cd_naive_bayes.py and uses KSWIN with window 100 cd_naive_bayes.py. ADWIN, DDM and EDDM use library defaults cd_naive_bayes.py. The paper's stated settings are not what the script runs.
  • Detector script labels. The script sets the number of batches to 1000 with a batch size of 10 study_perfomance_detectors.py. That is 10,000 samples per stream, not the 100,000 time steps in the paper §5.2. Frequent-reoccurring truth is marked on every batch, because the modulo test is always zero when the batch size is 10 study_perfomance_detectors.py.
  • Classifier study. The classifier experiments use a class called ARSLVQ. That name is not defined in rrslvq.py, and the study scripts that use it do not import it from this repository study_performance_rrslvq_others.py study_performance_rrslvq_others.py. study/gridsearch_parameters_rrslvq.py imports the class as ReactiveRobustSoftLearningVectorQuantization gridsearch_parameters_rrslvq.py but calls ARSLVQ gridsearch_parameters_rrslvq.py, so it would fail as written. The baselines and streams come from an external bix package study_performance_rrslvq_others.py study_performance_rrslvq_others.py. The stream definitions written in that file (for example drift at position 5,000) are overwritten by the bix streams and must not be used study_performance_rrslvq_others.py study_performance_rrslvq_others.py.
  • Parameter selection. Paper: parameters are not stated for the experiments. Code: a random search of 60 configurations over sigma, gamma, prototypes per class and confidence, and the best is chosen by accuracy on the same stream it is then reported on gridsearch_parameters_rrslvq.py. No held-out split is used. The study script uses sigma 4 and 4 prototypes per class study_performance_rrslvq_others.py, which is not one of the grid values, so the reported configuration is not identified.
  • Stored results. results/confusion_matrix.csv rows sum to 1,600,000 each, which does not match the paper's table (1,200,000 per detector) or the script's label count confusion_matrix.csv. The stored file was therefore produced by a different run.

There is no compiled PDF to check against, so equation numbers are unverified (see Pitfalls).

Pitfalls

  • Training on the window. The paper says the window R is used to train the prototypes after replacement. The code trains only on the current sample (see Paper vs code). Implement the paper's version if you want its stability claim, and note that it differs from the released code.
  • Algorithm reference. The paper's algorithm says "Step 12 to 16" for the drift branch, which refers to no numbered step. The intended reading is the training on R described in the text §4.3.
  • Algorithm index. The paper's update line writes theta at index j+1 with a step computed for time t. This is a typo; the update belongs to the same prototype and time step.
  • Bonferroni arithmetic. The paper writes alpha* = floor(alpha / r) = 0.05 / 60 = 0.0001 §4.1. The division gives about 0.00083, and the floor of a value below 1 is 0. The denominator 60 does not match r = 30 either. Use alpha = 0.0001 directly, as the experiments do, and do not treat the correction as established.
  • Sign convention. The paper subtracts its step, and its gradient for same-class prototypes is negative. The code adds its step, and its gradient for the same case is positive. Both move a same-class prototype toward the sample, so this is a convention difference, not a sign error. Keep one convention throughout your implementation.
  • Posterior normalisation. The paper's denominator sums over prototypes whose labels differ from c_j, but its gradient needs the overall posterior. The code normalises over all prototypes. Pick one and state it; the choice changes the gradient magnitude.
  • Equation numbers. The source has no compiled PDF or .aux file, so the equation and table numbers cited here are derived from the LaTeX order and may be off. Use the LaTeX labels in brackets to locate each equation.
  • Stray text after the document. The LaTeX source contains a line after \end{document} that defines delta as p1/p2 with 0 ≤ delta ≤ 1. Inside the document, the lemma defines delta as p2/p1 with delta > 0. The stray line is not rendered, but it shows the definition is inconsistent.
  • Stream counts and totals. The text speaks of 10 standard streams and 6 frequent reoccurring streams §5.2, and of "16 streams" when counting KSWIN's wins §5.2. Table 3 lists 8 standard and 4 reoccurring streams, 12 in all. The 400,004 drifts in the caption match 8 + 4 × 99,999. Table 2's caption gives 120,000,000 time steps, but its cells sum to 1,200,000, and §5.2 gives 100,000 steps per stream. Plan your own evaluation length and drift counts from the stream definitions, not from these totals.
  • Text against tables. The text says RRSLVQ is about 8% better than RSLVQ on real-world streams §5.3. Table 4 gives 0.6838 against 0.5787, a gap of about 10.5 points. The text reports 81% accuracy as an overall mean, but that is the artificial-stream mean (0.8072); the overall mean is 0.7455. The text says RRSLVQ is the only method with kappa above 0.2 on Hyperplane §5.3, but HAT is 0.2441 in Table 5. The text gives the Adwin detection rate as about 0.001 %, but 71 true detections out of 400,004 is about 0.018 %.
  • Costs. Memory is linear in the window size and prototype count, and time per sample grows with the number of prototypes. The paper's claim of constant cost holds only for a fixed prototype count; drift handling itself adds r times m work §4.5.
  • Stability. The stability claim rests on a lemma that assumes the two concepts' priors are linearly related §4.4. The paper also assumes that every real drift changes the prior p(x) §3.2, so a change that affects only p(y|x) is outside the detector's design.
  • Evaluation reliability. The paper reports single values with no variance, repeated runs or confidence intervals. Differences of one or two points between methods are not established by these tables.
  • Missing classes. The paper's claim that missing classes are tolerated §2, §4.3 rests on the replacement step. In the code, missing classes at start-up leave uninitialised prototypes (see Paper vs code). Initialise every class in the first batch, or pass the full class list, before relying on it.
  • Naming. The title says "Reactive Soft Prototype Computing"; the text names the method RRSLVQ; the code class is ReactiveRobustSoftLearningVectorQuantization rrslvq.py. Stream names in the paper's results (RBF_if, RBF_im) differ from its stream list (RBF_m, RBF_f) tab. 1.
  • Installing the code. The repository needs scikit-multiflow (for KSWIN and the streams) and the author's bix package for the experiments. Neither is included.

Lineage

  • Builds on: RSLVQ, the probabilistic prototype classifier the paper extends §4.2 (paper reference key Seo2003). The momentum-style update for RSLVQ comes from §4.2 (reference key Heusinger), and the claim that momentum helps with LVQ drift comes from §4.2 (reference key Biehl.19). The KS test is taken from the literature §4.1 (reference key Lopes2011). The KSWIN detector is described as the authors' own and as part of the repository README.md, though rrslvq.py imports it from scikit-multiflow rrslvq.py.
  • Compared against: ADWIN §5.2, §5.3 as a drift detector; DDM and EDDM as detectors §5.2; RSLVQ as the baseline and HAT, OzaBaggingAdwin, Adaptive Random Forest and SAMKNN as stream classifiers §5.3.
  • Superseded by: not stated.

Source and license

Adapted from “Reactive Soft Prototype Computing for Concept Drift Streams” by Christoph Raab, Moritz Heusinger, Frank-Michael Schleif (arXiv:2007.05432), used under CC BY-SA 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. This page is licensed under CC BY-SA 4.0. Code citations refer to https://github.com/ChristophRaab/rrslvq at commit e265f62e023b (MIT). Any quoted code is shown under that license.