I A E S  I n t e r n at io n al  Jou r n al  of  A r t if ic ia l  I n t e ll ig e n c e  ( I J - AI )   V ol .   13 , N o.   4 ,  D e c e m be r  2024 , pp.  4778 ~ 4794   I S S N :  2252 - 8938 ,   D O I :  10.11591/ ij a i. v 13 .i 4 .pp 4778 - 4794          4778     Jou r n al  h om e page :  ht tp : // ij ai . ia e s c or e .c om   Fe d e r at e d  i n c e p t i on - m u l t i - h e ad  at t e n t i on  m od e l s f or  c yb e r - at t ac k s d e t e c t i on       I m ad  T ar e q   AL - H al b oos i 1 , B as s an t  M . E lb agou r y 1, 2 , S al s ab il  E l - R e gai ly 1 , E l - S aye d  M . E l - H or b at y 1   1 D e pa r t m e nt  of  C om put e r  S c i e nc e , F a c ul t y of  C om put e r  a nd  I nf or m a t i on S c i e n c e s , A i n S ha m s  U ni ve r s i t y, C a i r o, E gypt   2 F a c ul t y of  C om put e r  S c i e nc e  a nd C om put e r  E ngi ne e r i ng ,   K i ng S a l m a n I nt e r na t i ona l  U ni ve r s i t y,   E l  T or ,  E gypt       A r t ic le  I n f o     A B S T R A C T   A r ti c le  h is to r y :   R e c e iv e d N ov 24, 2023   R e vi s e d F e b 20, 2024   A c c e pt e d M a r  21, 2024       With  the  proliferation  of  internet   of  things  (IoT)   devices,  ensuri ng  the  security  of  these  interconnecte d  systems  has  become   a  critical  co ncern.  Cyberatt acks ta rgeting  IoT   devices pose significant threats to individu als and  organizations  due  to  the   generation  of  vast   amounts  of  data   across   many  connected  devices,  which  traditi onal  centralized   methods   cannot   solve.  Feder ated  learn ing  (FL)  could  be  a  promisin g  solution  to  mitigate   privac y  concerns  associated   with  centralized  approaches  and  address  cybersecuri ty  concerns.  This  paper  uses  FL   and  deep  learning   (DL)  approac hes  to  cybersecurit y  in  IoT  applicati ons.  The   goal  of  cyber   security  is   achieved  by   forming  a  federation  of  acquired  and  shared  models  at  the   head  of  the  various  participants.  We  use  inception  time  and  multi - head  attenti on  (CNN)   algorit hm  based  on  FL   to  detect  cyber - attacks  and  avoid  data  privacy  leaks  under  two  distribution  modes,  namely  IID  and  Non - IID.  In  contra st,  the  FedAvg  and  FedMA  algorithms  aggregate  local  model  updates.  A  global  model  i s  produced  after   several  communication   rounds  between   t he  IoT  devices  and  the  model  parameter  server.  Cyber  threats  are  simulated   using  edge - IIoT  datasets.  Experiment  results   show  that  the   federated  inc eption  model' s  best  global  accuracy  was  93,  91%,  and  93,  49%  using  mult i - head  attenti on.   K e y w o r d s :   A r ti f ic ia l  in te ll ig e nc e   C ybe r s e c ur it y   D e e p l e a r ni ng   F e de r a te d l e a r ni ng   I nt e r ne t  of  t hi ngs   This is an  open  acce ss artic le unde r the  CC BY - SA   license.     C or r e s pon di n g A u th or :   I m a d T a r e q A L - H a lb oos i   D e pa r tm e nt  of  C om put e r  S c ie nc e , F a c ul ty  of  C om put e r  a nd I nf or m a ti on S c ie nc e s , A in  S ha m s   U ni ve r s it y   El - K ha ly f a  E l - M a m oun S tr e e t  A bba s ya , C a ir o 11566, E gypt   E m a il :  e m a dt a r iq 1982@ gm a il .c om       1.   I N T R O D U C T I O N   I n  r e c e nt   ye a r s ,   gove r nm e nt s ,  a c a de m ia ,   a nd  in dus tr y  ha v e   p a id   c lo s e   a tt e nt io n  to   th e   in te r ne t  of   th in gs   ( I oT )   in   m a ny  f ie ld s ,  s uc h  a s   he a lt hc a r e ,  dr one s ,  s m a r t  c it ie s ,  a nd  c ybe r - phys ic a l  s ys te m s .  A s   I oT   de vi c e s   gr ow ,  va s t  a m ount s   of   da ta   th a t  in c lu d e   us e r s '   pr iv a te   i nf or m a ti on  w il l  be   ge ne r a te d.  W it hout   r e li a bl e   s e c ur it y  s ys te m s   im pl e m e nt e d  on  I oT   de vi c e s ,  it   c a n  a f f e c t  pe r s ona l  pr iv a c y  a nd  m a y  be   e xpos e d  to   m a ny  c ybe r - a tt a c ks .  R e ga r dl e s s   of   th e   be ne f it s   pr ovi de d  by  m a c hi ne   le a r ni ng  ( M L )   a ppr oa c he s ,  it s   c a pa c it y  to   id e nt if y  th r e a ts   a nd  e xt r a c t  m e a ni ngf ul   a nd  c om pl ic a te d  d a ta   m ode ls   s ta nds   out   [ 1] .  T r a di ti ona l  ML   a ppr oa c he s   c ol le c t  d a ta   on  a   c e nt r a li z e d  s e r ve r   w hi le   ig nor in g  pr iv a c y  a nd  s e c ur it y  c ons id e r a ti ons .  B e c a u s e   of   th e   vol um e   a nd  s e n s it iv it y  of   in f or m a ti on  tr a ns m it te d  be twe e n  de vi c e s   in   I oT   a ppl ic a ti ons ,  th is   pr obl e m   m ig ht   be   a m pl if ie d.  I n   a ddi ti on  to   p r ot e c ti ng  pr iv a c y,  one   of   t he   pr im a r y  is s ue s   w it h  I oT   de vi c e s   is   th a t  I oT   ne twor ks   ha ve   s e t  ne e ds   f or   pr oc e s s in g  r e s our c e s ,  w hi c h  pos e s   a   s ig ni f ic a nt   ba r r ie r .  A s   a   r e s ul t,   one   s ol ut io n   is  t o ha ndl e  da ta  i n a  de c e nt r a li z e d m a nne r  [ 2] , [ 3] .   F e de r a te d  le a r ni ng  ( F L )   is   th e   m os t  pr om is in g  s ol ut io n   to   th is   i s s ue .  I n  FL ,  t r a in in g  M L   m ode ls   is   a   c ol la bor a ti ve   e f f or t   a c r os s   s e ve r a l  c li e nt s   th a t  do  not   r e qui r e   th e   lo c a l  da ta   to   be   t r a ns por te d  to   a   c e nt r a li z e d   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A r ti f   I nt e ll     I S S N :   2252 - 8938       F e de r at e d  in c e pt io n - m ul ti - he ad att e nt io n m ode ls  f or  c y b e r - at ta c k s  de te c ti on   ( I m ad T ar e q A L - H al boos i )   4779   lo c a ti on,  r e duc in g  s to r a ge   c o s ts   tr a n s m is s io n  w hi le   r e t a in in g  a   hi gh  le ve l  of   us e r   pr iv a c y.   T hi s   a ll ow s   bus in e s s e s   to   c r e a te   a   s h a r e d  gl oba l  m ode l  w it hout   s to r in g  tr a in in g  da ta   in   a   c e nt r a li z e d  lo c a ti on   [ 4] .  F L   e na bl e s   m ul ti pl e   a c to r s   to   c ol la bor a te   on  de ve lo pi ng  a   s in gl e ,  r obus t  s ys te m   w it hout   s ha r in g  da ta ,  a ddr e s s in g  c r it ic a l  is s ue s   s u c h  a s   da ta   pr iv a c y,  a c c e s s   r ig ht s ,  s e c ur it y,  a n d  a c c e s s   to   di ve r s e   da ta .  I ns te a d  of   a   pool   to   upda te  t he  de vi c e ,  FL   obt a in s  t he  c ur r e nt  m ode l  a nd c om put e s   a  m odi f ie d m ode l  on  t he  s ys te m . T he s e  l oc a ll y   tr a in e d  m ode ls   a r e   th e n  s e nt   f r om   th e   m a c hi ne s   to   th e   c e nt r a l  s e r ve r   a nd  a ggr e ga te d  be f or e   be in g  di s tr ib ut e d  to  t he  de vi c e s  a s  a  uni f ie d a nd e nha n c e d gl oba l  m ode l  [ 5] , [ 6] .   G oogl e   a lr e a dy  us e s   F L ,  a ll ow in g   in c r e di bl e   pr e di c ti ve   in pu t   f e a tu r e s   f or   th e   A ndr oi d  ke yboa r d,     on - de vi c e   s e a r c h  phone s ,  a nd  m a ny  ot he r   a ppl ic a ti ons .  R e c e nt   de ve lo pm e nt s   ha ve   c onc e nt r a te d  on  lo w e r in g  s ta ti s ti c a l  ba r r ie r s   a nd  im pr ovi ng  F L   s e c ur it y  [ 7] ,  [ 8] .  W it h  de c e nt r a li z e d  tr a in in g  da ta ,  to p   s e r vi c e   pr ovi de r s   ha ve   us e d   F L   a ppr oa c he s   to   s uppor t  pr iv a c y - s e ns it iv e   s ys t e m s .  FL   out pe r f or m s   c e nt r a li z e d,  tr a di ti ona l  s ys te m s   a nd  th e   c os t s   a nd   r is ks   a s s o c ia te d  w it h  s e n s it iv e   da ta   m a na ge m e nt   by   e xc e ll in g  in   ba ndw id th   a nd   pow e r - c ons tr a in e d  c ont e xt s   a nd  of f e r in g  a   s im pl e ,  e f f ic ie nt   pl a tf or m   f or   s c a le d  pe r s ona li z a ti on.  I t  a ls o  gi ve s   us e r s   ow ne r s hi p  ove r   th e ir   da ta ,  a ll ow in g  de ve lo pe r s   to   de s ig n  c r e a ti ve   a pps   th a t  us e   da ta   in s ig ht s   [ 9] .  I n   c e nt r a li z e d  le a r ni ng,  d a ta   f or   le a r ni ng  m ode l s   a r e   c ol le c te d  f r om   m ul ti pl e   s our c e s   a nd  th e n   c onne c te d  to   a   c lo ud  s e r ve r   to   c r e a te   a  s ta nda r d  m ode l   th a t  c a n   be   de pl oye d a n d  s ha r e d a c r os s   de vi c e s .  F ig ur e s   1 ( a )   a nd  1( b)   s how s   th e   di f f e r e nc e   b e twe e n  c e nt r a li z e d  a nd  FL .  H ow e v e r ,  th e r e   a r e   va r io us   li m it a ti ons   w h e n  a ppl yi ng  F L   in   I oT   a ppl ic a ti ons ,  in c lu di ng  th e   r e li a bi li ty   of   th e   le a r ni ng  m ode l.   I f   th e   gl oba l  m ode l  is   m a li c io us ly   m odi f ie d  or   br oke n,  th e   upda te   o f   a ll   lo c a l  m ode ls   w il l  be   ne ga ti ve ly   a f f e c te d  [ 10] .   T he r e f or e ,  m e th ods   f o r   us in g de e p  FL   a r e  f unda m e nt a l  in  t hi s  c ont e xt .           ( a )   ( b)     F ig ur e  1.  A r c hi te c tu r e  of   ( a )  c e nt r a li z e d l e a r ni ng a nd ( b)   FL   pr o c e s s       I n  th is   s tu dy,  w e   us e   two  m ode ls   of   de e p  le a r ni ng   ( D L )   a ppr oa c he s   ba s e d  on  F L   to   de te c t  c ybe r - a tt a c ks   ( hybr id   in c e pt io n  ti m e   a nd   m ul ti - he a d  a tt e nt io n  ( C N N ) )   on  th e   e dge - in dus tr ia l  in te r ne t  of   th in gs   ( I I oT )   da ta s e ts .   U s in g  two   ty pe s   of   di s tr ib ut io n:   non - in de pe n de nt   a nd  id e nt ic a ll y  di s tr ib ut e d  ( non - I I D )   a nd  in de pe nde nt   a nd  id e nt ic a ll y  di s tr ib ut e d  ( I I D ) .  T he   f e de r a te d  a ve r a gi ng  a lg or it hm   ( F e dA vg )   a nd  f e de r a te d  m a tc he d a ve r a gi ng ( F e dM A )   a lg or it hm s , on the  ot he r  ha nd, a ggr e ga te  l oc a l  m ode l  upda te s .  T he  f ol lo w in g a r e   our  r e s e a r c h c ont r ib ut io ns :   ‒   W e   pr ovi de   te s t s   e va lu a ti ng  th e   pr opos e d  m ode l' s   pe r f or m a nc e   de te c ti ng  c yb e r - a tt a c ks   on  I o T   de vi c e s .   T he   f ol lo w in g  s it ua ti ons   w e r e   c om pa r e d  to   th a t   goa l:   i)   a   c e nt r a li z e d  s tr a te gy  in   w hi c h   a ll   da ta   i s   s h a r e d;   a nd  ii )   a   f e d e r a te d  a ppr oa c h   in   w hi c h  a   gl oba l  m ode l   is   d e ve lo pe d  w hi le   lo c a l  m od e l  c ha ng e s   a r e   e xc ha nge d.   ‒   D e te c ti on  of   c ybe r - a tt a c ks   a nd  I oT   a r c hi te c tu r e   f e de r a t e d  to   s ol ve   c e nt r a li z e d  pr obl e m s ,  s uc h  a s   s in gl e   poi nt s   of   f a il u r e ,  a nd  pr e s e r ve   th e   pr iv a c y  of   th e   lo c a ll y  tr a in e d  da ta ,  w hi c h  is   r e qui r e d  f o r   di ve r s e   a ppl ic a ti ons .   ‒   T o  our   knowle dge ,  w e   a r e   th e   f ir s t  to   us e   th e   hybr id   in c e pt io n  ti m e   a nd  m ul ti - he a d  a tt e nt io n  ( C N N )   m ode l  w it h  FL   to  de te c t  c ybe r - a tt a c ks  on I oT  de vi c e s .   ‒   W e   a r e   th e   f ir s t  to   c om pa r e   s ynt h e ti c   m in or it y  ove r s a m p li ng  m e th od  ( S M O T )   a nd  c la s s - w e ig ht   te c hni que s  ba s e d on  FL .   ‒   W e  us e  t he  F e dA vg  a nd F e dM A  a lg or it hm s  t o a ggr e ga te   a nd c o m pa r e  l oc a l  m ode l  upda te s , not e  t ha t  th e r e   is  no pr e vi ous  s tu dy t ha t  c om pa r e s  t hi s .    T he  r e s t  of  t hi s  w or k i s  s tr uc tu r e d a s  f ol lo w s . T he  r e la te d  w or k i s  s um m a r iz e d i n s e c ti on 2. S e c ti on 3  di s c us s e s   th e   m e th od s .  S e c ti on  4   de s c r ib e s   th e   s y s te m   de s ig n.   S e c ti on  5  d e s c r ib e s   th e   e xpe r im e nt a l  r e s ul t s .  F in a ll y, s e c ti on 6 c onc lu s io n a nd di s c us s io n.     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8938   I nt  J  A r ti f   I nt e ll , V ol .  13 , N o.  4 ,  D e c e m be r  2024 :  4778 - 4794   4780   2.   R E L A T E D  WORK   T he   in c r e a s in g  popula r it y  of   FL   a nd  th e   us e   of   th e   in te r ne t  of   th in gs   ha s   c r e a te d  m a ny   in te r e s ti ng  r e s e a r c h  pa th s ,  one   of   w hi c h  is   th e   di s c ove r y  a nd  c la s s if ic a ti on  of   c ybe r - a tt a c ks   in   I oT   de vi c e s ,  a nd  th e r e   a r e   m a ny  r e s e a r c h  w or ks   pr opos e d  to   s e c ur e   I oT   ne twor ks   f r o m   m a li c io us   a tt a c ks .   I n  th is   pa r t,   w e   w il l  go  th r ough the  m os t  r e c e nt  r e s e a r c h.  T a bl e  1 pr ovi de s  a n ov e r vi e w  of  t he s e  s ugge s ti ons .   T he   e dge - I I oT   da t a s e t,   pr opos e d  by  F e r r a g  e t  al .   [ 11] ,  is   a n  in ve s ti ga ti ona l  r e s our c e   th a t  ut il iz e s   c e nt r a li z e d  in tr us io n  de te c ti on  a nd  f e d e r a te d  DL   w it h  s ta nda r d   a s s e s s m e nt  c r it e r ia .  T he   r e s e a r c h  e xpl or e d  th e   pr e di c ti on  a nd  de te c ti on  e f f ic a c y  of   di f f e r e nt   th r e a t  m ode ls   a nd  c ybe r - a tt a c ks   us in g  bi na r y,  s ix - c la s s ,  a nd   f if te e n - c la s s   c a te gor iz a ti on.  T he   be s t  r e s ul ts   f or   th e   15 - c la s s   a r e   a c hi e ve d  w it h  I I D   a c c ur a c y  of   93.89%   a nd   th e   m e th od  of   n on - I I D   a c c ur a c y  of   91.45 % .   T a ba s s um   e t  al .  [ 12]   pr e s e nt   F E D G A N - I D S ,  a   FL   in tr us io n   de te c ti on  s ys t e m   ( I D S )   ba s e d  on  ge ne r a ti ve   a dve r s a r ia l  ne t w or ks   ( G A N )   f or   de te c ti ng  c ybe r - a tt a c ks   in   in te ll ig e nt   in te r ne t  of   th in gs   s ys te m s   s uc h  a s   s m a r t  hom e s ,  s m a r t  c it ie s ,  a nd  in te ll ig e nt   e - he a lt hc a r e   s ys te m s .  E xt e ns iv e   te s ti ng  of   th e   di s tr ib ut e d  in tr us io n   de te c ti on  m od e l' s   a c c ur a c y,  pe r f or m a nc e ,  a nd  c onv e r ge nc e   ut il iz in g t hr e e  s ta nda r d da ta s e t s :  U N S W - N B 15, KD D 99, a nd  N S L - K D D .    A c c or di ng  to   C a m pos   e t  al .   [ 13] ,  a   FL - e na bl e d  I D S   te c hni qu e   ba s e d  on  a   m ul ti c la s s   c la s s if ie r   is   e va lu a te d  f or   de te c ti ng  va r io us   a tt a c k s   in   a n  I oT   s c e na r io .  U s in g  th r e e   di s ti nc t   s e tt in gs   obt a in e d  by   pa r ti ti oni ng  th e   T oN - I oT   da ta s e t  a c c or di ng  to   a tt a c k  ty pe   a nd  I oT   de vi c e   I P   a ddr e s s .  I n  a ddi ti on,  th e   I nt e r na ti ona l  B us in e s s   M a c hi ne s   ( I B M )   f e de r a te d  le a r ni ng  f r a m e w or k  is   us e d   to   im pl e m e nt   a nd   a s s e s s   th e   im pa c t  of   va r io us   a ggr e ga ti on  f unc ti ons .   I ns te a d  of   th e   na ïv e   F e dA vg,  Z ha ng  e t  al .  [ 14]   s ugge s t  f e d  de te c t,   a   FL   a lg or it hm ic   f r a m e w or k  f o r   on - de vi c e   a nom a ly   da ta   de te c ti on  th a t  e m pl oys   a n  a da pt iv e   opt im iz e r   a nd  a   c r os s - r ound  le a r ni ng  r a te   s c he dul e r .  U s e   th e   N - B a I oT   da ta s e t   to   a s s e s s   th e   F e d  I oT   pl a tf or m   a nd  th e   f e d  de te c t  a lg or it hm   r e ga r di ng  m ode l  a nd  s ys te m   pe r f or m a nc e .  P opoola   e t  al .  [ 15]   pr opos e   a   FL   s tr a te gy  f or   de te c ti ng  z e r o - da y  bot ne t  a tt a c ks ,  a nd  a n  a ppr opr ia te   de e p  ne ur a l  ne twor k  a r c hi te c tu r e   is   us e d  f or   ne twor k   tr a f f ic   c la s s if ic a ti on  in   I oT   d e vi c e s   to   li m it   da ta   pr iv a c y   le a ka ge   to   a ggr e ga te   lo c a l  m ode l   upda te s .   T he   F e dA vg  m e th od  is   e m pl oye d.  M ot hukur i  e t  al .   [ 16]   s ugge s te d  a   th r e a t  de te c ti on  a nd  c la s s if ic a ti on  te c hni que   in   I oT   ne twor ks   b a s e d   on  FL .  T h e   a ut hor s   c om bi ne   ga te d   r e c ur r e nt   uni ts   ( G R U s )   a nd  r a ndom  f or e s t  ( R F )   m ode ls   to   f or m   th e ir   e ns e m bl e .  I n  ot he r   w or ds ,  th e y  us e d  R F   to   in te gr a te   th e   G R U   m ode l  pr e di c ti ons   to   im pr ove   th e   c la s s if ic a ti on  pe r f or m a nc e .   F e d - I I oT ,  a   f e de r a te d  te c hni que   f or   id e nt if yi ng  A ndr oi d  m a lwa r e   in   I I oT ,  w a s   c r e a te d  [ 17] .  F e d - I I oT ,  in   pa r ti c ul a r ,  c r e a te s   a nd  in je c ts   hos ti le   m a te r ia l  in to   th e   da ta s e t  us in g  two   G A N   m ode ls .  T he   s e r ve r   us e s   a   G A N   to   de te c t  m a li c io us   m ode ls   a nd  r e je c t  pol lu te d  da ta .  A c c or di ng  to   N ua im i  e t  al .   [ 18] ,  m ul t ip le   I D S s   a r e   de ve lo pe d  us in g  c onve nt io na l  da ta   a na ly ti c s   m e th ods   a nd  th e ir   pe r f or m a nc e   on  E dge - I I oT   is   e va lu a te d,  a nd  I D S s   a r e   c om pa r e d  to   pr e vi ous   w or k   to   il lu s tr a te   th a t   hi ghl y   a c c ur a te  bi na r y - c la s s  I D S s  c a n be  pr oduc e d, ho w e ve r  m ul ti - c la s s  I D S s  r e qui r e  c a r e f ul  t r e a tm e nt .       T a bl e  1.  A   s um m a r y of  pr e vi ous  s tu di e s   A ut hor s   Y e a r s   D a t a   M ode l   D e s c r i pt i on   F e r r a g   e t   al .   [1 1 ]   2022   E dge - I I o T s e t   D e e p   FL   C e nt r a l i z e d  a nd   f e de r a t e d  DL   i s   us e d  t o  i nv e s t i ga t e   t he   de t e c t i on  e f f i c a c y  a nd  t r a f f i c   pr e di c t a bi l i t y  of   di f f e r e nt   c ybe r - a t t a c ks   a nd  t hr e a t  m ode l s .   T a ba s s um   e t  al .   [1 2 ]   2022   N S L - K D D ,  U N S W - N B 15, K D D 99.   F e dG A N   F e de r a t e d  D L   I D S   ba s e d  on  G A N   f or   de t e c t i ng  c yb e r   t hr e a t s   i n  i nt e l l i ge nt  I oT  s ys t e m s .   C a m pos   e t   al .   [1 3 ]   2021   T oN - I oT   L ogi s t i c   r e gr e s s i on   A n  F L - e na bl e d  I D S   t e c hni que   ba s e d   on  a   m ul t i c l a s s   c l a s s i f i e r   i s   a s s e s s e d f or  i de nt i f yi ng va r i ous  t hr e a t s  i n a n I oT  c ont e xt .   Z ha ng   e t   al .   [1 4 ]   2021   N - B a I oT   D e e p  A ut oe nc od   P r opos e   f e d  de t e c t ,  a n   F L   a l gor i t hm i c   f r a m e w or k  f or   on - de vi c e   a nom a l y da t a  de t e c t i on.   P opool a   e t   al .   [1 5 ]   2021   B ot - I oT .   N - B a I oT   DNN   T he   f e de r a t e d  D L   a ppr oa c h   f or   z e r o - da y  bot ne t   a t t a c k  de t e c t i on  i s   pr opos e d t o l i m i t  da t a  pr i va c y l e a ka ge  i n I oT  de vi c e s .   M ot hukur i   e t  al .   [1 6 ]   2021   -   L S T M / G R U   P r opos e d  a n  e ns e m bl e   f e de r a t e d - ba s e d  a t t a c k  de t e c t i on  a nd  c l a s s i f i c a t i on m e t hod, c om bi ni ng R F  a nd G R U s  m ode l s .   T a he r i   e t   al .   [1 7 ]   2020   D r e bi n,  G e nom e ,   C ont a gi o   F e dG A N   D e ve l ope d F e d - I I oT , a n F L  a ppr oa c h  f or  de t e c t i ng A ndr oi d m a l w a r e   i n I I oT .       T he r e  i s  no pr e vi ous  s tu dy t ha t  us e s  t he  I nc e pt io n t im e  m ode l  w it h  FL   to  de te c t  c ybe r - a tt a c ks  on I oT   de vi c e s .  H ow e ve r ,  our   m ode l  s how e d  hi gh  a c c ur a c y  in   d e te c ti ng  a tt a c ks   c om pa r e d  to   pr e vi ous   s tu di e s .   A tt e nt io n  a r c hi te c tu r e s   a r e   us e d   in   na tu r a l  la ngua g e   pr oc e s s i ng,  a nd  w e   ha ve   u s e d  th e m   to   de te c t   c ybe r - a tt a c ks   on  I oT   de vi c e s .  I n  th is   pa pe r ,  w e   a ppl y  two  m e th ods   to   de te c t  m ode r n  c ybe r - a tt a c ks   on  in te r ne t  of   th in gs   de vi c e s .   T he   f ir s t  m e th od  in tr oduc e s   F L   w it h  D L   a ppr oa c he s   a s   a   ( hybr id   in c e pt io n  ti m e   a nd  m ul ti - he a d  a tt e nt io n  ( C N N )   a lg or it hm )   to   de te c t  c ybe r - a tt a c ks   in   I oT   de vi c e s   us in g  th e   E dge - I I oT   da ta ba s e   to   a ggr e ga te  l oc a l  m ode l  upda te s  i n  FL ;  w e  c om pa r e  t he  F e dA vg  a nd F e dM A  a lg or it hm s .     Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A r ti f   I nt e ll     I S S N :   2252 - 8938       F e de r at e d  in c e pt io n - m ul ti - he ad att e nt io n m ode ls  f or  c y b e r - at ta c k s  de te c ti on   ( I m ad T ar e q A L - H al boos i )   4781   3.   T H E  P R O P O S E D  M E T H O D S   3.1.    F e d e r at e d - in c e p t io n   t im e   T hi s   s e c ti on  de s c r ib e s   th e   a r c hi te c tu r e   of   th e   e nha nc e   I nc e pt io n  ti m e   m ode l  ( in c e pt io n  ti m e   v2 -   in c e pt io n  ti m e   v3) .  W e   e m pl oy  c la s s   w e ig ht s   a nd  s m ot e   a f te r   c ol le c ti ng  a nd  pr oc e s s in g  da ta .  T o  a voi d   ove r f it ti ng,  th e   da ta s e t  is   di vi de d  in to   te s ti ng  a nd  tr a in in g.  T h e   A da m   a nd  s to c h a s ti c   gr a di e nt   d e s c e nt   ( S G D )   opt im iz e r   us e s   a n  opt im iz a ti on  te c hni que   r a th e r   th a n  th e   s t a n da r d  s to c ha s ti c   gr a di e nt   d e s c e nt   a ppr oa c h  to   r e pe a te dl y  upda te   n e twor k  w e ig ht s   ba s e d  on   tr a in in g  da ta .  W it h  a   de pt h  of   s ix   a nd  f our   la ye r s   a nd  a   f il te r   of   32,  w it h  a   s hor t  la ye r   ove r   th r e e ,  in c e pt io n  ti m e   is   e m pl oye d.  T hr e e   ke r ne ls   w il l  be   ge n e r a te d  f or   e a c h  in c e pt io n m odul e  f r om  40/ /( 2^ i)  a s  i  i nc r e a s e s  f r om  0  - >  3.   W e   e m pl oye d   a n  in c e pt io n  ti m e   m ode l   w it h  a   one - di m e ns i ona l  ( 1D )   in put   ve c to r   f or m   in   th e   in c e pt io n  ne twor k.  E a c h  bl oc k  ha s   th r e e   in c e pt io n  ti m e   m odul e s .  A   bot tl e ne c k  la ye r   r e duc e s   th e   num be r   of   pa r a m e te r s   a nd  pr oc e s s in g  c os t s   by  lo w e r in g  th e   in put   di m e ns io ns   ( i. e .,  th e   de pt h) .  A   1D   s li di ng  f il te r   c a n  f il te r   out   it s   di s c r im in a ti ng  z one   in   a   ti m e   s e r ie s .  I m pr ove s   ge ne r a li z a ti on  a nd  s pe e ds   up  tr a in in g.  T h e   bot tl e ne c k  out put   f e e ds   th r e e   one - di m e ns io na l  c onvolut io n  la ye r s   w it h  10,  20,  a nd  40  ke r ne l  s iz e s .  F ur th e r m or e ,  th e   in c e pt io n  ti m e   m odu le ' s   in put s   pa s s   th r ough  th e   f ir s t  la ye r   c ons is ti ng  of   ( C N N   1D ,   f il te r s = 32,  ke r ne l= 10,  C N N 1D ,   f il te r s = 32,  ke r ne l = 10.  M a x - P ool in g  1D ,  pool in g  s iz e = 20,   s tr id e = 1,   C N N 1D ,   f il te r s = 32,  ke r ne l= 10) .  S e c ond  l a ye r   ( C N N 1D ,  f il te r s = 32,   ke r ne l= 20,  C N N 1D ,  f il te r s = 32,  k e r ne l= 40,   C N N 1D ,  f il te r s = 32,  k e r ne l= 10) .  P a ddi ng= s a m e ,  a c ti va ti on= r e c ti f ie d  li ne a r   uni t  ( R e L U )   e a c h  a ll .  T he   d e pt h  c onc a te na ti on  la ye r ,  r e lu   a c ti va ti on  la ye r ,  a nd  ba tc h  nor m a li z a ti on  la ye r   s e que nc e   th e   out put s   of   th e   f our   c onvolut io n  la ye r s  a lo ng  th e   de pt h  di m e n s io n.  A ll   l a ye r s , e xc e pt   th e   s e que nc e   la ye r ,  h a ve   th e   s a m e  s tr id e   a nd   pa ddi ng.  A s   il lu s tr a te d  in   F ig ur e   2,   a ll   c onvolut io n  la y e r s   h a ve   32  f il te r s ,  a nd  r e s id ua l   c onne c ti ons   a r e   e m pl oye d f or  e ve r y t hi r d i nc e pt io n t im e  m odul e .   E ve r y  th r e e   m odul e s   w il l  m a ke   a   r e s id ua l  la ye r   c ons is ti ng  of   C N N 1D   ( f il te r = 128,  ke r ne l= 1,   pa ddi ng= s a m e )  ba tc h nor m a li z a ti on;  a f te r  t ha t,  w e  w il l  a dd  th e   out put  f r om  t he  r e s id ua l  a nd t he  l a s t  in c e pt io n   m odul e   w it h  a dd  a   la ye r .  T he n,  th e   a c ti va ti on  la ye r   w it h  r e lu   r e pe a ts   th is   ope r a ti on  w it h  de pt h  num be r .   U lt im a te ly ,  w e   a dd  a   gl oba l  a ve r a ge   pool in g  la ye r   de ns e   la ye r   w it h  uni ts   th e   e qua l  num be r   of   c la s s e s   w it h   a c ti va ti on f unc ti on s of tm a x. F ig ur e  3 s how s  t he  r e s id ua l  la y e r .           F ig ur e  2. T he  c us to m  i nc e pt io n m ode l       3.2.    F e d e r at e d - m u lt i - h e ad  a t t e n t io n   T hi s   s e c ti on  de s c r ib e s   th e   a r c hi te c tu r e   of   th e   m ul ti - he a d  a tt e nt io n  ( C N N )   m ode l.   T h e   a tt e nt io n   m e c ha ni s m   e s ta bl is he s   a   w e ig ht e d  a ve r a ge   of   ( s e que nc e )   e le m e nt s ,  th e   w e ig ht s   of   w hi c h   a r e   dyna m ic a ll y  ge ne r a te d  de pe ndi ng  on  th e   e le m e nt s '   ke ys   a nd  a n  in put   que r y.  T he   goa l  is   to   a ve r a ge   th e   pr ope r ti e s   of   s e ve r a l  c om pone nt s .  R a th e r   th a n  gi vi ng  e a c h  e le m e nt   a n   id e nt ic a l  w e ig ht ,  w e   pr e f e r   to   w e ig h  th e m   ba s e d  on   th e ir   unde r ly in g  va lu e s .  I n  ot he r   w or ds ,  w e   ne e d  to   know  w h ic h  in put s   w e   w a nt   to   " a tt e nd"   to   m or e   th a n  ot he r s ;  f ur th e r  i nf or m a ti on i s  pr ovi de d a s  s how n i n F ig ur e  3.     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8938   I nt  J  A r ti f   I nt e ll , V ol .  13 , N o.  4 ,  D e c e m be r  2024 :  4778 - 4794   4782       F ig ur e  3.   T he  r e s id ua l  la ye r   ( in c e pt io n m odul e )       3.2.1. At t e n t io n   T he   a tt e nt io n  m e c h a ni s m   c ov e r s   a   nove l  c a te gor y  of   la ye r s   in   ne ur a l  ne twor ks   th a t  ha s   s pa r ke d   c ons id e r a bl e   in te r e s t  in   r e c e nt   ye a r s ,  pa r ti c ul a r ly   in   s e qu e nc e   ta s ks .  T he   a tt e nt io n  m e c ha ni s m   s pe c if ie s   a   w e ig ht e d  a ve r a ge   of   ( s e que nc e )   it e m s ,  th e   w e ig ht s   of   w hi c h  a r e   de te r m in e d  dyna m ic a ll y  ba s e d  on   th e   in put   que r y  a nd  th e   e le m e nt s '   ke ys .  H is   a tt e nt io n  c ons i s ts   of   pa r ts   ( que r y,  ke ys ,  va lu e s ,  s c or e   f unc ti on) ,  you  c a n  le a r n  a bout   it   in   m or e   de ta il   in   th e   f ol lo w in g  s our c e s   [ 19] – [ 23] .  A   s of tm a x  c a lc ul a te s   th e   a ve r a ge   w e ig ht s   a c r os s   a ll   s c or e   f unc ti on  out put s .   A s s ig n  m or e   s ig ni f ic a nt   im po r ta nc e   to   th os e   va lu e   ve c to r s   w ho s e   m a t c hi ng  ke y i s  m or e  c om pa r a bl e  t o t he  que r y, w hi c h c a n b e  c a lc ul a te d a s   ( 1) :     =     ( ∫ (  , ) ) ∑   ( ∫ (  , ) )   ,  =   ∑   , .    ( 1)     M os t  a tt e nt io n  m e th ods   di f f e r   in   th e   que r ie s   ut il iz e d,  th e   ke y  a nd  va lu e   ve c to r s '   de f in it io ns ,  a nd  th e   s c or e   f unc ti on  e m pl oye d.  S e lf - a tt e nt io n  r e f e r s   to   th e   a tt e nt io n  a ppl ie d  w it hi n  th e   a r c hi te c tu r e .   E a c h  s e que nc e   e le m e nt   in   s e lf - a tt e nt io n  pr ovi de s   a   que r y,   va lu e ,  a nd  ke y.  W e   c onduc t  a n  a tt e nt io n  la ye r   f o r   e a c h  e le m e nt ,   c he c ki ng  th e   s im il a r it y  of   a ll   s e que nc e   m e m be r s '   ke ys   ba s e d  o n  it s   que r y  a nd  r e tu r ni ng   a   s e pa r a te ,  a ve r a ge d  va lu e  ve c to r  f or  e a c h e le m e nt .     3.2.2. S c al e d - d ot   p r od u c t   at t e n t io n   S c a la bl e - dot   pr oduc t  a tt e nt io n  is   th e   f unda m e nt a l  id e a   of   s e lf - a tt e nt io n.  W e   w a nt   to   c r e a te   a n   a tt e nt io n  m e c ha ni s m   th a t  a ll ow s  a ny  e le m e nt   in   a  s e que nc e   to  pa y  a tt e nt io n  to   a ny  ot he r   e le m e nt   w hi le   be in g  c om put a ti ona ll y e f f ic ie nt . T he  dot - pr oduc t  a tt e nt io n i s  f e d a  s e r ie s  of  i nqui r ie s   [ 24] .   Q ∈ R T × d k     , ke y s   K ∈ R T × d k   a n d   v a l ue s   V   ∈   R T × d v , T   is   th e   s e que nc e   le ngt h,  a nd  d _ v   a nd  d _ k   de not e   th e   hi dde n  di m e ns io n  f or   que r ie s   V   va lu e s   a nd  K   ke ys ,  r e s pe c ti ve ly .  T he   s im il a r it y  of   th e   ke y  K _ j   a nd   que r y  Q _ i , us in g t he  dot - p r oduc t  a s  t he  s im il a r it y m e a s ur e , de te r m i ne s  t he  a tt e nt io n va lu e  f r om   j   to   i   a s  s how n   in  F ig ur e  4 .        ( , . ) =    (  √ )     ( 2)     T he  m a tr ix   c om bi na ti on     c om put e s   th e  dot   pr oduc t  f or   a ll   c onc e iv a bl e  c om bi na ti ons   of  ke ys   a nd  que r ie s ,  r e s ul ti ng  in   a      m a tr ix .   T he   a tt e nt io n  lo gi ts   f or   a   s in gl e   e le m e nt   to   a ll   ot he r   c om pone nt s   in   th e   s e que nc e   a r e  de pi c te d  in   e a c h  r ow .  T o  obt a in   a   w e ig ht e d  m e a n,  a ppl y  a   s of tm a x  a nd  m ul ti pl y  by  th e   va lu e   ve c to r   [ 25] .  ( T he  a tt e nt io n de te r m in e s  t he  w e ig ht s .)     3.2.3.   M u lt i - h e ad   at t e n t io n     M ul ti - he a d  a tt e nt io n  is   a   m odul e   th a t  e xe c ut e s   a n  a tt e nt io n  m e c ha ni s m   in   pa r a ll e l.   A   ne twor k  c a n   a tt e nd  to   a   s e qu e nc e   u s in g  s c a l e d - dot - pr oduc t  a tt e nt io n  [ 26] .  A   s in gl e   w e ig ht e d  a v e r a ge   is   in e f f e c ti ve   w h e n  a   s e que nc e   e le m e nt   ha s   to   a ddr e s s   m a ny  i s s ue s .  A s   a   r e s ul t,   w e   br oa de n  th e   a tt e nt io n  te c hni que s   to   in c lu d e   m a ny  he a ds ,  i. e .,   num e r ous   s e a r c he s   on  th e   s a m e   f e a tu r e s   w it h  di s ti nc t  ke y - va lu e   tr ip le ts .  W e   pr e c is e ly   r e s tr uc tu r e   a   que r y,  va lu e ,  a nd  ke y  m a tr ix   in to   s ub - que r ie s ,  s ub - va lu e s ,  a nd  s ub - ke y s   th a t  a r e   th e n   in di vi dua ll y  r un  th r ough  th e   s c a le d - dot   pr oduc t  a tt e nt io n  [ 27] .  A f te r w a r d,  th e   he a ds   a r e   c on c a te na te d   a nd  m ix e d w it h a  f in a l  w e ig ht  m a tr ix , A s  s how n i n F ig ur e  5. T hi s  p r oc e dur e  m a y be  e xpr e s s e d a s  f ol lo w s :     Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A r ti f   I nt e ll     I S S N :   2252 - 8938       F e de r at e d  in c e pt io n - m ul ti - he ad att e nt io n m ode ls  f or  c y b e r - at ta c k s  de te c ti on   ( I m ad T ar e q A L - H al boos i )   4783   M ul ti hue d   ( , , ) =    ( ℎ 1 , … ,   ℎ ℎ )     ( 3)     W he r e    = a tt e nt io n  (  ,  ,  )   th a t  is   r e f e r r e d  to   a s   th e   m ul ti - he a d  a tt e nt io n  la ye r   w it h  le a r na bl e   pa r a m e te r s .   … . ∈   × , … . ∈ × , … . ∈ ×      ∈   . ×    ( D   be in g  th e   in put  di m e ns io na li ty ) .           F ig ur e  4. A n  il lu s tr a ti on of  t he  s c a le d - dot - pr oduc t  a tt e nt io n. A   w e ig ht e d s um  va lu e  ge n e r a te s  t he  r e s ul t,  w it h  w e ig ht s  de f in e d by the  dot - pr oduc t  to  que r y a ll  ke ys   [ 25] .           F ig ur e  5.  T he  m ul ti - he a d a tt e nt io n. T he  a tt e nt io n m e c h a ni s m s  a r e  a c ti va te d s e ve r a l  ti m e s  i n  pa r a ll e l       E a c h  m ul ti - he a d  a tt e nt io n  bl oc k  c on s is ts   of   f our   s uc c e s s iv e   le v e ls .  T hr e e   C N N   ( de ns e )   la y e r s   a c c e pt   ke ys ,  que r ie s ,  or   va lu e s   in   th e   f ir s t  le ve l.   A   s c a le d  dot - pr oduc t  a tt e nt io n  f unc ti on  is   us e d  on  th e   s e c ond  le ve l.   T he   pr oc e s s e s   on   th e   f ir s t  a nd   s e c ond   le ve l s   a r e   r e p e a te d  h   ti m e s   in   pa r a ll e l,   de pe ndi ng  on   th e   num be r   of   he a ds   in   th e   m ul ti - he a d  a tt e nt io n  bl oc k.  O n   th e   th ir d   le ve l,   a   c onc a te na ti on  pr oc e s s   c onne c ts   th e   out put s   of   th e   s e ve r a l  he a d s .  A   f in a l  li ne a r   ( de ns e )   la ye r   pr oduc e s   th e   out put   on  th e   f our th   le ve l.   T he   f ol lo w in g  a r e   th e   pr im a r y c om pone nt s  of  a tt e nt io n:   −   k a nd q a r e  di m e ns io n ve c to r s , dk, c a r r yi ng t he  ke ys  a nd que r ie s .   −   V  de not e s  a  di m e ns io n ve c to r , dv, c ont a in in g t he  va lu e s .   −   K , Q , a nd V  a r e  m a tr ic e s  t ha t  bundle  t oge th e r  ke ys ,  que r ie s , a nd va lu e s .   −   W K , W Q , a nd W V  ge ne r a te  di s ti nc t  s ubs pa c e  r e pr e s e nt a ti ons  of  t he  ke y, que r y, a nd va lu e  m a tr ic e s .    −   W O , de s ig na ti ng a  m ul ti - he a d pr oj e c ti on ma tr ix .   T he   a tt e nt io n  f unc ti on  is   a   m a ppi ng   f r o m   a   que r y   to   a   s e t  of   k e y - va lu e   pa ir s   a nd  th e n  to   a n  out put .   T he   r e s ul t  is   a   w e ig ht e d  s um   of   th e   va lu e s ,  w it h  th e   w e ig h t  a s s ig ne d  to   e a c h  va lu e   de te r m in e d  by  th e   c om pa ti bi li ty   f unc ti on  of   th e   que r y  w it h  th e   r e le v a nt   ke y.  I n  th i s   s tu dy, we   u s e   one - di m e ns io n a l  c onvolut io ns   w it h  m ul ti - he a d  C N N s ,  w he r e   th e   di m e n s io n  di c ta te s   how   it   a na ly z e s   in put   da t a .  T o  ha ndl e   th e   in put ,  th e   s in gl e - c ha nne l  C N N   e m pl oys   a   s in gl e   c onvolut io na l  h e a d  w it h  a   s in gl e   c ha nne l.   I t  pr oc e s s e s   e a c h  pr oc e s s   va r ia bl e   in di vi dua ll y  us in g  in de pe nde nt   s in gl e - c ha nne l  c onvolut io na l  he a ds .  E a c h  bl oc k  C N N   B r a nc h  w il l  in c lu de   a   s e que nt ia l  la ye r   of   C onv1D  ( f il te r s   32,  ke r ne l   s iz e   3) ,  C onv1D  ( f i lt e r s   16,  ke r ne l  s iz e   5) ,  a nd   C onv1D  ( f il te r s   8,  ke r ne l  s iz e   7) .  T he   hype r pa r a m e te r s   a r e   ba t c h  s iz e   64,  e po c hs   50,   in it ia l  le a r ni ng  r a te   0.5,   a nd e nd l e a r ni ng r a te  0.008. T he   m ul ti - he a d C N N  s to r y i s  s e e n  in  F ig ur e  6.   O ne   a dva nc e d  us e   of   m ul ti - he a d  a tt e nt io n  is   in   th e   c ont e xt   of   s e lf - a tt e nt io n  m e c ha ni s m s ;  th e   in put   s e que nc e   i s   pr oc e s s e d   by  a tt e ndi ng  to   di f f e r e nt   pa r ts   of   th e   s e que nc e   to   c om put e   a   w e ig ht e d  s um   of   it s   e le m e nt s ,  w it h  th e   w e ig ht s   d e te r m in e d  by  th e   s im il a r it y  be twe e n  th e   e le m e nt s .  M ul ti - he a d  a tt e nt io n  a ll ow s     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8938   I nt  J  A r ti f   I nt e ll , V ol .  13 , N o.  4 ,  D e c e m be r  2024 :  4778 - 4794   4784   th e   ne ur a l  ne twor k  to   gove r n  th e   m ix in g  of   in f or m a ti on  be twe e n  s e gm e nt s   of   a n  in put   s e que nc e ,  r e s ul ti ng  in   r ic he r  r e pr e s e nt a ti ons  a nd i m pr ove d pe r f or m a nc e  on M L  t a s ks .           F ig ur e  6.   T he  m ul ti - he a d C N N  s tr uc tu r a l       3.3.  F e d e r at e d  l e ar n in g p r oc e s s   T h e   FL   s tr u c tu r e  c o n s i s t s   of   m ul ti p le  c l i e n t s  a nd   o n e  s e r v e r ;  m a in l y , t h e  s e r v e r  pr o vi d e s  a   g lo b a l  s h a r e d  m o d e l .  I n e a c h c o m m u ni c a t io n b e t w e e n t h e  s e r v e r  a nd t h e  c li e nt , t h e  c l i e n t  do w nl oa d s  t h e  m o d e l  a nd   tr a in s  w it h   l o c a l  d a t a s e t s   w hi l e   up d a t in g  m o de l  pa r a m e t e r s .  T h e   s e r v e r   r e c e iv e s   t h e   c ur r e n t  m od e l  p a r a m e t e r s   d i s tr ib u te d  to   e a c h   c l ie nt  f ol l ow in g  t r a in in g ,  a nd  t h e n  t h e   u pd a te d  m od e l  p a r a m e t e r s   a r e  u pl o a de d  t o  th e   s e r ve r   [ 2 8] .   W e   te s te d  two  m e th ods   to   a ggr e ga te   c li e nt   m ode l  pa r a m e te r s ;  th e   f ir s t  us e d  th e   F e dA vg  m e th od   [ 29] .  T he   s e r ve r   is   pr in c ip a ll y  c ont r ol le d  by  th r e e   e s s e nt ia l  pa r a m e te r s :  C ,  th e   pr opor ti on  of   c li e nt s ;  B ,  th e   lo c a l  ba tc h   s iz e   f or   c li e nt   upd a te s ;  a nd  E ,  th e   num be r   of   lo c a l  ba tc h  upda te s .  T he   a ggr e ga ti on  s e r ve r   in it ia ll y  c hoos e s   a   C   p e r c e nt a ge   of   K   c li e nt s   to   jo in   th e   F L   pr oc e s s   a nd  e x e c ut e   R \   FL   r ounds .  A t  r a ndom,  th e   a ggr e ga ti on  s e r ve r   bui ld s   a   ge ne r ic   m ode l  w it h  a   r a ndom  s e t  o f   in it ia l  w e ig ht s   w .  T he   ge ne r ic   m ode l  is   th e n   obt a in e d  by  e a c h  c li e nt   k  f r om   th e   a ggr e ga te   s e r ve r .  E ve r y  c li e nt   r e tr a in s   th e   ge ne r ic   m ode l  lo c a ll y  us in g  it s   da ta   a nd  c om put e s   a   ne w   s e t  of   w e ig ht s   f or   th e   ne w ly   c r e a te d  l oc a l  m ode l.   T he y  a ppl ie d  th e   f ol lo w in g  ( 4)   to   upda te  t he  m ode l  w e ig ht s .     + 1 = ∑  = 1   + 1   ( 4)     W he r e     de not e s   th e   to ta l  s iz e   of   a ll   c li e nt   da ta s e t s   a nd  nk  th e   s i z e   of   e a c h.  W t+ 1  I t  is   th e   it e r a ti on' s   upda te d  gl oba l  m ode l.   T he   m odi f ie d  m ode l  ha s   b e e n  di s tr ib ut e d  to   th e   c li e nt s .  A f te r   th a t,   th e   s e r ve r   c om bi ne s   a ll   c li e nt   pa r a m e te r s   ( k= 1) .  T he   ne w   gl oba l  m ode l  is   s ub s e que nt l y  s e nt   to   th e   c li e nt s ,  w ho  ut il iz e   th e   upda te d  pa r a m e te r s   to   e nh a nc e   th e   gl oba l  m ode l.   T hi s   pr oc e dur e   is   c ont in ue d  unt il   th e   m ode l  ha s   r e a c he d  c onve r ge nc e . T h e  pr oc e dur e s  u s e d t o t r a in  t he  va r io us  c u s to m e r  s e ts  a r e  de pi c te d i n A lg or it hm  1.   I n  th e   s e c ond  te s te d  m e th od,  w e   us e d   th e   F e dM A   a lg or it hm   [ 30] .  T he   F e dM A   a lg or it hm   e m pl oys   th e   f ol lo w in g  la ye r - w is e   m a tc hi ng  s c he m e .   T o  b e gi n,  th e   d a ta   c e nt e r   c ol le c ts   ju s t  th e   w e ig ht s   of   th e   f ir s t   la ye r s   f r om   th e   c li e nt s   a nd c onduc ts   on e - la ye r   m a tc hi ng  to   ge n e r a te   th e   f e de r a te d  m ode l' s   f ir s t - la ye r   w e ig ht s .   A   da ta   c e nt e r   th e n  br oa dc a s ts   th e s e   w e ig ht s   to   c li e nt s ,  w ho  s ubs e que nt ly   tr a in   a ll   s ubs e que nt   la ye r s   on  th e ir   da ta s e ts   w hi le   f r e e z in g  th e   m a tc hi ng  f e d e r a te d  la ye r s .  T hi s   te c hni que   c ont in ue s   unt il   w e   r e a c h  th e   la s t  la ye r ,  w he r e  w e  do we ig ht  a ve r a gi ng ba s e d on the  c la s s  pr opor ti ons  of  da ta  poi nt s  pe r  c li e nt . T he  F e dM A  t e c hni que   ne c e s s it a te s   c om m uni c a ti on  r ounds   e qua l  to   th e   num be r   of   ne twor k  la ye r s .  L oc a l  c li e nt s   r e c e iv e   th e   m a tc he d  gl oba l  m ode l  a t  th e   s ta r t  o f   a   ne w   r ound   a nd  r e c ons tr uc t  th e ir   l oc a l  m ode ls   w it h  th e   s a m e   s iz e   a s   th e   or ig in a l  lo c a l  m ode ls   b a s e d   on  th e   pr e vi ous   r ound' s   m a tc hi ng  r e s ul ts .  I n  c ont r a s t  to   th e   na iv e   m e th od  of   us in g   a   w hol ly  m a tc he d gl oba l  m ode l  a s  a  s ta r ti ng point  a c r os s  c li e nt s   on e a c h c yc le , t hi s  pr oc e dur e   a ll ow s  us  t o ke e p   th e   s iz e   of   th e   gl oba l  m ode l  s hor t.   F e dM A   id e nt if ie s   m a tc he d  s e ts   of   c onvolut io na l  f il te r s   a nd  a ve r a ge s   th e m   to  f or m  t he  gl oba l  c onvolut io na l  f il te r s . F e dM A ' s  m a tc he d a nd globa l  f il te r s  e xt r a c t  th e  s a m e  f e a tu r e  f r om  t h e   in c om in g  da ta .  T h e   F e dA vg' s   gl oba l  f il te r   is   th e   a ve r a ge   of   th e   c li e nt ' s   f il te r .  F ig ur e   7  s how s   th e   a r ti c le   F e dM A   a lg or it hm s .   A lg or it hm   1:   F e dA vg,  c on s id e r in g  K   c li e n ts   B   r e pr e s e nt s   th e   lo c a l  m in i - ba tc h  s iz e ,  E   r e pr e s e nt s   th e   num be r   of   lo c a l  e poc h s ,  th e   num be r   of   gl oba l  r ounds   is   ,   r e pr e s e nt s   th e   pr opor ti on  of   c li e nt s  a nd i s  t he  l e a r ni ng   .      A lg or it hm  1:  F e de r a te d l e a r ni ng ( F e dA vg)  [ 29 ]   1.    S e r ve r  ( K ,C ,R )   2.     1 ←  g e n e r ic   m o d e l   ()   3.       F o r   e a c h   r o un d       = 1 ,…,do   4.         ←m a x( C .K ,1)   5.          ←(   r a n d o m   s e t   of   m   c l ie n t s )   6.         F o r   e a c h   c l ie n t   K   ϵ   St   in   P a r a l l e l , do     Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A r ti f   I nt e ll     I S S N :   2252 - 8938       F e de r at e d  in c e pt io n - m ul ti - he ad att e nt io n m ode ls  f or  c y b e r - at ta c k s  de te c ti on   ( I m ad T ar e q A L - H al boos i )   4785   7.           _ ( + 1 ) ^           c l ie n t   up d a t e   ( wt . K )   8.         E nd   9.           w t + 1 ← ∑ nk n k k = 1   w t + 1 k     10.       E nd               1.    C li e nt  ( w ,k)   2.       ←   ( s p l it   P   in t o   b a t c he s   of   s iz e   B )      3.       F o r   e a c h   l o c a l   e p o c h   i   fr o m   1   to   E , do     4.         F or  ba tc h    ∈   , do   5.             ←     −   ⴙ   ∆   ꝭ   ( , )     6.         E nd   7.       E nd   8.       S e n d   w   to   s e r v e r             F ig ur e  7.  T he  F e dM A   a lg or it hm  s tr uc tu r e       I n  th is   w or k,  C N N   m a k e s   u s e   of   one - di m e ns io na l   c onvolut io ns ,  w he r e   th e   di m e ns io n   di c ta te s   how   it   a na ly z e s   in put   da ta .   T he   s iz e   of   th e   pa r a m e te r s   us e d   in   our   e x pe r im e nt ,  ba tc h_s iz e = 512,  le a r ni ng  r a te = 0.01,   r e tr a in _l r = 0.01,  f in e _t une _l r = 0.01,  e poc hs = 5,  r e tr a in _e poc hs = 10,  f in e _t une _e poc h s = 10,   pa r ti ti on_s te p_s iz e = 6,  lo c a l_ poi nt s = 5000,   n_ne ts = 10  ( num be r   of   c li e nt s ) .  us e d  opt im iz e r   S G D .  T he   la te s t   a lg or it hm   on  FL   w a s   done   on  F e d M A   in   2020,   s o   w e   tr ie d  to   e xpe r im e nt .  A lg or it hm   2  s um m a r iz e s   our   F e dM A .     A lg or it hm   2:  F e de r a te d l e a r ni ng ( F e dM A )   [ 30]   I nput :  lo c a l  w e ig ht s  of  N - la ye r  a r c hi te c tu r e s    { ( 1 ) , ( 2 ) , … , ( ) }   = 1               O ut put :  gl oba l  w e ig ht s   { ( 1 ) , ( 2 ) , … , ( ) }         = 1 ;    w hi le     ≤     do            if     <     th e n                  { − 1 }   = 1   =    −    ( { ( ) } = 1 )   ;                 ( ) =   1   ∑ ( ) − 1   ;            e ls e                   ( ) = ∑ ∑ = 1  ( )   w he r e      is  a  f r a c ti on of  da ta  poi nt s  w it h l a be ls     on t he  w or ke r   ;            E nd           f or     ∈   { 1 , 2   . . . , }   do                  ( + 1 ) ←     ( ) ( + 1 ) ;  //  pe r m ut a te  t he  ne xt - la ye r  w e ig ht s                                                             T r a in  { ( + 1 ) , . . . ( )   }  w it h  ( )   f r oz e n;             E nd              =     +   1 ;     E nd      Evaluation Warning : The document was created with Spire.PDF for Python.
                      I S S N :   2252 - 8938   I nt  J  A r ti f   I nt e ll , V ol .  13 , N o.  4 ,  D e c e m be r  2024 :  4778 - 4794   4786   O ur   f in a l  a lg or it hm   w it h  f e de r a te d  a ve r a ge   a nd  m ode l s   a r c h   pl us   s m ot e   w il l  be .   T he   s um m a r y   of   th e   pr opos e d A lg or it hm  3, i n s te ps :   −   S te p 1:  W e  s pl it   th e  I oT  da ta s e t  in to  t w o gr oups , t r a in   ( X _t r a in , y_t r a in )  a nd  va li da ti on ( X _va l,  y_va l)   s e ts   w it h a  r a ti o of  20%   f or  va li da ti on a nd r e m a in  f or   tr a in in g w it h s tr a ti f y  opt io n.   −   S te p2:  N or m a li z e  X _t r a in , X _va l  w it h M in M a x nor m a li z a ti on t e c hni que s   −   S te p3:  W e  ha ve  t w o opti ons  t o ove r c om e  t he  i m ba la nc e  pr obl e m  us in g c la s s  w e ig ht s  or  s m ot e  t e c hni que s   −   S te p 4:  S a m pl in g  our  t r a in  da ta s e t  be twe e n n c li e nt s  w it h t w o t e c hni que s :  I I D  or  non - IID   −   S te p 5:  B a tc h s iz e  e a c h n c li e nt  da ta s e t  to  ba tc he s  w it h s iz e  ba tc h s iz e   −   S te p 6:  W e  r e duc e  t he  opt im iz e r - le a r ni ng r a te  e ve r y f iv e  e poc hs  w it h 0.5   −   S te p 7:  W e  ke e p t r a c ki ng t he  gl oba l  m ode l  a c c ur a c y t o ge t  th e  be s t  m ode l  w e ig ht s .     A lg or it hm  3:  P r oc e s s  f e de r a te d l e a r ni ng   I nput :  I oT   D a ta s e t,   tr a in   D a ta   M ode ,  n  C li e nt s ,  s a m pl in g  T e c hni que ,  ba tc h - s iz e ,  c om m on  R ounds ,  in it   L e a r ni ng R a te   O ut put :  M ode l  W e ig ht s   1.   D iv id e  I oT  D a ta s e t  in to  t r a in in g a nd va li da ti on s e t   2.   N or m a li z e  X _t r a in , X _va l   3.   C he c k t he  i m ba la nc e  da ta s e t  to  s ol ve   o   I f   tr a in   D a ta  M ode  =  S M O T E :   ▪   U ps a m pl in g t he  X _t r a in  D a ta s e t   ▪   S e t  c la s s - W e ig ht s  < -   N one   o   E ls e   ▪   C la s s - W e ig ht s  < -   G e t  C la s s  W e ig ht s  f or  y_t r ia n   4.   C he c k t he  s a m pl in g t e c hni que  t o s pl it  t he  da ta  be twe e n n C li e nt s   o   I f   s a m pl in g T e c hni que  = =  I I D :   ▪   S e t  c li e nt s  da ta s e t  < -   S pl it   tr a in  da ta  s e t  be twe e n n C li e nt s  w it h I de nt ic a ll y D is tr ib ut e d   o   E ls e   ▪     S e t  c li e nt s  da ta s e t  < -   S pl it  t r a in  da ta  s e t  be twe e n n C li e nt s  w it h N on - I de nt ic a ll y D is tr ib ut e d   5.   S e t  c li e nt s  B a tc he d < -   S pl it  e a c h n C li e nt s  i n c li e nt ’ s  da ta s e t  to  ba tc he s  w it h s iz e  ba tc h S iz e   6.   I ni ti a li z e  t he  gl oba l  m ode l   7.   S e t  be s t  G lo ba l  M ode l  W e ig ht s  < -   gl oba l  M ode l  G e t  W e ig ht s  (  )   8.   S e t  be s t  A c c ur a c y R e s ul t  < -   0   9.   S e t  le a r ni ng r a te  < -   in it  L e a r ni ng  R a te     10.   I ni ti a li z e  opt im iz e r  w it h  le a r ni ng R a te   11.   S e t  lo s s  F unc  < -   lo s s  f unc ti on t o be   C a te gor ic a l  C r os s - e nt r opy   12.   S e t  e va lu a ti on M e tr ic s  < -   E va lu a ti on me tr ic s  ( a c c ur a c y, pr e c is io n, r e c a ll , f 1 - s c or e )   13.   F or   e a c h r ound in c om m on R ounds :   o   S e t  gl oba l  W e ig ht s  < -   gl oba l  M ode l  G e t  W e ig ht s  (  )   o   S e t  c li e nt  N a m e s  < -   ge t  c li e nt  na m e  f r om  c li e nt s  B a tc he d i n a  l is t  of  c li e nt s  ba tc he d   o   S huf f le   c li e nt  N a m e s   o   S e t  le a r ni ng r a te  < -   lr S c he dul e r  ( le a r ni ng  R a te , r ound)   o   S e t  opt im iz e r  l e a r ni ng r a te  < -   L e a r ni ng  R a te   o   S e t  e m pt y r ound M ode l  W e ig ht s  l is t   o   F or   a  c li e nt  i n c li e nt  N a m e s :                ▪   I ni ti a li z e  t he  l oc a l  m ode l   ▪   B ui ld  l oc a l  m ode l  w it h ( in put  s ha pe , num C la s s e s )   ▪   C om pi le  l oc a l  M ode l  W it h ( opt im iz e r = opt im iz e r , l os s = lo s s  F unc , m e tr ic s = e va lu a ti on M e tr ic s )            ▪   S e t  L oc a l  m ode l  < -   L oc a l  m ode l  s e t  w e ig ht s  ( gl oba l  W e ig ht s )   ▪   F it  l oc a l  M ode l  w it h ( c li e nt s  B a tc he d[ c li e nt ] , c la s s  W e ig ht s )   ▪   S e t  lo c a l  M ode l  W e ig ht s  < -   ge t  lo c a l  M ode l  G e t  W e ig ht s  (  )   ▪   A ppe nd l oc a l  M ode l  W e ig ht s  t o r ound M ode l  W e ig ht s   o   S e t  a ve r a ge  W e ig ht s  < -   a ve r a ge  t he  r ound M ode l  W e ig ht s  l is t    o   S e t  gl oba l  m ode l  < -   gl oba l  m ode l.  s e t  w e ig ht s  ( a ve r a ge  W e ig ht s )   14.   S e t  c ur r e nt  G lo ba l  M ode l  A c c ur a c y < -   E va lu a te  t he  gl oba l  M ode l  w it h ( X _va l,  y_va l)   15.   C he c k f or  t he  be s t  gl oba l  m ode l  w e ig ht   o   I f   c ur r e nt  G lo ba l  M ode l  A c c ur a c y >  be s t  A c c ur a c y R e s ul t:   ▪   S e t  be s t  G lo ba l  M ode l  W e ig ht s  < -   gl oba l  M ode l  G e t  W e ig ht s  ( )   16.   R e tu r n be s t  G lo ba l  M ode l  W e ig ht s .   Evaluation Warning : The document was created with Spire.PDF for Python.
