SlideShare a Scribd company logo
1 of 35
Download to read offline
DL FOR
CLOUD PHISHING
Natan Katz Avanan- CP
Agenda
• Challenges in Phishing models
• Current Engine
• The unified DL model
• BN and explainability
Challenges in phishing
• Turing test
• How do we need to label?
• Imbalanced traffic
• Explainability is mandatory
CURRENT
ENGINE
Use Case
• Cloud traffic emails
• The typical customer has a few millions of
emails per day
• Phishing’s rate is assumed to be 1 per 10000
emails
• System calssifies the emails to one of four
categories:
Ø Clean
Ø Phsihing
Ø Spam
Ø Marketing
Development Envirnoment
• Security regulations disallows
downloading the emails
• AWS instances are being run
using Shell. It obviously leads
to many obstacles during the
development
The Model
A double steps XGBoost:
• Combination of tabular feautres
with some text analysis
• In order to achieve good
perfromance (namley, hgih
precision) the second step is
perfomred only if the first model
detects Phishing
Labeling Protocol
An enormous numner of emails
• Labeling emails that were detected by the model as
phishing or spam
• Precision is well measured
• Howerver, new types of phishing are hardly
detected as a result the recall measurements are
endowed with high risk
.
THE UNIFIED
MODEL
Our Objectives
• Construct a DL model
ØModel’s inputs are both text and tabular
data
ØModel’s outputs are the four categories
ØPerformances requirements:
Optimizing Recall for 98% precision
Our “Strategy”
Perform good
embedding for
the emails’ bodies
1
Combine the
embedding with
the tabular data
2
Find a method to
get high precsion
3
EMBEDDING
Current Text Embedding
• We have a DistilBERT model which its outputs
are used as inputs for the XGBOOST:
How does it work?
We follow Huggingface ‘s regular procedure:
Ø Take the text and tokenize it
Ø Use a pre trained model for the embedding
Ø Use Huggingface services for upper layers
and perform a downstream training.
Develompenet Challenges
• Replacing the Jupiter with a tensors
folder
• Modifying the network –achieving
flexibility for the combined stage
• Achieving flexibility for different types
of embeddings
Emebeding Methods
• Base Bert
• Distil Bert
• Fnet
“The Berts”
Base Bert
• bert-base-multilingual-cased
• 12 Layers
DistillBert
• distilbert-base-multilingual-cased
• 6 Layers
” 40 % less parameteres, 60% fatster, preserve 95% of the perfromancse”
Transfromers
Transfromers are an extnesion of CNN
• We measure the entire input in paralel
• We compare a given “pixel” with neighbours
• We perfrom a “pooling” upon this comparison
But: For a sentence of length K we compare all possible “pairs”: all the inputs versus
all the inputs (O(𝐾!))
Fnet
• We replace the multi head layer by FFT one.
FNET
• A paremeters free layer
• Complexity is reduced to something lower (linear to nlog(n))
• We perform the followign formula
• Performances ar slightly worse but faster without trainable params
• We can think that rather measuring each mixing between tokens we measure a
general information flow
The Architecute
• Performing Embedding process
• Terminate the embedding phase using
Huggngface’ pooling layer
• We concatentate the pooled embedding to a
naïve represenstation of the tabular data
• We perfrom a regular 1D NN (with regular
extras such as dropuot and RELU activation)
HOW TO HANDLE
IMBALANCED
TRAFFIC?
Imbalanced Traffic
• While training we have enough data.
• Real world traffic is extremely non-sysmmetric. Recall that we have
about single Phishing email in a traffic of 10k emails.
• Classifcation algorithms commnoly focus on accuracy.
Is it good enough?
Example
We trained a model with 99% accuracy.
ØThe number of clean emails is 1000,000
ØThe number of phishing emails is 100
We will have each day 10,100 alerts in which only 100 of them are valid
Pretty shit
A solution (A and not The)
• We use cross entropy as a loss (L)
• We aim to reduce our FP – usecase’s objective is the precision level
• A regulation term is needed
Which crietira such term needs to satisfy
The precision function
We construct a function F s.t.
• For every real phishing training example it outputs 0
• For every non phishing examples it outputs :
Ø A positive function that increases with the phishing prob.
Ø The gradient does not vanish for high scores
Regulation Function – Actual Example
ay1=-2.5
ay2=0.4
ax1=0.01
ax2=1
mu =(ay2-ay1)/(ax2-ax1)
beq= ay1-mu*ax1
R(prob_phish) =100. * (1 + tanh(mu * prob_phish + beq))
Total loss = cross_entropy + (target<>phishing) * R(prob_phish)
Another Example -Wasserstein
If target is Phishing
y=-1
Else
y=1
R( prob_phish ) =100. * (1 + tanh(mu * prob_phish + beq))
Total loss = cross entropy + (target<>phishing) * R( prob_phish )
EXPLAINABILITY
Background
• DL commonly provides bad explainability
• Epxlainbility in phishing is essential
• We can search for probabilistic graph represnetaion
Bayesian Networks
• We assume that the feautres (as well as the target) are nodes in a
graph
• Each arc’s weight represents the conditional probability between
the nodes
• We use bnlearn to optimize these ditirubtions
• The outcome is the optimal DAG of the data.
Cyn meetup

