Platform guide
...
Analyze your models
Text
Text Classification
4min
the below input parameters are for different attack types to start working with the apis, see text classification docid\ eoqluv3uxbc2 kalisdbo text classification is an early access with limited functionality it is not available in aishield pypi package for early access, kindly contact aishield contact\@bosch com file upload format data the processed data, ready to be passed to the model for prediction, should be saved in a folder download sample data model the model should be saved in either h5 or tensorflow format with full architecture along with token in pkl format also there need to be a base model py file which should load model and token and confire it to give prediction all three file base model py, h5 saved model and pkl saved token should be zipped in a folder and uploaded download sample model common parameters the below table parameters are common for extraction attack type parameter data type description remark model id string model id received during model registration we need to provide this model id in query parameter in url you have to do model registration only once for a model to perform model analysis this will help you track the no of api call made, and it's success metric request body (json format) model api details string use model api to train your model instead of uploading the model as a zip file yes provide this only if use model api is "yes" attack type string you can select the attack type either blackbox or greybox blackbox for performing model analysis, no information about model or data will be used greybox information about data will be leverage for creation of attack data note only 2 5 % of data is needed normalize data string model trained on normalized data if model is trained on normalized data, then set this parameter as "yes" else "no" input dimensions string provide input dimension of the text (100) the parameter should be string in the format for example 100 number of attack queries string number of attack queries that model will be subjected to e g 20000 generally heigher the number of attack queries, better would be the analysis and it would take more time to process (range >0 & <=400000) model framework string original model is built with tensorflow framework curretly supported framework are tensorflow, scikit learn, keras (option \[tensorflow]) vulnerability threshold string number of attack queries that model will be subjected to e g, 0 0 1 threshold percent of stolen model accuracy at which defense model should be generated (range 0 0 1) defense best only string choose to train your model until it achieves the best results or above 95% accuracy when selected "yes" , it will train n number of model and select best model ofcourse this will take longer time if "no" , then once defense model accuracy reached above 95% it will stop encryption strategy int choose a encryption strategy for you model if model is uploaded directly as a zip pick 0, 1 if model is encryted as pyc and uploaded as a zip ignore if use model api is yes select 0 pass tensorflow model as it is, select 1 pass encrypted model it could be pyc file to access all sample artifacts, please visit artifacts docid\ ijneocxostabvvrsq11fa for specific artifact details, refer vulnerability report vulnerability report docid\ hl0ut2mwlcbkt8f97fr w sample attacks sample attacks docid 4g1mjm5lqjfm8t5wbvwpr defense report defense report docid\ vtzlttpja2vsf2j0stlsq defense model defense model docid\ xsbxmzxw4vv14 8nmbf8m note for text classification, supported attack types are extraction