I nt  J  A r ti f   I nt e ll     I S S N :   2252 - 8938       F e de r at e d  in c e pt io n - m ul ti - he ad att e nt io n m ode ls  f or  c y b e r - at ta c k s  de te c ti on   ( I m ad T ar e q A L - H al boos i )   4787   3.4 .    M u lt i - s t age  f r am e w o r k  of  t r u s t e d   f e d e r at e d  l e ar n in g   T he   m ul ti - s ta ge   a r c hi te c tu r e   of   th e   FL   e xe c ut io n,  a s   il lu s tr a te d  in   F ig ur e   8,  m a y  be   s e pa r a te d  in to   two s ta ge s :  tr a in in g a nd pr e di c ti on. At  e a c h s ta ge  of   FL   e xe c ut i on, t he  m ode l  e nc ount e r s  s e c ur it y a nd pr iv a c y  c onc e r ns . F L  ne e ds  a ppr opr ia te  s e c ur it y a nd pr iv a c y s a f e gu a r ds  a t  e a c h s ta g e .           F ig ur e  8. T he  m ode ls  of  t he  m ul ti - s ta ge  F L , i nc lu di ng t he  t r a in in g m ode ls       3.4.1.  T r ai n in g s t age   F L  ne e ds  t he  c ol la bor a ti on of  nume r ous  l oc a l  I oT  de vi c e s  t o t r a in  a  gl oba l  m ode l.  M a li c io us  I oT  c a n  m odi f y  it s   da ta ,  m ode l  gr a di e nt s ,  a nd  pa r a m e te r s   dur in g  th e   m ode l - tr a in in g  s te p.  A s   a   r e s ul t,   if   a dve r s a r ie s   pe ne tr a te   th e   I oT   de vi c e s ,  th e y  c a n  di s r upt   th e   in te gr it y  of   th e   tr a in in g  da ta s e t  or   m ode l,   im pa ir in g  th e   pe r f or m a nc e   of   th e   gl oba l   m ode l.   F ur th e r m or e ,  th e   s e r ve r   c a n  pe r f or m   pa s s iv e   or   a ggr e s s iv e   in f e r e nc e   a s s a ul t s .  F ur th e r m or e ,  dur in g  th e   upl oa d  a nd  dow nl oa d  of   m ode l  upda te s ,  in te r m e di a te s   in   th e   c om m uni c a ti on  r out e   m a y  a tt a c k  th e   m ode l s ,  r e s ul ti ng  in   ta m p e r e d  w it h  or   s to le n  m ode l  upda te s .   A s   a   r e s ul t,   s e c ur in g t he  c om m uni c a ti on of  m ode l  upda te s  b e twe e n I oT  d e v ic e s  a nd t he   s e r ve r  i s  c r it ic a l.     3.4.2.  P r e d ic t in g  s t age     O nc e   th e   m ode l   ha s   b e e n  tr a in e d,  th e   gl oba l  m ode l  i s   de li ve r e d  to   a ll   I oT   de vi c e s ,  r e g a r dl e s s   of   w he th e r   th e y  to ok  pa r t   in   th e   tr a in in g   or   no t.   C ybe r s e c ur it y  t hr e a ts   a r e   c om m on  dur in g   th is   s ta ge .  A tt a c ks   ty pi c a ll y  do  not   a lt e r   th e   ta r ge t  m ode l  but   t r ic k  it   in to   g iv i ng  in c or r e c t  pr e di c ti ons .  A f te r   obt a in in g  th e   opt im a l  gl oba l  m ode l  w e ig ht s ,  w e   c a n  br oa d c a s t  to   c li e nt s ,  m a ke   pr e di c ti ons   f or   th e   te s t  da ta s e t,   a nd  th e n   a s s e s s  t he  out c om e s  us in g  a c c ur a c y, pr e c i s io n, F 1 - s c or e , r e c a ll ,  a nd l os s .       4.   S Y S T E M   D E S I G N   4.1.   D at as e t s   T he   c ybe r s e c ur it y  E dge - I I oT   da ta s e t  f or   I I oT   a nd  I oT   a ppl ic a ti ons   is   ut il is e d  in   ML - ba s e d  I D S   to   a s s e s s  t he  m ode l s  i n t hi s  pa pe r . T he  E dge - I I oT  da ta s e t  c ove r s  f our te e n di s ti nc t  f or m s  of  a tt a c ks  s e pa r a te d i nt o  f iv e   c la s s if ic a ti ons   ( di s tr ib ut e d  de ni a l - of - s e r vi c e   ( D D oS )   a nd   de ni a l - of - s e r vi c e   ( D D oS )   a s s a ul ts ,  in je c ti on  a tt a c ks ,  in f or m a ti on  ga th e r in g,  m a lwa r e   a tt a c ks ,  a nd  m a n  in   th e   m id dl e   ( M I T M )   a tt a c ks ) .  E dge   I I oT   [ 11]   ha s   20,952,648  ty pi c a l  a tt a c k  s ta ti s ti c s ,  w hi c h  c om pr is e   11,223,940  nor m a l  a nd  9,728,708   a tt a c ks .  W e   di vi de d   th is   da ta s e t  in to   20%   f or   te s ti ng  a nd   80%   f or   tr a in in g,  w i th   th e   opt io n   of   s tr a ti f yi ng  to   m a in ta in   th e   pe r c e nt a ge s  c on s ta nt  a c r os s  a ll  c la s s e s .  T he  da ta s e t  yi e ld e d 61 f e a tu r e s  a nd 1,909,671 s a m pl e s , 1,527,736 a nd  381,935 da ta  s e ts  a r e  a va il a bl e  f or  t r a in in g a nd  t e s ti ng, r e s pe c ti ve ly , w hi c h w e r e  di vi de d i nt o 15  c a te gor ie s  a s   s how n i n T a bl e   2 . W e  us e d c la s s  w e ig ht s  s in c e  t he  da ta  w e r e  i m ba la nc e d. F ol lo w in g va r io us  a tt e m pt s  t o f in e - tu ne   th e   hype r - pa r a m e te r s ,  th e   ba tc h  s iz e   w a s   s e t  a t  64,  w hi c h   is   a ppr opr ia te   f or   m e m or y  th a t  m a in ta in s   th e   tr a in in g  pr oc e s s   w it hout   f lu c tu a ti on  a nd  c onve r ge s   w it h  ge ne r a l  pe r f or m a nc e .  T he   de pt h  w a s   lo w e r e d  to   f our   or   s ix   f or   c e r ta in   E dge - I I oT   da ta   be c a us e   s om e   da ta s e ts   r e qui r e   a   m or e   s ophi s ti c a te d  m ode l  to   c onve r ge   to   a   Evaluation Warning : The document was created with Spire.PDF for Python.