More Related Content

Similar to Cyn meetup

From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNet
From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNetFrom Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNet
From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNetEric Haibin Lin
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structureSelf-Employed
 
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...Alia Gismatullina
 
B21DA0201_02.ppt
B21DA0201_02.pptB21DA0201_02.ppt
B21DA0201_02.pptDrPreethiD1
 
chap4_slides.ppt
chap4_slides.pptchap4_slides.ppt
chap4_slides.pptStrangerMe2
 
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessAccelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessIgor Sfiligoi
 
Genetic programming
Genetic programmingGenetic programming
Genetic programmingYun-Yan Chi
 
Building Continuous Learning Systems
Building Continuous Learning SystemsBuilding Continuous Learning Systems
Building Continuous Learning SystemsAnuj Gupta
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxIvo Andreev
 
08 neural networks
08 neural networks08 neural networks
08 neural networksankit_ppt
 
Compeition-Level Code Generation with AlphaCode.pptx
Compeition-Level Code Generation with AlphaCode.pptxCompeition-Level Code Generation with AlphaCode.pptx
Compeition-Level Code Generation with AlphaCode.pptxSan Kim
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Simplilearn
 

Similar to Cyn meetup (20)

From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNet
From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNetFrom Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNet
From Hours to Minutes: The Journey of Optimizing Mask-RCNN and BERT Using MXNet
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structure
 
MXNet Workshop
MXNet WorkshopMXNet Workshop
MXNet Workshop
 
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...
Data modeling with a focus on spam detection using K-Nearest Neighbors (KNN) ...
 
Vba Class Level 1
Vba Class Level 1Vba Class Level 1
Vba Class Level 1
 
Chap4 slides
Chap4 slidesChap4 slides
Chap4 slides
 
Chap4 slides
Chap4 slidesChap4 slides
Chap4 slides
 
Chap4 slides
Chap4 slidesChap4 slides
Chap4 slides
 
Chap4 slides
Chap4 slidesChap4 slides
Chap4 slides
 
B21DA0201_02.ppt
B21DA0201_02.pptB21DA0201_02.ppt
B21DA0201_02.ppt
 
chap4_slides.ppt
chap4_slides.pptchap4_slides.ppt
chap4_slides.ppt
 
Chap4 slides
Chap4 slidesChap4 slides
Chap4 slides
 
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory AccessAccelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
Accelerating Key Bioinformatics Tasks 100-fold by Improving Memory Access
 
cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Building Continuous Learning Systems
Building Continuous Learning SystemsBuilding Continuous Learning Systems
Building Continuous Learning Systems
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Compeition-Level Code Generation with AlphaCode.pptx
Compeition-Level Code Generation with AlphaCode.pptxCompeition-Level Code Generation with AlphaCode.pptx
Compeition-Level Code Generation with AlphaCode.pptx
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
 

More from Natan Katz

AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptxNatan Katz
 
