ziyin dept. of electrical engineering june 9, 2017 talks/retreat-2017/zi yin.pdf · june 9, 2017....

18
Machine Learning for Networking Zi Yin Dept. of Electrical Engineering June 9, 2017

Upload: others

Post on 20-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

MachineLearningforNetworkingZi Yin

Dept.ofElectricalEngineeringJune9,2017

Page 2: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

ML/NeuralNetworksinNetworking

DCN

DeliberateControl

ReflexControl

Workload

ReinforcementLearning(Control)

FunctionApproximation(Learning)

PatternRecognition(Inference/Learning)

Thistalk:MLforFunctionApproximation,LearningandControl

Page 3: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

FunctionApproximation

• Exampleapproximable algorithms:- Lasso(inference)- SVM(classification)- MaxWt Matching- LoadBalancing- ViterbiDecoder,Kalman Filter(forparticularchannels)- etc

AlgorithmInput Output

NeuralNetwork

Page 4: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

FAExample1:Lasso• Recall:LassousedforestimatingswitchqueuesfromTx andRxtimestampsofprobes/packets

LassoNoisyLinearEqn:

D=AQ+N EstimateofQ

NeuralNetwork

Algorithm Relativeerror

Lasso 9%

ReLUNN 7.4%

Page 5: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

FAExample2:LearningSVM

ApproximatedByNeuralNetwork

SVM

NeuralNetwork

Page 6: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

PatternRecognition

• Learnnetworkworkloadsandjobs– Machinetomachinecommunication– Jobidentification

• Mainquestion:– CanNLPandCVtechniquesbeusedtorecognizeandclassifypatternsinmachine-to-machinecommunication?

• Twoexamples:– UseRNNtopredictwebcacherequests– UseCNNtorecognizepatternsinSparkjobsfromnetworktrafficmatrices

Page 7: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

• Givenatraceofweb requests{url1, url2, …} uptoi, predicttherequestati+1

• Important for making decisionson eviction, pre-fetching, …

MachineCommunication:Web Caching

Page 8: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

TheMainSteps

NLPforhumanspeech1. Encodewordsasvectorsin

high-dimensionalspace– NNsperformarithmetic

operations;henceneedtotransformwordstovectors

2. UseanLSTMtoprocessstringofvectorsandpredictnextvector(word)– LSTMlearnsco-occurrence

relations

NLPforM2Mcomms1. Encodeurls asvectorsinhigh-

dimensionalspace

2. UseanLSTMtoprocessstringofvectorsandpredictnextword

Page 9: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

ALanguageModelforWebCacheRequests

• Observation:hypotheticaluseralwaysusesasearchenginetologontoFacebook

• LanguageModelsfromNLP– URLsà ddimensionalvectors(enablesarithmetics)– Occurrencerelationsà LSTMneuralnetwork(learnspatterns)

Page 10: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

• Data:URLrequesttrace(BostonUniversity)• Length: ~1M• 90k unique URLs• ThemostfrequentURLaccountsfor10%oftheentiretrace

• Using URL embedding + LSTM neural net: 47% prediction accuracy

• Using Lempel-Ziv: 26% accuracy- Lempel-Zivisknowntobeoptimalpredictor forstationary-ergodicsources

• Removing temporal correlationsbyrandomlypermuting the trace- accuracy droppedto9%

Prediction of Next WebRequest

Page 11: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

CPUCacheTrace• OptimizeCPUcachingtohelpminimizeI/Otime

• Importantdecisionmaking:evictionandpre-fetching

• LearnCPUrequestsequence

Page 12: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

Methodology• Embedding+LSTMmodels

• Tested on 4 Spec2006 CPU traces– hmmer-100M.trace.gz (Biosequence analysisusinghiddenMarkovmodels)

– sjeng-100M.trace.gz (PlaysthegameofChess)– sphinx3-100M.trace.gz (SpeechtotextprogramfromCMU)– art-100M.trace.gz (Imagerecognitionusingneuralnetworks)

Page 13: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

Predict Next Memory AccessUsingLSTM UsingMostFrequent UsingLast

sphinx3-100M.trace.gz 3.2% 2.6% 0.7%

mcf-100M.trace.gz 5.7% 4.9% 0.5%

sjeng-100M.trace.gz 3.0% 2.6% 0.0%

hmmer-100M.trace.gz 2.7% 2.7% 0.7%

• Resultsdependontheprogram,butalwaysbetterthansimpleschemes

Page 14: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

Job Identification• Classify jobs by observing traffic

• Spark SQL query with 3 nodes– Traffic matrix (3 nodes):

– 30 second with 1 second aggregateà 3x90 matrix

Page 15: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

JobIdentification• RecurringSparkjobs

• Sameprogram,dataandconfiguration

• Canbewellclassifiedbyaconvolutionalneuralnetwork

Page 16: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

JobIdentification• Classifywith90%accuracyusingfirst20secondsoftraffic

• Afterjobisidentified,futurenetworkusagecanbeinferredtoplanaheadandoptimizeperformance

Page 17: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

Summary• Neural networks can learn many known algorithms

• Neural networks can be used to learn machinetomachinecommunicationand jobs

• Optimization can be done based on the knowledge learnedbytheneuralnetworks

Page 18: ZiYin Dept. of Electrical Engineering June 9, 2017 Talks/retreat-2017/Zi Yin.pdf · June 9, 2017. ML/Neural Networks in Networking DCN Deliberate Control Reflex Control Workload Reinforcement

Thankyou