{"id":574,"date":"2026-07-25T00:00:00","date_gmt":"2026-07-24T23:00:00","guid":{"rendered":"https:\/\/kosokoking.com\/?p=574"},"modified":"2026-07-18T21:54:40","modified_gmt":"2026-07-18T20:54:40","slug":"clean-label-attacks-on-ml-classifiers","status":"publish","type":"post","link":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/","title":{"rendered":"Clean label attacks on ML classifiers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A clean label attack is a data poisoning technique that manipulates a machine learning model&#8217;s predictions without altering any training labels. Where label flipping attacks change ground truth labels directly (and leave an obvious forensic trail), a clean label attack modifies the feature values of selected training instances while keeping their original labels intact. The result is a model that misclassifies specific target instances at inference time, trained on data that looks perfectly normal to human reviewers. This article walks through the mechanics of a clean label attack against a multiclass logistic regression classifier, from dataset construction through to a working proof of concept.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The technique was formalised by&nbsp;<a href=\"https:\/\/arxiv.org\/abs\/1804.00792\">Shafahi et al. in their 2018 NeurIPS paper<\/a>, which demonstrated that small, carefully crafted perturbations to training features could cause targeted misclassifications with high success rates, even while overall model accuracy remained largely unchanged. The approach has since been extended to black-box settings, transfer learning pipelines, and end-to-end deep networks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How a clean label attack works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The attack targets the decision boundary between two classes. The adversary selects a specific instance from one class (the target) and wants the model to misclassify it as belonging to another class (the attack class). Rather than touching the target itself, the adversary modifies several training samples from the attack class, shifting their feature representations into the region of the feature space normally occupied by the target class. These shifted samples keep their original attack-class labels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the model retrains on this poisoned data, it encounters a conflict. Points labelled as the attack class now sit in the target class&#8217;s territory. To correctly classify these poisoned points according to their (unchanged) labels, the model adjusts its decision boundary, pushing it into the target class region. If the boundary shifts far enough, the target instance ends up on the wrong side, and the attack succeeds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consider a manufacturing quality control system that classifies parts by measured length and weight into three categories: major defect (class 0), acceptable (class 1), and minor defect (class 2). An adversary wants a batch of acceptable parts to be rejected as major defects. They take several training examples labelled &#8220;major defect&#8221; and subtly alter the recorded length and weight values, pushing these measurements closer to the region where acceptable parts normally sit. The classifier, retrained on this data, warps its boundary to accommodate the contradiction, and the target batch gets flagged as defective.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Generating the dataset<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The walkthrough uses a synthetic three-class dataset generated with scikit-learn&#8217;s&nbsp;<code>make_blobs<\/code>, representing the quality control scenario described above. The dataset contains 1,500 samples with two features each, split 70\/30 into training and test sets with stratified sampling.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import numpy as np\nfrom sklearn.datasets import make_blobs\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\n\nSEED = 1337\nnp.random.seed(SEED)\n\nn_samples = 1500\ncenters_3class = &#91;(0, 6), (4, 3), (8, 6)]\nX_3c, y_3c = make_blobs(\n    n_samples=n_samples,\n    centers=centers_3class,\n    n_features=2,\n    cluster_std=1.15,\n    random_state=SEED,\n)\n\nscaler = StandardScaler()\nX_3c_scaled = scaler.fit_transform(X_3c)\n\nX_train_3c, X_test_3c, y_train_3c, y_test_3c = train_test_split(\n    X_3c_scaled, y_3c, test_size=0.3, random_state=SEED, stratify=y_3c\n)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This produces 1,050 training samples and 450 test samples across three classes, with features standardised to zero mean and unit variance. The three clusters are reasonably well separated, which makes the effect of boundary manipulation easier to observe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Training the baseline One-vs-Rest model<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Standard logistic regression is a binary classifier. For a three-class problem, the&nbsp;<a href=\"https:\/\/scikit-learn.org\/stable\/modules\/multiclass.html\">One-vs-Rest (OvR) strategy<\/a>&nbsp;trains three independent binary classifiers, one per class. The k-th classifier learns to distinguish class k from everything else, producing a score z_k for any input. At prediction time, the class with the highest score wins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each binary classifier learns a weight vector&nbsp;<strong>w<\/strong>_k and intercept b_k. The decision boundary between any two classes i and j is the set of points where their scores are equal, forming a linear boundary in 2D defined by (<strong>w<\/strong>_i &#8211;&nbsp;<strong>w<\/strong>_j)^T&nbsp;<strong>x<\/strong>&nbsp;+ (b_i &#8211; b_j) = 0.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sklearn.linear_model import LogisticRegression\nfrom sklearn.multiclass import OneVsRestClassifier\nfrom sklearn.metrics import accuracy_score\n\nbase_estimator = LogisticRegression(random_state=SEED, C=1.0, solver=\"liblinear\")\nbaseline_model_3c = OneVsRestClassifier(base_estimator)\nbaseline_model_3c.fit(X_train_3c, y_train_3c)\n\ny_pred_baseline_3c = baseline_model_3c.predict(X_test_3c)\nbaseline_accuracy_3c = accuracy_score(y_test_3c, y_pred_baseline_3c)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The baseline model achieves 96.00% accuracy on the clean test set. The extracted parameters from each binary estimator (w_0, b_0, w_1, b_1, w_2, b_2) define the decision boundaries we will manipulate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Selecting a target point<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The attack targets a specific class 1 (acceptable) instance that sits close to the decision boundary separating class 0 and class 1. Points near the boundary are the most vulnerable, because even a small shift in boundary position can flip their classification.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To find this point, calculate the decision function f_01(<strong>x<\/strong>) = (<strong>w<\/strong>_0 &#8211;&nbsp;<strong>w<\/strong>_1)^T&nbsp;<strong>x<\/strong>&nbsp;+ (b_0 &#8211; b_1) for every class 1 training sample. A negative value means the baseline model places the point on the class 1 side of the boundary. The ideal target has the largest negative value, meaning it is correctly classified but sits as close to the boundary as possible.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>w_diff_01_base = w0_base - w1_base\nb_diff_01_base = b0_base - b1_base\n\nclass1_indices_train = np.where(y_train_3c == 1)&#91;0]\nX_class1_train = X_train_3c&#91;class1_indices_train]\n\ndecision_values_01 = X_class1_train @ w_diff_01_base + b_diff_01_base\n\nclass1_on_correct_side = np.where(decision_values_01 &lt; 0)&#91;0]\ntarget_point_index_relative = class1_on_correct_side&#91;\n    np.argmax(decision_values_01&#91;class1_on_correct_side])\n]\ntarget_point_index_absolute = class1_indices_train&#91;target_point_index_relative]\n\nX_target = X_train_3c&#91;target_point_index_absolute]\ny_target = y_train_3c&#91;target_point_index_absolute]\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The selection identifies training index 373 with a decision value of -0.0493. That near-zero value confirms the point is barely inside the class 1 region, making it an ideal candidate for boundary-crossing attacks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Finding neighbours and calculating the perturbation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The next step identifies class 0 training samples that sit nearest to the target. These neighbours anchor the local boundary position, and shifting them across the boundary into class 1 territory is what forces the model to compensate. Scikit-learn&#8217;s&nbsp;<code>NearestNeighbors<\/code>, fitted on class 0 data only, finds the five closest points to the target using Euclidean distance.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sklearn.neighbors import NearestNeighbors\n\nn_neighbors_to_perturb = 5\nclass0_indices_train = np.where(y_train_3c == 0)&#91;0]\nX_class0_train = X_train_3c&#91;class0_indices_train]\n\nnn_finder = NearestNeighbors(n_neighbors=n_neighbors_to_perturb, algorithm='auto')\nnn_finder.fit(X_class0_train)\ndistances, indices_relative = nn_finder.kneighbors(X_target.reshape(1, -1))\nneighbor_indices_absolute = class0_indices_train&#91;indices_relative.flatten()]\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The five identified neighbours sit between 0.10 and 0.30 units from the target in standardised feature space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The perturbation direction is the shortest path across the boundary, which is perpendicular to it. The boundary normal vector is&nbsp;<strong>v<\/strong>_01 = (<strong>w<\/strong>_0 &#8211;&nbsp;<strong>w<\/strong>_1), and pushing a class 0 point into class 1 territory requires moving in the opposite direction. Normalise this to a unit vector and scale it by a magnitude epsilon to control how far each point crosses.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>push_direction = -(w0_base - w1_base)\nunit_push_direction = push_direction \/ np.linalg.norm(push_direction)\n\nepsilon_cross = 0.25\nperturbation_vector = epsilon_cross * unit_push_direction\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With epsilon set to 0.25, the perturbation vector is [0.169, -0.184] in the standardised feature space. Smaller epsilon values produce subtler changes but risk not crossing the boundary far enough. Larger values push the perturbed points further into class 1 territory but make the class 0 label less plausible for the modified features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Applying the attack<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Creating the poisoned dataset is a matter of copying the original training data and replacing each neighbour&#8217;s features with their perturbed versions. Labels stay untouched, which is the defining property of the attack.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>X_train_poisoned = X_train_3c.copy()\ny_train_poisoned = y_train_3c.copy()\n\nfor i, neighbor_idx in enumerate(neighbor_indices_absolute):\n    X_neighbor_original = X_train_3c&#91;neighbor_idx]\n    X_train_poisoned&#91;neighbor_idx] = X_neighbor_original + perturbation_vector\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verifying the perturbation effect by recalculating f_01 for each neighbour confirms the shift. Before perturbation, all five neighbours have positive f_01 values (class 0 side of the boundary). After perturbation, all five have negative values (class 1 side). Only five samples out of 1,050 have been modified, and all retain their original class 0 labels.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Evaluating the results<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Training a fresh OvR model on the poisoned data with identical hyperparameters produces the attack outcome.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>poisoned_model = OneVsRestClassifier(\n    LogisticRegression(random_state=SEED, C=1.0, solver=\"liblinear\")\n)\npoisoned_model.fit(X_train_poisoned, y_train_poisoned)\n\ntarget_pred_poisoned = poisoned_model.predict(X_target.reshape(1, -1))&#91;0]\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Target Point Evaluation:\n  Original True Label:       1\n  Baseline Model Prediction: 1\n  Poisoned Model Prediction: 0\n  Result: Misclassified as Class 0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The attack succeeds. The target point, which the baseline model correctly classified as class 1, is now predicted as class 0 by the poisoned model. The overall test accuracy drops only marginally, from 96.00% to 95.78%, a difference of 0.22 percentage points. The classification report shows the damage is concentrated in class 1 recall (down from ~96% to ~93%), while class 0 precision remains at 98%.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That minimal accuracy drop is precisely what makes clean label attacks dangerous. A blanket accuracy check on a held-out test set would not flag anything unusual. The damage is surgical, affecting only the targeted instance and a small number of nearby points caught in the boundary shift.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What the boundary shift looks like<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Comparing the baseline and poisoned decision boundaries visually makes the mechanism concrete. The boundary between class 0 and class 1 has pushed outward into the class 1 region, absorbing the five perturbed points (which the model must classify as class 0 because that is their label) and, in doing so, swallowing the target point along with them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The five perturbed points act as anchors. They sit in class 1 territory but carry class 0 labels, so the model has no choice but to extend its class 0 region to accommodate them. The target point, sitting right on the edge, gets caught in this expansion.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Practical considerations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A few properties of this attack are worth documenting for anyone building defences or assessing risk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The attack requires knowledge of the model architecture and the existing decision boundary. The perturbation direction is derived directly from the baseline model&#8217;s weight vectors, making this a white-box attack. In practice, a sufficiently motivated adversary might approximate this through model stealing or by training a surrogate on accessible data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The number of neighbours perturbed (five in this case) and the perturbation magnitude (epsilon = 0.25) are tuneable. Fewer neighbours or smaller epsilon values reduce the attack&#8217;s footprint but also reduce the likelihood of success. The attacker must balance stealth against effectiveness.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Detection is harder than with label flipping attacks because the poisoned samples have plausible labels. The class 0 label is arguably still defensible for measurements that sit near the boundary between classes. However, representation-level defences can sometimes catch the anomaly. Spectral signature analysis (looking for outliers in singular value decomposition of per-class feature representations) and activation clustering (checking whether training data within a class forms unexpected subclusters) are two approaches documented in the literature, though both were originally designed for dirty-label backdoor attacks and have mixed results against clean-label variants.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The simplest practical mitigation is data sanitisation through nearest-neighbour conformity checks, flagging training points whose features place them in a region inconsistent with their class according to a held-out reference model. This is not foolproof, particularly when perturbations are small, but it raises the cost of the attack.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A clean label attack modifies the features of a small number of training instances, pushing them across the decision boundary while preserving their original labels. The model, forced to reconcile the contradiction, warps its boundary to accommodate the poisoned points, and a pre-selected target instance gets caught in the shift. The attack is targeted, leaves no label anomalies, and barely affects overall accuracy, making it significantly harder to detect than label-flipping alternatives. The trade-off for the attacker is complexity. Executing the attack requires detailed knowledge of the model&#8217;s parameters and careful selection of which points to perturb and by how much.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[640,630,871,635,642,830,644,662,638,738],"class_list":["post-574","post","type-post","status-publish","format-standard","hentry","category-security","tag-adversarial-ai","tag-ai-red-teaming","tag-clean-label-attack","tag-data-poisoning","tag-decision-boundary","tag-htb-academy","tag-logistic-regression","tag-machine-learning-security","tag-model-security","tag-scikit-learn"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"KosokoKing\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Kosokoking - 31337\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Clean label attacks on ML classifiers - Kosokoking\" \/>\n\t\t<meta property=\"og:description\" content=\"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-24T23:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-18T20:54:40+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/adeife\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@kosokoking\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Clean label attacks on ML classifiers - Kosokoking\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@kosokoking\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#blogposting\",\"name\":\"Clean label attacks on ML classifiers - Kosokoking\",\"headline\":\"Clean label attacks on ML classifiers\",\"author\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/author\\\/adeifekosokokinggmail-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#articleImage\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/wp-content\\\/litespeed\\\/avatar\\\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567\",\"width\":96,\"height\":96,\"caption\":\"KosokoKing\"},\"datePublished\":\"2026-07-25T00:00:00+01:00\",\"dateModified\":\"2026-07-18T21:54:40+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#webpage\"},\"articleSection\":\"Info. Sec., Adversarial AI, AI Red Teaming, Clean Label Attack, Data Poisoning, Decision Boundary, HTB Academy, Logistic Regression, Machine Learning Security, Model Security, Scikit-learn\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kosokoking.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/category\\\/security\\\/#listItem\",\"name\":\"Info. Sec.\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/category\\\/security\\\/#listItem\",\"position\":2,\"name\":\"Info. Sec.\",\"item\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/category\\\/security\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#listItem\",\"name\":\"Clean label attacks on ML classifiers\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#listItem\",\"position\":3,\"name\":\"Clean label attacks on ML classifiers\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/category\\\/security\\\/#listItem\",\"name\":\"Info. Sec.\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/#person\",\"name\":\"KosokoKing\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#personImage\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/wp-content\\\/litespeed\\\/avatar\\\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567\",\"width\":96,\"height\":96,\"caption\":\"KosokoKing\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/author\\\/adeifekosokokinggmail-com\\\/#author\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/author\\\/adeifekosokokinggmail-com\\\/\",\"name\":\"KosokoKing\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#authorImage\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/wp-content\\\/litespeed\\\/avatar\\\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567\",\"width\":96,\"height\":96,\"caption\":\"KosokoKing\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#webpage\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/\",\"name\":\"Clean label attacks on ML classifiers - Kosokoking\",\"description\":\"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/security\\\/clean-label-attacks-on-ml-classifiers\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/author\\\/adeifekosokokinggmail-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/index.php\\\/author\\\/adeifekosokokinggmail-com\\\/#author\"},\"datePublished\":\"2026-07-25T00:00:00+01:00\",\"dateModified\":\"2026-07-18T21:54:40+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kosokoking.com\\\/#website\",\"url\":\"https:\\\/\\\/kosokoking.com\\\/\",\"name\":\"Kosokoking\",\"description\":\"31337\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kosokoking.com\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Clean label attacks on ML classifiers - Kosokoking","description":"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.","canonical_url":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#blogposting","name":"Clean label attacks on ML classifiers - Kosokoking","headline":"Clean label attacks on ML classifiers","author":{"@id":"https:\/\/kosokoking.com\/index.php\/author\/adeifekosokokinggmail-com\/#author"},"publisher":{"@id":"https:\/\/kosokoking.com\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#articleImage","url":"https:\/\/kosokoking.com\/wp-content\/litespeed\/avatar\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567","width":96,"height":96,"caption":"KosokoKing"},"datePublished":"2026-07-25T00:00:00+01:00","dateModified":"2026-07-18T21:54:40+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#webpage"},"isPartOf":{"@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#webpage"},"articleSection":"Info. Sec., Adversarial AI, AI Red Teaming, Clean Label Attack, Data Poisoning, Decision Boundary, HTB Academy, Logistic Regression, Machine Learning Security, Model Security, Scikit-learn"},{"@type":"BreadcrumbList","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kosokoking.com#listItem","position":1,"name":"Home","item":"https:\/\/kosokoking.com","nextItem":{"@type":"ListItem","@id":"https:\/\/kosokoking.com\/index.php\/category\/security\/#listItem","name":"Info. Sec."}},{"@type":"ListItem","@id":"https:\/\/kosokoking.com\/index.php\/category\/security\/#listItem","position":2,"name":"Info. Sec.","item":"https:\/\/kosokoking.com\/index.php\/category\/security\/","nextItem":{"@type":"ListItem","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#listItem","name":"Clean label attacks on ML classifiers"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kosokoking.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#listItem","position":3,"name":"Clean label attacks on ML classifiers","previousItem":{"@type":"ListItem","@id":"https:\/\/kosokoking.com\/index.php\/category\/security\/#listItem","name":"Info. Sec."}}]},{"@type":"Person","@id":"https:\/\/kosokoking.com\/#person","name":"KosokoKing","image":{"@type":"ImageObject","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#personImage","url":"https:\/\/kosokoking.com\/wp-content\/litespeed\/avatar\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567","width":96,"height":96,"caption":"KosokoKing"}},{"@type":"Person","@id":"https:\/\/kosokoking.com\/index.php\/author\/adeifekosokokinggmail-com\/#author","url":"https:\/\/kosokoking.com\/index.php\/author\/adeifekosokokinggmail-com\/","name":"KosokoKing","image":{"@type":"ImageObject","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#authorImage","url":"https:\/\/kosokoking.com\/wp-content\/litespeed\/avatar\/7352636f37cc2ce2fad7b856df236dff.jpg?ver=1784707567","width":96,"height":96,"caption":"KosokoKing"}},{"@type":"WebPage","@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#webpage","url":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/","name":"Clean label attacks on ML classifiers - Kosokoking","description":"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kosokoking.com\/#website"},"breadcrumb":{"@id":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/#breadcrumblist"},"author":{"@id":"https:\/\/kosokoking.com\/index.php\/author\/adeifekosokokinggmail-com\/#author"},"creator":{"@id":"https:\/\/kosokoking.com\/index.php\/author\/adeifekosokokinggmail-com\/#author"},"datePublished":"2026-07-25T00:00:00+01:00","dateModified":"2026-07-18T21:54:40+01:00"},{"@type":"WebSite","@id":"https:\/\/kosokoking.com\/#website","url":"https:\/\/kosokoking.com\/","name":"Kosokoking","description":"31337","inLanguage":"en-US","publisher":{"@id":"https:\/\/kosokoking.com\/#person"}}]},"og:locale":"en_US","og:site_name":"Kosokoking - 31337","og:type":"article","og:title":"Clean label attacks on ML classifiers - Kosokoking","og:description":"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.","og:url":"https:\/\/kosokoking.com\/index.php\/security\/clean-label-attacks-on-ml-classifiers\/","og:image":"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg","og:image:secure_url":"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg","article:published_time":"2026-07-24T23:00:00+00:00","article:modified_time":"2026-07-18T20:54:40+00:00","article:publisher":"https:\/\/facebook.com\/adeife","twitter:card":"summary","twitter:site":"@kosokoking","twitter:title":"Clean label attacks on ML classifiers - Kosokoking","twitter:description":"How clean label attacks poison ML classifiers by modifying training features without changing labels, with a practical walkthrough against logistic regression.","twitter:creator":"@kosokoking","twitter:image":"https:\/\/kosokoking.com\/wp-content\/uploads\/2020\/08\/edited-personal-picture-scaled.jpg"},"aioseo_meta_data":{"post_id":"574","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"label","score":90,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":1},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":[],"keywordDensity":{"type":"best","score":9,"maxScore":9,"error":0}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2026-07-18 20:54:40","updated":"2026-07-25 06:17:46","seo_analyzer_scan_date":null},"_links":{"self":[{"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/posts\/574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/comments?post=574"}],"version-history":[{"count":1,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/posts\/574\/revisions\/575"}],"wp:attachment":[{"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kosokoking.com\/index.php\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}