SGLD Berlin ML GROUP
SGLD Berlin ML GROUPSGLD Berlin ML GROUP
SGLD Berlin ML GROUPNatan Katz
 
Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Natan Katz
 
Foundation of KL Divergence
Foundation of KL DivergenceFoundation of KL Divergence
Foundation of KL DivergenceNatan Katz
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural NetworksNatan Katz
 
Deep VI with_beta_likelihood
Deep VI with_beta_likelihoodDeep VI with_beta_likelihood
Deep VI with_beta_likelihoodNatan Katz
 
NICE Research -Variational inference project
NICE Research -Variational inference projectNICE Research -Variational inference project
NICE Research -Variational inference projectNatan Katz
 
NICE Implementations of Variational Inference
NICE Implementations of Variational Inference NICE Implementations of Variational Inference
NICE Implementations of Variational Inference Natan Katz
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement LearningNatan Katz
 
Variational inference
Variational inference  Variational inference
Variational inference Natan Katz
 
GAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesGAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesNatan Katz
 

More from Natan Katz (17)

final_v.pptx
final_v.pptxfinal_v.pptx
final_v.pptx
 
AI for PM.pptx
AI for PM.pptxAI for PM.pptx
AI for PM.pptx
 
SGLD Berlin ML GROUP
SGLD Berlin ML GROUPSGLD Berlin ML GROUP
SGLD Berlin ML GROUP
 
Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs Ancestry, Anecdotes & Avanan -DL for Amateurs
Ancestry, Anecdotes & Avanan -DL for Amateurs
 
Finalver
FinalverFinalver
Finalver
 
Foundation of KL Divergence
Foundation of KL DivergenceFoundation of KL Divergence
Foundation of KL Divergence
 
Quant2a
Quant2aQuant2a
Quant2a
 
Bismark
BismarkBismark
Bismark
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural Networks
 
Deep VI with_beta_likelihood
Deep VI with_beta_likelihoodDeep VI with_beta_likelihood
Deep VI with_beta_likelihood
 
NICE Research -Variational inference project
NICE Research -Variational inference projectNICE Research -Variational inference project
NICE Research -Variational inference project
 
NICE Implementations of Variational Inference
NICE Implementations of Variational Inference NICE Implementations of Variational Inference
NICE Implementations of Variational Inference
 
Ucb
UcbUcb
Ucb
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement Learning
 
Neural ODE
Neural ODENeural ODE
Neural ODE
 
Variational inference
Variational inference  Variational inference
Variational inference
 
GAN for Bayesian Inference objectives
GAN for Bayesian Inference objectivesGAN for Bayesian Inference objectives
GAN for Bayesian Inference objectives
 

Recently uploaded

Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)Areesha Ahmad
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticssakshisoni2385
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
fundamental of entomology all in one topics of entomology
fundamental of entomology all in one topics of entomologyfundamental of entomology all in one topics of entomology
fundamental of entomology all in one topics of entomologyDrAnita Sharma
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bSérgio Sacani
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfrohankumarsinghrore1
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 

Recently uploaded (20)

Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
fundamental of entomology all in one topics of entomology
fundamental of entomology all in one topics of entomologyfundamental of entomology all in one topics of entomology
fundamental of entomology all in one topics of entomology
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 

