Stealing Parameters Of A Logistic Regression Model
A logistic regression classifier exposes its output probabilities to queries, and because the logit is a linear function of the input, an attacker can invert the sigmoid and solve a linear system to recover every model weight and the bias. With enough queries the attacker reconstructs the full model, not just its predictions.
Regression models — linear, logistic, and their many variants — are popular in AI systems for two reasons: they are fast to train and, more importantly, easy to interpret. That transparency, however, also makes them exceptionally easy to steal.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the model returns a continuous probability derived from a linear function, so each query leaks one linear equation and enough queries let an attacker solve for all weights and the bias.
Impact
An attacker with query access could fully reconstruct the model's parameters, which may expose proprietary model details and enable further attacks that rely on knowing the exact decision boundary.
What the attacker needed
Black-box query access to the model; model returns probabilities or logits
The fix
A service should not return raw probabilities or logits from a sensitive model; it should return only the final class label, add noise or rate limits, and treat model outputs as confidential.
How it was found
- Send a query point to the model and record the returned probability.
- Convert the probability back into the logit using the inverse of the sigmoid.
- Repeat with further query points until there are as many equations as unknown parameters.
- Solve the resulting system of linear equations to obtain the weights and bias.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A logistic regression model draws a straight line to separate two groups and decides which side a data point falls on. If a service lets you ask the model for its answer, and the answer is a probability, you can work backwards mathematically to find the exact line, which is the model's secret. The author shows that a handful of carefully chosen questions is enough to copy the whole model.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.