ebook img

Introduction to Machine Learning with Applications in Information Security PDF

498 Pages·2022·10.2 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Introduction to Machine Learning with Applications in Information Security

Introduction to Machine Learning with Applications in Information Security Introduction to Machine Learning with Applications in Information Security, Second Edition provides a classroom-tested introduction to a wide variety of machine learning and deep learning algorithms and techniques, reinforced via realistic applications. The book is accessible and doesn’t prove theorems, or dwell on mathematical theory. The goal is to present topics at an intuitive level, with just enough detail to clarify the underlying concepts. The book covers core classic machine learning topics in depth, including Hidden Markov Models (HMM), Support Vector Machines (SVM), and clustering. Additional machine learning topics include k-Nearest Neighbor (k-NN), boosting, Random Forests, and Linear Discriminant Analysis (LDA). The fundamental deep learn- ing topics of backpropagation, Convolutional Neural Networks (CNN), Multilayer Perceptrons (MLP), and Recurrent Neural Networks (RNN) are covered in depth. A broad range of advanced deep learning architectures are also presented, includ- ing Long Short-Term Memory (LSTM), Generative Adversarial Networks (GAN), Extreme Learning Machines (ELM), Residual Networks (ResNet), Deep Belief Networks (DBN), Bidirectional Encoder Representations from Transformers (BERT), and Word2Vec. Finally, several cutting-edge deep learning topics are discussed, including dropout regularization, attention, explainability, and adversarial attacks. Most of the examples in the book are drawn from the field of information security, with many of the machine learning and deep learning applications focused on mal- ware. The applications presented serve to demystify the topics by illustrating the use of various learning techniques in straightforward scenarios. Some of the exercises in this book require programming, and elementary computing concepts are assumed in a few of the application sections. However, anyone with a modest amount of com- puting experience should have no trouble with this aspect of the book. Instructor resources, including PowerPoint slides, lecture videos, and other relevant material are provided on an accompanying website: http://www.cs.sjsu. edu/~stamp/ML/. Chapman & Hall/CRC Machine Learning & Pattern Recognition A First Course in Machine Learning Simon Rogers, Mark Girolami Statistical Reinforcement Learning: Modern Machine Learning Approaches Masashi Sugiyama Sparse Modeling: Theory, Algorithms, and Applications Irina Rish, Genady Grabarnik Computational Trust Models and Machine Learning Xin Liu, Anwitaman Datta, Ee-Peng Lim Regularization, Optimization, Kernels, and Support Vector Machines Johan A.K. Suykens, Marco Signoretto, Andreas Argyriou Machine Learning: An Algorithmic Perspective, Second Edition Stephen Marsland Bayesian Programming Pierre Bessiere, Emmanuel Mazer, Juan Manuel Ahuactzin, Kamel Mekhnacha Multilinear Subspace Learning: Dimensionality Reduction of Multidimensional Data Haiping Lu, Konstantinos N. Plataniotis, Anastasios Venetsanopoulos Data Science and Machine Learning: Mathematical and Statistical Methods Dirk P. Kroese, Zdravko Botev, Thomas Taimre, Radislav Vaisman Deep Learning and Linguistic Representation Shalom Lappin Artificial Intelligence and Causal Inference Momiao Xiong Introduction to Machine Learning with Applications in Information Security, Second Edition Mark Stamp Entropy Randomization in Machine Learning Yuri S. Popkov, Alexey Yu. Popkov, Yuri A. Dubno For more information on this series please visit: https://www.routledge.com/Chapman-- HallCRC-Machine-Learning--Pattern-Recognition/book-series/CRCMACLEAPAT Introduction to Machine Learning with Applications in Information Security Second Edition Mark Stamp Second edition published 2023 by CRC Press 6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742 and by CRC Press 4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN CRC Press is an imprint of Taylor & Francis Group, LLC © 2023 Mark Stamp First edition published by CRC Press 2017 Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermissions@tandf. co.uk Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for identification and explanation without intent to infringe. ISBN: 978-1-032-20492-5 (hbk) ISBN: 978-1-032-20717-9 (pbk) ISBN: 978-1-003-26487-3 (ebk) DOI: 10.1201/9781003264873 Typeset in Latin Modern font by KnowledgeWorks Global Ltd. Publisher’s note: This book has been prepared from camera-ready copy provided by the authors. Access the Support Material: http://www.cs.sjsu.edu/~stamp/ML/ To Melody, Austin, and Miles. Contents Preface xv About the Author xix Acknowledgments xxi 1 What is Machine Learning? 1 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 About This Book . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Necessary Background . . . . . . . . . . . . . . . . . . . 3 1.4 A Note on Terminology . . . . . . . . . . . . . . . . . . 4 1.5 A Few Too Many Notes . . . . . . . . . . . . . . . . . . 5 I Classic Machine Learning 7 2 A Revealing Introduction to Hidden Markov Models 9 2.1 Introduction and Background . . . . . . . . . . . . . . . 9 2.2 Tree Rings and Temperature . . . . . . . . . . . . . . . 11 2.3 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.4 The Three Problems . . . . . . . . . . . . . . . . . . . . 17 2.5 The Three Solutions . . . . . . . . . . . . . . . . . . . . 18 2.5.1 Scoring . . . . . . . . . . . . . . . . . . . . . . . 18 2.5.2 Uncovering Hidden States . . . . . . . . . . . . . 20 2.5.3 Training . . . . . . . . . . . . . . . . . . . . . . . 21 2.6 Dynamic Programming . . . . . . . . . . . . . . . . . . 23 2.7 HMM Scaling . . . . . . . . . . . . . . . . . . . . . . . . 26 2.8 All Together Now . . . . . . . . . . . . . . . . . . . . . . 28 2.9 English Text Example . . . . . . . . . . . . . . . . . . . 32 vii viii CONTENTS 2.10 The Bottom Line . . . . . . . . . . . . . . . . . . . . . . 36 2.11 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3 Principles of Principal Component Analysis 45 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.2.1 A Brief Review of Linear Algebra . . . . . . . . . 47 3.2.2 Geometric View of Eigenvectors . . . . . . . . . 51 3.2.3 Covariance Matrix . . . . . . . . . . . . . . . . . 53 3.3 Principal Component Analysis . . . . . . . . . . . . . . 56 3.4 SVD Basics . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.5 All Together Now . . . . . . . . . . . . . . . . . . . . . . 63 3.5.1 Training Phase . . . . . . . . . . . . . . . . . . . 63 3.5.2 Scoring Phase . . . . . . . . . . . . . . . . . . . . 65 3.6 A Numerical Example . . . . . . . . . . . . . . . . . . . 67 3.7 The Bottom Line . . . . . . . . . . . . . . . . . . . . . . 70 3.8 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4 A Reassuring Introduction to Support Vector Machines 81 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.2 Constrained Optimization . . . . . . . . . . . . . . . . . 89 4.2.1 Lagrange Multipliers . . . . . . . . . . . . . . . . 91 4.2.2 Lagrangian Duality . . . . . . . . . . . . . . . . . 96 4.3 A Closer Look at SVM . . . . . . . . . . . . . . . . . . . 98 4.3.1 Training and Scoring . . . . . . . . . . . . . . . . 100 4.3.2 Scoring Revisited . . . . . . . . . . . . . . . . . . 103 4.3.3 Support Vectors . . . . . . . . . . . . . . . . . . 103 4.3.4 Training and Scoring Re-revisited . . . . . . . . . 104 4.3.5 The Kernel Trick . . . . . . . . . . . . . . . . . . 106 4.4 All Together Now . . . . . . . . . . . . . . . . . . . . . . 109 4.5 A Note on Quadratic Programming . . . . . . . . . . . . 110 4.6 The Bottom Line . . . . . . . . . . . . . . . . . . . . . . 114 4.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 114 5 A Comprehensible Collection of Clustering Concepts 123 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.2 Overview and Background . . . . . . . . . . . . . . . . . 124 5.3 𝐾-Means . . . . . . . . . . . . . . . . . . . . . . . . . . 126 CONTENTS ix 5.4 Measuring Cluster Quality . . . . . . . . . . . . . . . . . 131 5.4.1 Internal Validation . . . . . . . . . . . . . . . . . 133 5.4.2 External Validation . . . . . . . . . . . . . . . . 140 5.4.3 Visualizing Clusters . . . . . . . . . . . . . . . . 141 5.5 EM Clustering . . . . . . . . . . . . . . . . . . . . . . . 144 5.5.1 Maximum Likelihood Estimator . . . . . . . . . 146 5.5.2 An Elementary EM Example . . . . . . . . . . . 147 5.5.3 EM Algorithm . . . . . . . . . . . . . . . . . . . 151 5.5.4 Gaussian Mixture Example . . . . . . . . . . . . 156 5.6 The Bottom Line . . . . . . . . . . . . . . . . . . . . . . 163 5.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 164 6 Many Mini Topics 171 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.2 𝑘-Nearest Neighbors . . . . . . . . . . . . . . . . . . . . 171 6.3 Boost Your Knowledge of Boosting . . . . . . . . . . . . 174 6.3.1 Football Analogy . . . . . . . . . . . . . . . . . . 174 6.3.2 AdaBoost . . . . . . . . . . . . . . . . . . . . . . 175 6.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . 179 6.4 Random Forest . . . . . . . . . . . . . . . . . . . . . . . 185 6.5 Linear Discriminant Analysis . . . . . . . . . . . . . . . 191 6.5.1 LDA Training . . . . . . . . . . . . . . . . . . . . 192 6.5.2 Numerical Example . . . . . . . . . . . . . . . . 199 6.6 The Bottom Line . . . . . . . . . . . . . . . . . . . . . . 202 6.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 202 II Deep Learning 207 7 Deep Thoughts on Deep Learning 209 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 209 7.2 A Brief History of Neural Networks . . . . . . . . . . . . 210 7.2.1 McCulloch-Pitts Neuron . . . . . . . . . . . . . . 210 7.2.2 Perceptron . . . . . . . . . . . . . . . . . . . . . 211 7.2.3 Multilayer Perceptron . . . . . . . . . . . . . . . 212 7.2.4 AI Winters and AI Summers . . . . . . . . . . . 214 7.3 Why Deep Learning? . . . . . . . . . . . . . . . . . . . . 215 7.4 Decisions, Decisions . . . . . . . . . . . . . . . . . . . . 216 7.5 Basic Deep Learning Architectures . . . . . . . . . . . . 219 7.5.1 Feedforward Neural Networks . . . . . . . . . . . 219

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.