Cyn meetup

  • 1. DL FOR CLOUD PHISHING Natan Katz Avanan- CP
  • 2. Agenda • Challenges in Phishing models • Current Engine • The unified DL model • BN and explainability
  • 3. Challenges in phishing • Turing test • How do we need to label? • Imbalanced traffic • Explainability is mandatory
  • 5. Use Case • Cloud traffic emails • The typical customer has a few millions of emails per day • Phishing’s rate is assumed to be 1 per 10000 emails • System calssifies the emails to one of four categories: Ø Clean Ø Phsihing Ø Spam Ø Marketing
  • 6. Development Envirnoment • Security regulations disallows downloading the emails • AWS instances are being run using Shell. It obviously leads to many obstacles during the development
  • 7. The Model A double steps XGBoost: • Combination of tabular feautres with some text analysis • In order to achieve good perfromance (namley, hgih precision) the second step is perfomred only if the first model detects Phishing
  • 8. Labeling Protocol An enormous numner of emails • Labeling emails that were detected by the model as phishing or spam • Precision is well measured • Howerver, new types of phishing are hardly detected as a result the recall measurements are endowed with high risk .
  • 10. Our Objectives • Construct a DL model ØModel’s inputs are both text and tabular data ØModel’s outputs are the four categories ØPerformances requirements: Optimizing Recall for 98% precision
  • 11. Our “Strategy” Perform good embedding for the emails’ bodies 1 Combine the embedding with the tabular data 2 Find a method to get high precsion 3
  • 13. Current Text Embedding • We have a DistilBERT model which its outputs are used as inputs for the XGBOOST: How does it work? We follow Huggingface ‘s regular procedure: Ø Take the text and tokenize it Ø Use a pre trained model for the embedding Ø Use Huggingface services for upper layers and perform a downstream training.
  • 14. Develompenet Challenges • Replacing the Jupiter with a tensors folder • Modifying the network –achieving flexibility for the combined stage • Achieving flexibility for different types of embeddings
  • 15. Emebeding Methods • Base Bert • Distil Bert • Fnet
  • 16. “The Berts” Base Bert • bert-base-multilingual-cased • 12 Layers DistillBert • distilbert-base-multilingual-cased • 6 Layers ” 40 % less parameteres, 60% fatster, preserve 95% of the perfromancse”
  • 17.
  • 18. Transfromers Transfromers are an extnesion of CNN • We measure the entire input in paralel • We compare a given “pixel” with neighbours • We perfrom a “pooling” upon this comparison But: For a sentence of length K we compare all possible “pairs”: all the inputs versus all the inputs (O(𝐾!))
  • 19. Fnet • We replace the multi head layer by FFT one.
  • 20. FNET • A paremeters free layer • Complexity is reduced to something lower (linear to nlog(n)) • We perform the followign formula • Performances ar slightly worse but faster without trainable params • We can think that rather measuring each mixing between tokens we measure a general information flow
  • 21. The Architecute • Performing Embedding process • Terminate the embedding phase using Huggngface’ pooling layer • We concatentate the pooled embedding to a naïve represenstation of the tabular data • We perfrom a regular 1D NN (with regular extras such as dropuot and RELU activation)
  • 22.
  • 23.
  • 25. Imbalanced Traffic • While training we have enough data. • Real world traffic is extremely non-sysmmetric. Recall that we have about single Phishing email in a traffic of 10k emails. • Classifcation algorithms commnoly focus on accuracy. Is it good enough?
  • 26. Example We trained a model with 99% accuracy. ØThe number of clean emails is 1000,000 ØThe number of phishing emails is 100 We will have each day 10,100 alerts in which only 100 of them are valid Pretty shit
  • 27. A solution (A and not The) • We use cross entropy as a loss (L) • We aim to reduce our FP – usecase’s objective is the precision level • A regulation term is needed Which crietira such term needs to satisfy
  • 28. The precision function We construct a function F s.t. • For every real phishing training example it outputs 0 • For every non phishing examples it outputs : Ø A positive function that increases with the phishing prob. Ø The gradient does not vanish for high scores
  • 29. Regulation Function – Actual Example ay1=-2.5 ay2=0.4 ax1=0.01 ax2=1 mu =(ay2-ay1)/(ax2-ax1) beq= ay1-mu*ax1 R(prob_phish) =100. * (1 + tanh(mu * prob_phish + beq)) Total loss = cross_entropy + (target<>phishing) * R(prob_phish)
  • 30. Another Example -Wasserstein If target is Phishing y=-1 Else y=1 R( prob_phish ) =100. * (1 + tanh(mu * prob_phish + beq)) Total loss = cross entropy + (target<>phishing) * R( prob_phish )
  • 31.
  • 33. Background • DL commonly provides bad explainability • Epxlainbility in phishing is essential • We can search for probabilistic graph represnetaion
  • 34. Bayesian Networks • We assume that the feautres (as well as the target) are nodes in a graph • Each arc’s weight represents the conditional probability between the nodes • We use bnlearn to optimize these ditirubtions • The outcome is the optimal DAG of the data.