============= AntiNex 1.0.0 ============= .. figure:: /_images/image_training-ai-with-antinex.png :width: 600pt Date: 2018-03-30 I am looking forward to seeing what we can teach Deep Neural Networks about defending software from network exploits. I recently got pretty hooked into `debugging malware`_, and that led me to building datasets for teaching DNN's to predict an attack vs a non-attack record within the OSI network layers. The first non-scaler datasets results were not very great and had a wide variance between 66-89% predictive accuracy. Well as I kept trying different DNN configurations and datasets (and wondering why my xgboost scores were always better), I found out I needed to bound my data in a known range using an `sklearn.preprocessing.MinMaxScaler`_. Wow... I was pretty shocked at how fast the accuracies shot up from there. With just a wide, two-layer DNN the same Keras and Tensorflow models are now repeatedly predicting attacks vs non-attack network traffic with over **99.7%** accuracy. In fact, all of the AntiNex datasets including: Django, Flask, React + Redux, Vue, and Spring can be used to train a DNN within AntiNex to predict an attack with over 99.7% accuracy. I decided this was good enough to build a data pipeline around and made it auto-scale the data before training and making live predictions. By default, AntiNex now automatically converts datasets using this scaler normalization to bound all data into a range between [-1.0, 1.0]. This appears to not only work on classification problems, but for `predicting stock prices`_ using regression as well. .. _debugging malware: https://github.com/jay-johnson/nerfball .. _sklearn.preprocessing.MinMaxScaler: http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html .. _predicting stock prices: https://github.com/jay-johnson/train-ai-with-django-swagger-jwt/blob/56ed94e6807b0f3b0dd7938187d3d97109fd0cdb/tests/scaler-regression.json#L4-L11 I have put the technical docs together on how AntiNex works: http://antinex.readthedocs.io/en/latest/ Here are two Jupyter notebooks for reviewing the process, analysis and validation of the scores: Standalone Jupyter Notebook without any AntiNex components ---------------------------------------------------------- https://github.com/jay-johnson/antinex-core/blob/master/docker/notebooks/AntiNex-Protecting-Django.ipynb Using Pre-trained Deep Neural Networks in a Jupyter Notebook ------------------------------------------------------------ https://github.com/jay-johnson/antinex-core/blob/master/docker/notebooks/AntiNex-Using-Pre-Trained-Deep-Neural-Networks-For-Defense.ipynb I have built the AntiNex v1 stack to run using docker-compose, but I will be exploring using kubernetes to host the containerized, distributed artificial intelligence stack next. For those curious about how I found out that I needed to use scalers: I ended up trying to include volume within my regression stock price predictions while I was benchmarking scipype results with these new, terrible DNN results. I kept removing column after column until I noticed that having volume in the dataset caused my price predictions to be terrible... and the rest is what you see in AntiNex. Thanks for reading! ~~~~~~~~~~~~~~~~~~~ Until next time, Jay Want to catch up? ----------------- * .. raw:: html Email me * `Contact Information`_ .. _Contact Information: https://jaypjohnson.com/contact.html .. SEO Metadata SEO_SET_HEADER_URL="https://jaypjohnson.com/2018-03-30-artificial-intelligence-for-defending-software-applications.html" SEO_SET_HEADER_SITENAME="AntiNex - Using Free Artificial Intelligence for Security" SEO_SET_HEADER_TITLE="AntiNex - Using Free Artificial Intelligence for Security" SEO_SET_HEADER_DESC="Using AI with 99.8% accuracy to defend software applications from attacks" SEO_SET_HEADER_KEYWORDS="software, ai, artificial intelligence, keras, tensorflow, antinex, python, docker" SEO_SET_HEADER_TYPE="website" SEO_SET_HEADER_TWITTER_CREATOR="@jayphjohnson" SEO_SET_HEADER_TWITTER_SITE="@jayphjohnson" SEO_SET_HEADER_SEEALSO="https://jaypjohnson.com/2018-03-30-artificial-intelligence-for-defending-software-applications.html" SEO_SET_HEADER_FAVICON="/favicon.png" SEO_SET_HEADER_IMAGE="/_images/image_training-ai-with-antinex.png" SEO_SET_HEADER_CARD="summary" SEO_SET_HEADER_AUTHOR="Jay Johnson"