This post is 'not' intended to teach people how to use popular predictive modelling APIs for free. Although, to your surprise, this isn't a far fetched possibility. Trained Machine learning models are basically a function that maps feature vectors to the output variable. Upon querying with a test instance, the model predicts an outcome, assigning probability scores to all the possible classes. Google, Amazon etc provides public facing APIs to train predictive models on the subscriber's data, the model can further be used for prediction purposes . This service comes at a cost : Pay per query model, monthly subscription etc.

Lets consider a scenario, A user subscribes for such a service on a trial basis for a fraction of cost and queries the system for as long as he can. With these queries and subsequent output by the model, Can the user reverse engineer the system to emulate the exact/ equivalent model, also replicate the underlying algorithm? Can the stolen model leak sensitive training data as well ? can the feature extraction methods been employed behind the scene also be decoded?

Yes !

How many queries would he need to hit for the same? It depends !

*"Amazon uses logistic regression for classification and provides black-box access to trained models. It uses one-hot-encoding for categorical variables and quantile binning for numeric ones."*

Say for example, if the algorithm being used to train the data was logistic regression .The confidence value in case of logistic regression is nothing but a log-linear function 1/(1+e−(w·x+β)) of the d- dimensional input vector x . All one needs to do is to solve for the unknown d+1 parameters w and β.Any user who wishes to make more than d + 1 queries to a model would then minimize the prediction cost by first running a cross- user model extraction attack, and then using the extracted model for personal use, free of charge.

The goal of such model extracting algorithm would be to estimate a function f' which is a close approximation of actual function f by optimising for minimum test and uniform errors.

If they use tree based models, Decision tree model can be similarly estimated by using path-finding techniques which assigns each node a quasi-identifier.

Meek lawd adversarial classifier reverse engineering is one such approach which gained a lot of popularity. Line-search, adaptive retraining, extract and test are different approaches that can applied for the cause.

Among the different methods that can be applied to keep models, and sensitive training data safe :

- Choose not to provide class probabilities upon prediction, provide only class labels
- if at all class probabilities are being provided as output, round it off
- Use ensembles. Tough to reverse engineer, could save you a lot of money .

For original article click here

- Free machine learning course: Using ML algorithms, practices, and p...
- What are some of the disadvantages of microservices?
- Alation 2021.1 data catalog improves data intelligence
- Nvidia acquisition of Arm faces industry, regulatory hurdles
- Nvidia opens paid, instructor-led AI workshops to the public
- CTO on the need for AI ethics and diversity
- 8 benefits of a warehouse management system
- Supplier segmentation lessons in the wake of COVID-19
- 5 essential dos and don'ts of IoT implementations
- Digital acceleration opens opportunities, widens tech gap
- mob programming

© 2021 TechTarget, Inc. Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central