I n d on e s ian   Jou r n al   o f   E lec t r ica l   E n gin e e r in g  a n d   Com p u t e r   S c ience   Vo l .   4 4 ,   N o .   2 ,  N o v e m b e r   202 6 ,   pp.   450~468   I S S N:  2502 - 4 752,   DO I :  10 . 11591/i j e e c s . v 4 4 .i 2 . pp 450 - 468             450       Jou r n al  h o m e page :  ht tp: // ij e e c s . iaes c or e . c om   Op t i m i z i n g  m e n t al   h e al t h  t e xt  c la ssi f ic at io n  u si n g ge n e t ic   al gor ith m s an d   m e t a - le ar n in g       Al o k   K u m ar   Je n a 1 ,2 ,   K ak it a  M u r al i  Gop al 1 ,   Abi n as h   T r ip at h y 3   1 S c h oo l  of  C o mput e r  S c i e n c e  a nd E ng in e e r in g, G I E T  U ni v e r s it y , O di s ha , I ndi a   2 D e pa r tm e nt   of   C o mpu te r  S c ie n c e  a nd E ngi n e e r in g , S ik s ha  O  A nus a ndha n ( D e e m e d t o  be )  U ni v e r s it y , O di s ha , I ndi a   3 S c h oo l  of  C o mput e r  A ppl i c a ti o n,  K I I T  ( D e e me d t o  b e )  U ni ve r s it y , O di s ha , I ndi a       Ar t ic l e   I n f o     AB S T RA CT   A r ti c le  h is tor y :   R e c e i ve d   J a n   16,   2025   R e vi s e d  S e p  18,   2026   A c c e pt e d  Oc t   9 ,   2026       Me n t al   h e a l t h   i s s u e s   are   a  g ro w i n g   g l o b al   c o n cern ,   w i t h   i n c r e as i n g   c h a l l en g e s   i n   a cc u rat e l y   i d en t i f y i n g   an d   c at eg o r i zi n g   me n t al   h e al t h - r el at ed   c o n t en t   fro m   u s e r - g e n e rat e d   t e x t .   T h i s   p ap e r  p re s en t s   a  n o v e l   ap p ro a c h   f o r   me n t al   h e al t h   t e x t   c l as s i f i c at i o n   b y   i n t eg rat i n g   b i d i r ec t i o n al   en c o d e r   re p re s e n t at i o n s   fr o m   t ran s fo r me rs   (B E RT )  w i t h   f ew - s h o t   l e arn i n g   a n d   g en e t i c   a l g o ri t h m  (G A )  o p t i m i zat i o n .   G i v en   t h e  l i mi t e d   av a i l ab i l i t y   o f   l ab e l ed   men t al   h e al t h   d at a,   f ew - s h o t   l e arn i n g   e n ab l e s   t h e  mo d el   t o   g en e r al i z e  e ff ec t i v el y   u s i n g   mi n i m al   e x am p l e s ,   i m p ro v i n g   a d ap t ab i l i t y   t o   u n d e rr e p r e s en t ed   c at e g o ri e s .   T h i s   s t u d y   o v e rco me s   t h e  cl as s   i m b al an ce  p ro b l em   t h r o u g h   t h e   c l as s - b al an ce d   l o s s   fu n c t i o n ,   w h i c h   al l o w s   fo r  e q u a l   l e ar n i n g   a c r o s s   al l   c at eg o r i e s   o f  c l as s e s ,   i . e .   A n x i e t y ,   D e p r e s s i o n ,   Su i ci d e W at c h ,   L o n el y ,   an d   M e n t al H e al t h .   A d d i t i o n al l y ,   G A   i s   u s e d   t o   f i n e - t u n e  h y p e rp ara me t e rs   s u ch   as   l e arn i n g   rat e s ,   l a y e r   s el ec t i o n ,   an d   b at ch   s i z e  t o   en h a n ce   c l as s i fi c at i o n   p e rfo r m a n c e.   G A   al l o w s   f o r  t h e   s el ec t i o n   o f   o p t i m al   co n f i g u rat i o n s   o v e r  t h i s   s e ar ch   s p ace  an d   en s u re s   i m p ro v eme n t s   i n   mo d e l   A c cu ra cy   (A ) .   T h i s   c o m b i n e d   u s e   o f  G A   w i t h   BE RT   p ro v i d e s   g o o d   g en e ral i zat i o n   ab i l i t i e s   i n   l o w - d at a  s ce n ar i o s   w i t h   h i g h   cl as s i fi c at i o n   A ccu ra cy .   T h e i r   r e s u l t s   are  p ro m i s i n g ,   as   t h ey   h i g h l i g h t   t h e   u s e   o f   t ran s fo rme r - b as e d   ar c h i t ec t u r e s   as   a   me an s   o f   au g me n t e d   m o n i t o r i n g   o f   me n t al   h e a l t h ,   i n   co n j u n c t i o n   w i t h   me t a - l e ar n i n g   an d   o p t i m i zat i o n   t e ch n i q u e s .   T h i s   m o d e l   c ap t u r e s   b o t h   l o c a l   an d   g l o b al   d e p en d en c i e s   e ff ec t i v el y .   T h e s e   r e s u l t s   s u g g e s t   t h at   t h e   i n t eg rat i o n   o f  t ran s fo rme r - b as ed   arc h i t ec t u r e s   w i t h   me t a - l e arn i n g   p ro d u ce s   r o b u s t   men t al   h e a l t h   mo n i t o ri n g   s y s t em s .   K e y w o r d s :   B E R T   F e a t ur e   e x t r a c t i o n   Ge n e t i c   a l go r i t hm   o pt i m i z a t i o n   M e n t a l   h e a l t h   c l a s s if i c a t i o n   S e n t i m e n t   a n a ly s i s   T e x t   c l a s s if i c a t i o n   Th i s   i s   a n   o p en   a c ces s   a r t i c l e  u n d e r   t h e  CC  B Y - SA   l i cen s e.     C or r e s pon din g  A u th or :   Al o k  K u m a r   J e na   S c h o o l   o f   C o m put e r   S c i e n c e   a n d  E n g i ne e r i ng ,  GI E T   Uni v e r s i t y   Od i s ha ,   I n d i a   E m a i l :  a l o k. j e na @ g i e t . e du       1.   I NT RODU C T I ON   M e n t a l   h e a l t h   d i s o r de r s   l i ke   a nxi e t y ,   de pr e s s i o n ,   a n d  s u i c i da l   i de a t i o n   a r e   t h e   l e a d i ng  c a us e s   o f   d i s a bi li t y   a n d  d i s t r e s s   i n   t h e   wor l d  [ 1] .   An   i n c r e a s e   i n   m e n t a l   he a l t h   i s s ue s   w i t h   t h e   i n t e ns i ve   us e   o f   d i g i t a l   p l a t f o r m s   c r e a t e s   c h a l l e n g e s   a n d  o pp or t uni t i e s   i n   thi s   s pa c e .   Da t a   r e l e v a n t   to   m e n t a l   h e a l t h   i s   o b t a i ne d  f r o m   o nl i ne   f o r u m s ,   s o c i a l   m e d i a   we b s i t e s ,   a n d  d i g i t a l  h e a l t h   too l s ,   a l l   o f   w hi c h   s e r v e   a s   o ut l e t s   f o r   e m o t i o n a l   e x pr e s s i o n   a n d  m e c h a ni s m s   f o r   f i nd i ng  s uppo r t .   S t i ll ,   t h e   m e a s ur a bl e   a m o u n t   o f   us e r - ge n e r a t e d   t e x t   da t a   i s   a   bi g  c h a ll e n ge   f o r   pr o c e s s i n g,   a n a ly s i ng ,   a n d  c o r r e c t l y   c l a s s i f yi ng  s uc h   i nf o r m a t i o n   i n   a n   e f f i c i e n t   wa y .   Ho we v e r ,   a u to m a t i c   de t e c t i o n   o f   m e n t a l   h e a l t h -   r e l a t e d  c o n t e n t  i n   us e r -   ge n e r a t e d   t e x t  c a n   l e a d  to  c r uc i a l  Evaluation Warning : The document was created with Spire.PDF for Python.
I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i     I S S N:   2502 - 4752       Optimiz ing  me ntal   he alt h  tex t   c las s if ication  us ing   ge ne ti c   algor it hms   and  me ta - lear ning   ( A lok  K umar   J e na )   451   i ns i g h t s   a b o ut  pe o pl e ’ s   e m o t i o na l   s t a t e s   a n d  h e l p  i n   i de n t i f yi ng  i n d i vi du a l s   a t  r i s k  a n d  a s s i s t i n g  m e n t a l   h e a l t h  pr o f e s s i o n a l s   i n  pr o vi d i ng  t i m e ly   i n t e r v e n t i o n s .     M a ny   c o m m o n   t e x t   c l a s s if i c a t i o n   m e t h o ds   s t r u gg l e   t o   a de qua t e l y   r e pr e s e n t   t h e   s u b t l e t i e s   a n d   i n t r i c a c i e s   i nhe r e n t   i n   r e f e r e n c e s   t o  m e n t a l   h e a l t h   da t a   c l a s s if i c a t i o n ,   whi c h   c a n   l im i t   t h e i r   a pp l i c a bil i t y   i n   t his   s e n s i t i ve   a n d  n ua nc e d  f i e l d.   I n   r e s po n s e   to   t h e s e   r e s t r i c t i o ns ,   m o r e   a n d  m o r e   r e s e a r c h e r s   a r e   l e a ni ng   to wa r ds   a dv a nc e d  na t ur a l   l a n gua ge   pr o c e s s i ng  ( NL P )   m e t h o ds ,   i n   pa r t i c u l a r ,   tr a n s f o r m e r - b a s e d  m o de l s   s uc h   a s   bi d i r e c t i o n a l   e n c o de r   r e pr e s e n t a t i o n s   f r o m   t r a n s f o r m e r s   ( B E R T )   [ 2] .   I t  i s   a   de e p  l e a r ni ng  m o de l   t h a t  us e s   bi d i r e c t i o n a l   c o n t e x t   to  de t e r m i ne   wo r d  m e a ni ng s   i n   s e n t e n c e   s t r i n gs   a n d  h a s   a c hi e v e d  s t a t e - of - t h e - a r t  r e s ul t s   o n   s e v e r a l   t a s ks ,   i nc l ud i n g  s e n t i m e n t   a n a l y s i s ,   que s t i o n   a n s w e r i n g,   a n d  t e x t  c l a s s if i c a t i o n .   Ye t,   B E R T   f a c e s   c h a ll e n g e s   i n  m e n t a l   h e a l t h ,   s uc h   a s   t h e   l a c k  o f   l a b e l e d  da t a s e t s   a n d  ge ne r a l i z a t i o n   pr o bl e m s   r e ga r d i n g   m u l t i p l e   e x pr e s s i o n s   o f   m e n t a l   h e a l t h   pr o bl e m s .   F e w - s h o t  l e a r ni ng  t e c hni que s   a r e   us e f u l   t o  t a c kl e   th e s e   c ha l l e nge s .   F e w - s h o t   l e a r ni n g  a ll o ws   m o de l s   to   l e a r n   w i t h   v e r y   f e w  l a b e l e d  e x a m p l e s ,   pr o vi n g  us e f u l   a s   t h e s e   m e n t a l   h e a l t h   da t a s e t s   a r e   s c a r c e   a n d   a nn o t a t e d  da t a   i s   l a c k i ng  [ 3] .   F ur t h e r   i m pr o v e m e nt   i n   m o de l   pe r f o r m a n c e   c a n   b e   a c hi e v e d  by   t uni ng   B E R T ' s   hy pe r pa r a m e t e r s   a n d  pe r f o r m i ng  f e a t ur e   s e l e c t i o n .   T h e   m o de l   Ac c ur a c y   i s   gr e a t l y   a f f e c t e d  by   t uni ng  o f   hy pe r pa r a m e t e r s   s uc h   a s   l e a r ni ng  r a t e ,   b a t c h   s i z e ,   a n d  t h e   n u m b e r   o f   l a y e r s   f i ne - t un e d.   T h e y   us e   ge n e t i c   a l go r i t hm s   ( G A )   a s   t h e i r   he ur i s t i c   o pt i m i z a t i o n   m e t h o d  f o r   b e tt e r   c o nf i gur a t i o n   d i s c o v e r y .   I n s p i r e d  b y   n a t ur a l   s e l e c t i o n ,   GA   i m pr o v e s   a   po pul a t i o n   o f   c a n d i da t e   s o l ut i o n s ,   wh e r e   c o nf i gur a t i o n s   a r e   s e l e c t e d,   c om b i ne d,   a n d  m ut a t e d  i t e r a t i v e ly   t o  m a xi mi z e   t h e   m o de l   pe r f o r m a n c e   [ 4] .   T h i s   wo r k  p r e s e n t s   a n   i n t e gr a t e d  a ppr o a c h   f o r   m e n t a l   he a l t h   t e x t   c l a s s i f i c a t i o n ,   w hi c h   c o m bi n e s   B E R T ,   f e w - s h o t  l e a r ni ng   a n d  o p t i mi z a t i o n   b a s e d  o n   GA   [ 5] .   I t   l e ve r a ge s   a   s m a ll   qu a n t i t y   o f   l a b e ll e d  da t a   to  c l a s s if y   a   da t a s e t   c o n t a i ni ng  m e n t a l   h e a l t h - r e l a t e d   c o n t e n t  i n t o   f i ve   c a t e go r i e s :  Anxi e t y ,   De pr e s s i o n ,   S ui c i d e   W a t c h ,   L o n e ly ,   a n d  M e n t a l   He a l t h .   T h us ,   t hi s   m o da l i t y   o f   wo r k  c a n   a l s o   h e l p  o v e r c o m e   li m i t a t i o ns   o f   m e t a da t a ,   a u to m a t e   hy pe r pa r a m e t e r   t uni n g  t o   i m pr o v e   m o de l   pe r f o r m a n c e ,   a n d  i n c r e a s e   i n t e r pr e t a bi li t y   o f   e m o t i o n a l   f o r u m s   b a s e d  o n   t hi s   a ppr o a c h .   T h e   r e m a i nde r   o f   t h i s   pa pe r   o u t l i ne s   t h e   m e t h o do l o g y   f o r   de v e l o p i n g  a n d  t r a i ni ng  t h e   pr o p o s e d  m o de l ,   d e s c r i be s   t h e   e x pe r i m e n t s   c o n duc t e d,   a n d  d i s c us s e s   t h e   r e s u l t s   o b t a i ne d.   A dd i t i o n a ll y ,   w e   e xp l o r e   t h e   pot e n t i a l   a pp li c a t i o ns   o f   t hi s   wo r k   i n   r e a l - t i m e   m e n t a l   h e a l t h   m o ni t o r i n g,   s uppo r t  s y s t e m s ,   a n d  i n t e r v e n t i o n s .   B y   i n t e gr a t i n g  B E R T ,   GA ,   a n d  f e w - s h o t  l e a r ni ng ,   t h i s   a ppr o a c h   a i m s   to  a dv a n c e   a uto m a t e d  m e n t a l   h e a l t h  c l a s s if i c a t i o n ,   c o n t r i b ut i n g  t o  m o r e   e f f i c i e n t ,   a c c e s s i bl e ,   a n d  pe r s o n a l i z e d  m e n t a l   h e a l t h   c a r e .         2.   L I T E RA T UR E   S UR VE Y   R e s e a r c h   o n   t e x t   s e n t i m e n t   a n a l y s i s   ha s   pr o duc e d  m a ny   i ns i g h t f u l   a r t i c l e s ,   y e t   f e w  ha v e   e x p l o r e d   m e n t a l   h e a l t h   da t a   f o r   e v a l ua t i n g  s e n t i m e n t .   W hil e   l im i t e d  wo r k  e xi s t s ,   we   s t udi e d  s e ve r a l   r e l a t e d  pa pe r s   t h a t  h e l pe d  s ha pe   o ur   i de a .   S e n t i m e n t   a n a ly s i s   i s   n o t  l im i t e d  to   t h e   E n g l i s h   l a n gua ge ;   i t   i s   a l s o   a ppl i e d  to  v a r i o us   n a t ur a l   l a n gua ge s   w i t h   d i f f e r e n t   m e t h o d o l o g i e s   [ 6] .   I n   t hi s   pr o c e s s ,   o n e   o f   t h e   s t udi e s   i m p l e m e n t e d  a   C hi ne s e   bi d i r e c t i o n a l   e n c o de r   r e pr e s e n t a t i o n   f r o m   t r a n s f o r m e r s   ( C B E R T )   f o r   C hi ne s e   e - c o m m e r c e   r e vi e w s .   T h e y   a l s o   a n a ly z e d  t h e   r e s u l t s   by   a pp lyi ng  d i f f e r e n t   m o de l s   a p a r t   f r o m   t h e   C B E R T   m o de l .   T h e   gr o wt h   of   o nl i ne   m a r ke t p l a c e s   a n d  t h e   c o n t i n uo us   e x pa ns i o n   o f   pr o duc t   o f f e r i ngs   ha v e   m a de   i t   i m pe r a t i v e   f o r   b u s in e s s e s   t o   c o m pr e h e n d  c o n s u m e r   s e n t i m e n t s   to wa r ds   s pe c i f ic  c o m m o d i t i e s   o r   b r a n ds   t o  m a ke   e duc a t e d  de c i s io n s   a nd   e nh a nc e   c us t o m e r   h a pp i ne s s .   An o t h e r   a pp r o a c h   ut i li z e d  a n   upgr a de d  B E R T   f o r   i m ba l a n c e d  [ 7] ,   s h o r t - t e x t  s e n t i m e n t   a n a ly s i s   w i t h o ut  c o s t l y   l a b e l e d  da t a .   T h i s   s t r a t e gy   a ddr e s s e d  t h e   n e e d  f o r   l a r ge   l a b e l e d  da t a s e t s   in  s e m i - s upe r vi s e d  s h o r t - t e x t  c l a s s i f i c a t i o n .   W hil e   l a b e l e d  da t a   i s   s c a r c e ,   v a s t   a m o un t s   o f   unl a b e l e d  i nf o r m a t i o n   e xi s t   o nl i ne .   T h e   mi x - m a t c h   NL   m o de l   c a p i t a li z e s   o n   t hi s   a b u n da n c e   by   c o m bi n i ng  mi n im a l   t a gge d  e x a m p l e s   w i t h   m a s s i ve   u n t a gge d  c o r p o r a   to   ge n e r a t e   s y nt h e t i c   a nn ot a t i o n s .   T o   a dd r e s s   i m ba l a n c e d  s a m p l e   s i z e s ,   r e s e a r c h e r s   de ve l o pe d  a n   i nn o v a t i v e   B E R T   v a r i a nt  us i n g  F o c a l   L o s s   i ns t e a d  o f   r o u t i n e   c r o s s - e n t r o p y   dur i ng   pr e - t r a i ni ng.   T hi s   a ppr o a c h   l e v e r a ge s   unl a be l e d  da t a   to  a m e l i o r a t e   s e n t i m e n t   a n a ly s i s   o bs t a c l e s   by  c o m pe ns a t i n g  f o r   di s pr o p o r t i o n a t e   p o s i t i ve   a n d  n e ga t i v e   va l u e s .   Da t a   r e l a t e d  to   C OV I D - 19  o pi ni o ns   i n   s o c i a l   m e d i a   s t ud y   [ 8]   we r e   us e d   t o   de t e r m i ne   w h e t h e r   s e n t i m e n t   a na l y s i s   mi g h t   pr o vi de   u s e f u l   i n f o r m a t i o n   f o r   m a n a g i ng  t h e   e p i de mi c ;   t h e y   e x a mi ne d  i t   f r o m   t h e   pr i s m   o f   s o c i a l   a n d  b e h a vi o r a l   s c i e n c e   r e s e a r c h .   A   r e vi e w   o f   t h e   l i t e r a t ur e   o n   s e n t i m e n t   a n a ly s i s   o f   C OV I D - 19  T wi t t e r   da t a   wa s   c o n duc t e d ,   a dh e r i n g  to  t h e   pr e f e r r e d  r e por t i n g  i t e m s   f o r   s y s t e m a t i c   r e vi e ws   a n d  m e t a - a n a ly s e s   ( P R I S M A )   r e qu i r e m e n t s ,   w i t h   a   f o c us   o n   m a c hi ne   l e a r ni ng  m e t h o ds .   A   s t ud y   c o n duc t e d  [ 9] ,   p r o vi d e d  a n   i n - de pt h  a n a ly s i s   c o m pa r i n g  v a r i o us   m a c hi ne   l e a r ni ng   t e c h ni que s   f o r   a n a ly z i ng  c o de - m i xe d  I n d i a n   l a n gu a ge   t e x t   e x t r a c t e d  f r o m   we ll - kn o wn   m e d i a   we b s i t e s .   W h e n  c o n s i de r i n g  t r a d i t i o na l   m a c hi ne   l e a r ni ng  m e t h o ds ,   s uppo r t  v e c t or   m a c hi ne s   ( S VM s )   a r e   r e gu l a r l y   t he   a l go r i t hm   o f   c h o i c e   f o r   a c a de m i c s   a c c o r d i n g  t o   m o s t   r e s e a r c h ;   t h e   pr e do m i na n t l y   u s e d  de e p   l e a r ni ng  a r c hi t e c t ur e   e x p l o r e d  i n   r e c e n t   i nv e s t i ga t i o n s   i s   t h e   bi d i r e c t i o n a l   l o n g  s h o r t - t e r m   m e m o r y   ( L S T M )  n e t wo r k .   T h e   b u l k  o f   e xi s t i n g  wo r k  c e n t e r s   a r o un d  c o de - m i xe d  s o c i a l   m e d i a   m e s s a ge s   wr i t t e n   i n   H i nd i   a n d  E n g l i s h  r e tr i e ve d  f r o m   t h e   m i c r o bl o gg i ng  p l a t f o r m   T w i t t e r .   M a n ua ll y   a nn o t a t e d  da t a s e t s ,   NL P   too l s ,   a n d  o t h e r   l e xi c a l   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2502 - 4752   I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i ,  Vo l .   4 4 ,   N o .   2 ,   N o v e m b e r   20 2 6 :   450 - 468   452   r e f e r e n c e s   a r e   e s s e n t i a l   a s s e t s   wh e n   wo r ki n g  w i t h   da t a s e t s   c o n t a i ni ng  c o de - m i xe d  l i ngu i s t i c s .   J e m a i   e t  al .  [ 10]   di s c us s   s e n t i m e n t   de t e c t i o n   a s   a   mi s s i o n   t ha t   f a c e s   s e ve r a l   d if f i c u l t i e s .   T hi s   wo r k  a i m s   t o   e x a mi ne   m e t h o ds   a n d  a ppr o a c h e s   t h a t  e n s ur e   t h e   a u to m a t i c   c l a s s if i c a t i o n   o f   a tt i t ude s   a s   po s i t i v e   o r   n e ga t i v e   po l a r i t y .   I n   t h e i r   a r t i c l e ,   v a r i o us   m e t h o ds   a r e   e m p l o y e d.   T he   m o s t   r e c e n t  o n e s   ut i li z e d  we r e   c r e a t e d  us i n g  i nf o r m a t i o n   f r o m   t h e   30k  t we e t   s a m p l e   t h a t   m a ke s   up  t h e   n a t ur a l   l a n gua ge   t oo l k i t   ( NL T K ’ s )   T wi t t e r   c o r pus .   A   s t udy   by  Ta nh a   e t  al .  [ 11]   h a s   f o un d  t h a t  a   m u l t i - s c a l e   a n d  s pe c t r a l - s pa t i a l   a t t e n t i o n   n e t wo r k   ( M S 3A ) - e n s e m ble   o u t pe r f o r m s   n a ï ve   B a y e s   a n d  a r t i f i c i a l   ne ur a l   n e t wo r k  ( A NN )   i n   t e r m s   o f   J 48  p e r f o r m a n c e .   T h e   a l go r i t h m  t h e n   a s s i g ns   a   f i na l   l a b e l   t o  unl a be l e d  da t a   us i n g  a   v a r i e t y   o f   c l a s s if i c a t i o n   a l go r i t hm s .   T h e y   a l s o   n ot i c e   t h a t  t h e   s i mi l a r i t y   i nf o r m a t i o n   i s   c r uc i a l .   F i na ll y ,   t h e y   de m o ns t r a t e   h o w  t h e   s ugge s t e d   m e t h o d  dr a m a t i c a ll y   e nh a n c e s   c l a s s i f i c a t i o n  pe r f o r m a n c e   a n d  c o r r e c t l y   e v a l ua t e s   c o m m e n t s .   A   s t udy   by   P a n  e t  al .  [ 12]   o n   t h e   pr o b l e m   o f   h a vi ng  a   l im i t e d   qua n t i t y   o f   l a b e l e d  t r a i ni ng  da t a   s ugge s t e d  a   t e c h ni que   f o r   l e ve r a g i n g  c o n t e x t ua l   da t a   f r o m   unl a b e led  m o vi e   a n d  r e s t a ur a n t  r e vi e w s ,   wi t h   a   n e ur a l   n e t wor k - b a s e d  l e a r ni ng  m o de l ,   kn o wn   a s   t h e   l a dde r   n e t wor k.   T h e   t e s t  r e s u l t s   s h o we d  h o w  e f f e c t i v e   t h e   m e t h o d  i s   f o r   s e n t i m e n t   a n a ly s i s ,   a n d  t h e y   s pe c if i c a ll y   v a li da t e d  t h a t   i t   wo r ks   we l l   f o r   d i s t i ll i ng  B E R T   a n d  AL B E R T .   T he i r   a ppr o a c h   e x pa n de d  t o   i n c l ude   ( i )   l a r ge r   da t a s e ts   s uc h   a s   t h e   pe e r   r e vi e ws   da t a s e t ;   ( i i )   wo r d - l e v e l   f e a t ur e s   c o n v e r t e d  f r o m   s e n t e n c e - l e v e l   f e a t ur e s ;   a n d  ( i ii )   a s pe c t - b a s e d  s e n t i m e n t   a na l y s i s   put   i n t o   p r a c t i c e .   A   f r a m e wo r k  b a s e d  o n   a  v a r i a t i o n a l   a ut o e n c o de r   ( VAE )   f o r   i nve s t i g a t i o ns   o n   t h e   a s p e c t - t e r m   s e n t i m e n t   a na l y s is   ( A T S A )   t a s k  by   C h e n g  e t  al .  [ 13]   wa s   pe r f o r m e d   i n   t h e i r   s t ud y .   T r a n s f o r m e r s   a r e   us e d  i n   t hi s   wo r k  to  c r e a t e   t h e   e n c o de r   a n d  de c o de r .   I t   h a s   b e e n   de mo n s t r a t e d   t h r o ugh   a n a ly t i c a l   a n d  e x pe r i m e n t a l   s t udi e s   h o w  e f f e c t i v e ly   t h e   a s pe c t - t e r m   s e mi - s upe r vi s e d  V A E   b a s e d  o n   t r a n s f o r m e r s   ( A S V A E T )   w o r ks .   T h e   a ppr o a c h   i s   va l i da t e d  us i n g  a   v a r i e t y   o f   c l a s s if i e r s .   I m pr o v e m e nt  i s   s e e n  f o r   a l l   t e s t e d  c l a s s if i e r s   w h e n   A S V A E T   i s   us e d,   pr o vi n g  i t s   a pp li c a bil i t y   to   a l l .   All   t h e   a l go r i t hm s   f o u n d   t h r o ugh o u t  t h e   e x pe r i m e n t   a r e   a s s e s s e d  us i ng  t h e   s e l e c t e d  pe r f o r m a n c e   m e a s ur e s ,   a n d  t h e   r e s u l t s   a r e   r e po r t e d .   T h e   m o de l   by   P a n d y a   e t  al .  [ 14 ]   wa s   c h o s e n   a s   th e   b e s t   c l a s s i f i c a t i o n   f o r   s e n t i m e n t   a n a ly s i s .   T h e   c o n v o l ut i o n a l   n e ur a l   n e t wo r k  ( C NN ) -   L S T M   m o de l   h a s   t h e   hi g h e s t   de gr e e   o f   A c c ur a c y   a s   pe r   a   c om pa r i s o n  b e t we e n   t hi s   m o de l   a n d   t h e   X GB o o s t   m o de l ,   f o r   th e   c l a s s i f i c a t i o n   o f   s e n t i m e n t s   i n   a   s e l e c t e d  T wi t t e r   da t a s e t.   A   m o de l   i s   i m p l e m e n t e d  by   wo r k i n g  w i t h   t h e   pr e - t r a i n e d  wo r d  v e c to r   m o de l ,   whi c h   r e c e i ve s   wo r d   e m b e dd i ng s   o v e r   t h e   L S T M   f o r   w o r d   m a pp i ng ,   a nd  i t   ga t h e r s   a   s i g nif i c a n t   a m o un t   o f   s y n t a c t i c   a n d  s e m a n t i c   da t a .   C o n s e que n t l y ,   t h e   m o de l   by   K a n d h r o   e t  al .  [ 15 ]   c a n   po t e n t i a ll y   o ve r c o m e   s o m e   dr a w b a c k s   o f   t r a di t i o na l   m e t h o ds ,   i nc l ud i ng  t h e   l o s s   o f   o r de r   a n d  wor d  i nf o r m a t i o n   i n   b a g - of - wo r ds ,   n - gr a m ,   n a i v e   B a y e s ,   a n d  S VM   m o de l s .     T h e   e x p e r i m e n t a l   f i nd i ng s   a r e   s h o wn   o n   a   da tas e t   o f   “ s t ude n t   c o m m e n t s ” .   W h e r e   t h e   m o de l   a c hi e ve d  s t a t e - of - t h e - a r t  A c c ur a c y .   O n e   o f   t h e   s t u d i e s   f o c us e d  o n   t h e   a n a l y s i s   o f   t we e t s   s e n t   o u t  du r i n g  t h e   P hil i pp i ne   pr e s i de n t i a l   e l e c t i o n   [ 16] .   T h e i r   i n - de pt h   a n a l y s i s   v a li da t e d  t h e s e   vi e w s ,   wi t h   a n   o v e r wh e lm i ng   83. 90%   o f   t we e t s   e x pr e s s i ng  ne ga t i vi t y ,   r e ga r d l e s s   o f   o n e ' s   s t a n c e   o n   a ny   g i ve n   po l i t i c i a n .   A   s m a ll   13. 49 %   a n d  a n   e v e n   s m a ll e r   2. 60%   o f   t we e t s   c o n v e y e d  pos i t i v e   o r   n e ut r a l   s e n t i m e n t s ,   r e s pe c t i v e ly .   C o m put e r   m o de l s   a de pt   i n   t h e   n ua nc e s   o f   h u m a n   l a n gua ge   we r e   e m p l o y e d  t o  a c qu i r e ,   or ga ni z e ,   a n d  pr e pr o c e s s   t hi s   da t a .   Us i n g   30%   unl a b e l e d  e x a m p l e s ,   a   na i ve   B a y e s   c l a s s if i e r   r e l yi ng  o n   wo r d  pr o b a bil i t i e s   s e r v e d  a s   t h e   pr e li mi na r y   c a t e g o r i z a t i o n   m e t h o d  a n d  wa s   o p t i mi z e d  t h r o u gh   t e s t i n g  a l t e r n a t i v e   c o nf i gur a t i o n s .   I t s   b e s t - pe r f o r m i ng   s e tt i n g s   we r e   t h e n   ut i li z e d  a s   pa r a m e t e r s   f o r   a   s e l f - t r a i ni ng  m o de l   a pp l yi ng  s e mi - s upe r vi s e d  l e a r ni ng,   a c hi e vi ng  a n   A c c ur a cy   r a t e   o f   84. 83%   i n   c l a s s i f yi ng  t we e t s   by   t h e i r   s e n t i m e n t .   An   e n s e m b l e   c l a s s if i c a t i o n  t e c h ni que   c o m bi ne d  w i t h   s e mi - s upe r vi s e d  l e a r nin g  f o r   s e n t i m e n t   c l a s s if i c a t i o n ,   u t i li z i ng  US  Ai r li ne s   a n d   i n t e r n e t   m o vi e   da t a b a s e   ( I M DB )   da t a   to  pr o duc e   a n   a nn o t a t e d   s e n t i m e n t   c o r pus   [ 17] .   T e r m   f r e que n c y – i nve r s e   do c u m e n t   f r e que n c y   ( TF - I DF )   m e t h o ds   w e r e   us e d  to   m o de l   t h e   c l a s s i f i e r   a s   a   v e c t o r .   T h e   r e s u l t s   o f   t h e   i nv e s t i ga t i o n   pr o vi de   s e v e r a l   c o n c l u s i o n s .   A s   a   r e s u l t ,   i n   s e m i - s up e r vi s e d  l e a r ni ng   ( SSL ) ,   t h e   A c c ur a c y   o f   t h e   c l a s s if i c a t i o n   i s   gr e a t l y   i nf l ue nc e d  by   h o w  we ll - s u i t e d  t h e   da t a s e t   i s   f o r   t h e   m a c hi ne   l e a r ni ng  a l go r i t h m   b e i ng  us e d.     S VM   o u t pe r f o r m s   t h e   b a s e li ne   i n   t h e   I M DB   a n d  US  Ai r li ne   da t a s e t s   wh e n   i t   c o m e s   to   i m pr o vi ng   m o de l   pe r f o r m a n c e .   W hil e   R F   do e s   a   b e t t e r   j o b   o f   c r e a t i n g  a   b a s e li ne   i n  t h e   a i r li ne   da t a s e t ,   i t   i s   n o t   a s   s uc c e s s f u l   a t   s us t a i ni ng  m o de l   pe r f o r m a n c e   f o r   th e   I M DB   d a t a s e t.   An   e x a mi na t i o n   o f   t h e   f e a t ur e s   o f   t h e   da t a s e t  a n d  t h e   l a b e li ng  t e c h ni que   i n   t h e   s e n t i m e n t   a n a ly s i s   l i t e r a t ur e   wa s   c o n duc t e d  by   S h a n   L e e   e t  al .  [ 18] .  T h e i r   s t u d y   a i m e d  to   t a c kl e   t h e   i mm e ns e   l a b o r   a n d  t i m e   r e qu i r e d  to  a nn o t a t e   a   c or pus .   S e m i - s u pe r vi s e d   l e a r ni ng  wa s   pr o po s e d,   whi c h   e x p l o i t s   t h e   s t r e n gt h s   o f   unl a be l e d  da t a   to   di mi n i s h   t h e   e f f o r t   a n d  t i m e   i nv o l ve d  i n   a nn ot a t i n g  a   c o l l e c t i o n .   T h e y   a l s o   e x a mi ne d  t h e   p o s s i bl e   a d v a n t a ge s   o f   s e m i - s up e r vi s e d   l e a r ni ng   f o r   c l a s s if i c a t i o n .   T hi s   d i s c o v e r y   s h o we d  t h a t  unl a be l e d  i nf o r m a t i o n   f a c il i t a t e s   m o de l   pr e pa r a t i o n   w i t h o ut  i n duc i ng   de t r i m e n t a l   c o n s e que n c e s   o n   t h e   m o de l ' s   pe r f o r m a n c e .   C o m p l e x   s e n t e n c e s   i n t e r m i ng l e d  w i t h   m o r e   s t r a i g h t f o r wa r d  c o n s t r uc t i o n s   t o  ge n e r a t e   a   t e x t   w i t h   va r i a bil i t y   i n   pe r p l e xi t y   a n d  b ur s t i n e s s   [ 19] .   S e m i - s upe r vi s e d  f e a t ur e   we i g h t i n g  a n d  e x t r a c t i o n   a r e   t a ke n   i n t o   a c c o un t   f o r   b ot h   t h e   l a b e l   i nf o r m a t i o n  a n d  t h e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i     I S S N:   2502 - 4752       Optimiz ing  me ntal   he alt h  tex t   c las s if ication  us ing   ge ne ti c   algor it hms   and  me ta - lear ning   ( A lok  K umar   J e na )   453   s t r uc t ur e   i nf o r m a t i o n   o f   t h e   da t a .   T h e   b e n e f i t s   o f   f e a t ur e   we i g h t i n g  a n d  f e a t ur e   e x t r a c t i o n   we r e   i ll us t r a t e d   t h r o ug h   e x t e n s i ve   t e s t i n g  o n   t h e   s i x   be n c hm a r k  da t a s e t s .   On e   o f   t h e   a ppr o a c h e s   pr o po s e d  i s   to   s e r v e   a s   a   h e l p f u l   m a n u a l   f o r   e x pe r t   s y s t e m s   [ 20] .   W hil e   g e n e r a t i v e   m o de l s   pr o vi de   a   us e f u l   pa r a d i g m   f o r   a pp l yi ng   s e m i - s upe r vi s e d  l e a r ni n g  t e c hni qu e s   t o  t e x t ua l   da t a ,   a l l o w i n g  i n f e r e n c e   o f   pr o b a bil i t y   d i s t r i b ut i o n s   t o   i nf o r m   r e l a t e d  m o de l s ,   t h e   v a r i a bl e   de pe n de n c e   c a pt ur e d  i n   f r a m e wo r ks   s uc h   a s   t h e   ge ne r a t i v e   e m o t i o n   m o de l   w i t h  c a t e g o r i z e d  wo r ds   ( GE M - CW )   il l u s t r a t e s   a n   o pp o r t uni t y   f o r   e x pe r t   s y s t e m s   t o  s y n t h e s i z e   d i s pa r a t e   s our c e s   o f   pe r t i n e n t   i nf o r m a t i o n .   No t  o nl y   d o   t h e s e   pr o b a bil i s t i c   t e x t   ge n e r a t or s   c a l i b r a t e   d i s t r i b ut i o n s   t o  a s s im i l a t e   unl a b e l e d  e xa m p l e s ,   b ut   t h e i r   e x t r a c t e d  r e pr e s e n t a t i o n s   s h o wc a s e   h o w  c o m p l e x   r e l a t i o ns hi p s   b e t we e n   a tt r i b ut e s   c a n   a m a l ga m a t e   di ve r ge n t   de t a i l s   i n t o   a   c o h e s i ve   w h o l e .   An a ly s i s   o f   s t ude n t   f e e d b a c k  by   K u m a r   a n d   J a i n   s t udy   [ 21] ,   e m p h a s i z e s   t h e   e v a l ua t i o n   o f   c r i t i c a l  c o m po n e n t s   to  m o ni t o r   a n d  m a i n t a i n   t h e   a c a de mi c   qua l i t y   o f   t h e   s y s t e m .   He r e ,   t h e y   pr o p o s e d   a n   a uto n o m o us   e v a l ua t i o n   s y s t e m   b a s e d  o n   s e n t i m e n t   a n a ly s i s   t h a t   i s   m o r e   s e n s i t i ve   a n d  f l e xi b l e   t h a n   t h e   e xi s t i n g   m e t h o do l o g y .   H i s   s y s t e m   c o l l e c t s   us e r   f e e d b a c k  i n   a   t e x t   f o r m a t   a n d  us e s   s upe r vi s e d  a n d  s e mi - s u pe r vi s e d   m a c hi ne - l e a r ni ng  t e c h ni que s   f o r   s e n t i m e n t   a n a l ys i s   to  f i nd  i m po r t a n t   pa r t s   a n d  o r i e n t a t i o n s .   One   o f   t h e   s t udi e s   by   Gupt a   e t  al .  [ 22 ]   a i m s   t o   i m pr o v e   pe r f o r m a nc e   o n   l o w - r e s o ur c e   s e n t i m e n t   c a t e g o r i z a t i o n   t a s ks ,   t h e y   l o o k  i n t o   t r a n s f e r   l e a r ni ng  a n d  s e mi - s upe r vi s e d  t e c h ni que s .   T h e y   i ni t i a ll y   b u il t   de n s e   r e pr e s e n tat i o n s   f o r   ph r a s e s ,   us i n g  a   do c 2v e c   m o de l ,   a n d  t h e n   e x p e r i m e n t e d  wi t h   m a ni f o l d  r e gu l a r i s a t i o n   a n d  pr e - tr a i ni n g   t e c h ni que s .   T h e y   o b s e r v e d  ga i ns   us i ng  t h e   pr o p o s e d  m e t h o do l o g i e s   o n   t w o  c r o s s - c or pus   s c e n a r io s   a n d  a   s i n g l e   c o r pus   s c e n a r i o .   E v e n   w i t h   l im i t e d  t r a i ni ng  da t a ,   t h e   a dv a n t a ge s   o v e r   a   s o l e ly   s upe r vi s e d  t e c hni que   a r e   s i g nif i c a n t .   I n   a   s t ud y   by   Da n g i   e t  al .  [ 23] ,   t h e y   u s e d  t wo   da t a   s e t s   to   p r e d i c t   t h e   v a l ue s   o f   P r e c i s i o n ,   R e c a ll ,   a n d   F1 - s c o r e ,   us i n g  v a r i o us   m a c hi ne   l e a r ni ng  c l a s s if i e r s ,   i n c l ud i ng  r a n do m   f o r e s t ,   m u l t i n o m i a l   n a ï ve   B a y e s ,   l o g i s t i c   r e gr e s s i o n ,   S VM s ,   a n d  de c i s i o n   t r e e s .   T h e   s ugge s t e d  m e t h o d  us e d  a   v a r i e t y   o f   c r i t e r i a   to  f o r e c a s t   t h e   s e n t i m e n t s   o f   T w i t t e r ' s   s o c i a l   m e d i a   da t a .   U t i li z e   b o t h   t h e   wor d  c o un t   v e c to r   a n d  t h e   T F .   A   n e w,   s t r a i g h t f o r wa r d,   a n d  v e r y   s uc c e s s f u l   f e a t ur e   s e l e c t i o n   t e c hni que   b a s e d  o n   w i de ly   d i s pe r s e d  c l a s s - s pe c i f i c   t r a i t s   [ 24]   h a s   b e e n   s ugge s t e d  by   K u m a r   a n d   Ha r i s h .   He r e ,   pe r pl e xi t y   i s   i n d e e d  a   c r uc i a l   f a c t or   wh e n   c r a f t i n g   h u m a n - li ke   t e x t ua l   c o n t e n t ;   t h e   pr i m a r y   a im   i n   r e w r i t i n g  t h e   pr o vi d e d  t e x t   i s   to   m a i n t a i n  i t s   c o r e   m e a ni ng  a n d   m e s s a ge   w hi l e   i nc r e a s i ng  i t s   c o m p l e xi t y   a n d  s e n t e n c e - l e v e l   va r i a t i o n .   T o  t h a t  e n d,   o n   t w o   pub l i c ly   a c c e s s i b l e   da t a s e t s ,   t h e   e x pe r i m e n t a l   o ut c o m e s   o f   t h e   pr o po s e d  f e a t ur e   s e l e c t i o n   a ppr o a c h   we r e   p i t t e d  a ga i n s t   c hi - s qua r e ,   e n t r o py ,   i nf o r m a t i o n   ga i n ,   a n d  m ut ua l   i nf o r m a t i o n - b a s e d  f e a t ur e   s e l e c t i o n   us i ng  S VM s ,   k - n e a r e s t   n e i g hb o r s ,   a n d  r a n do m   f o r e s t  c l a s s if i e r s .   T h e   r e s u l t s   de m o n s t r a t e   t h a t  wi t h   r e s pe c t   to  c l a s s if i c a t i o n   Ac c ur a c y ,  t h e   s ugge s t e d  f e a t ur e   s e l e c t i o n   m e t h o d  pe r f o r m e d  m o r e   s upe r bl y   t h a n   ot h e r   a n a ly z e d  f e a t ur e   s e l e c t i o n  t e c h ni que s .   A   n o v e l   m e t h o d  f o r   c l a s s if y i ng  l e f t -   a n d  r i g h t - h a n d  m o v e m e n t   i m a ge s ,   t h a t   a r e   b a s e d  o n   S to c kwe l l   t i m e – f r e que n c y   m a p s   ( TF Ms )   o f   e l e c t r o e n c e pha l o gr a m   ( EEG )   s i g n a l s   wa s   s ugge s t e d  by   S a l im po ur   e t   al .  [ 25] .   T h e   g o a l   i s   to  i m pr o v e   c l a s s i f i c a t i o n   Ac c ur a c y   w hil e   m i n im i z i ng  de e p  c h a r a c t e r i s t i c s .   S i n c e   t h e   S to c kwe l l   t r a ns f o r m   o f f e r s   s upe r i o r   r e s o l ut i o n   to   ot h e r   m e t h o ds   l i ke   wa ve l e t   tr a n s f o r m   a n d  s h o r t - t i m e   f o ur i e r   tr a n s f o r m   ( S T F T ) ,   i t   wa s   u t i li z e d  i n   thi s   r e s e a r c h   to  de c o n s t r uc t  t h e   t i m e - f r e qu e n c y   da t a   o f   E E G   s i g na l s .   B e f o r e   e x t r a c t i n g  de e p  f e a t ur e s ,   t h e y   c o ns i d e r e d  a n   e a r l y   d a t a   f us i o n   s t r a t e g y   a n d  i n c o r po r a t e d  t h e   S to c kwe l l   t r a n s f o r m s   o f   n u m e r o us   c h a nne l s .   I n   c on t r a s t  to  pa s t  i nv e s t i ga t i o ns ,   whi c h   pr i m a r il y   c e n t e r e d  o n   a  s i n g l e   d i s t i nc t   s tr a t e g y   f o r   t h e   c a t e go r i z a t i o n   s t a ge ,   t hi s   s t ud y   i ns pe c t e d  ot h e r   m a c hi ne   l e a r ni ng  t e c hni que s   a s   we l l   a s   h o w  t h e y   c a n   c o m p l e m e n t   e a c h   ot h e r 's   li mi t a t i o ns .   A dd i t i o n a ll y ,   t h e   s c i e n t i s t s   t e s t e d  i nn o v a t i v e   a ppr o a c h e s   t o  da t a   pr e pr o c e s s i n g  a n d   f e a t ur e   e x t r a c t i o n   us i ng  a d v a nc e d  s i g n a l   pr o c e s s i ng  a l go r i t hm s ,   a i mi ng   to   b oo s t   t h e   pe r f o r m a n c e   o f   m a c hi ne   l e a r ni n g  m o de l s   f o r   E E G - b a s e d  c o gni t i ve   s t a t e   r e c o gni t i o n .   T h e   li t e r a t ur e   s ur v e y   hi g hli g h t s   e xi s t i n g  a ppr o a c h e s   i n   s e n t i m e n t   a n a ly s i s ,   e m p h a s i z i ng  t h e   s t r e n g t h s   a n d   li mi t a t i o ns   o f   de e p  l e a r ni n g  a n d  o pt i m i z a t i o n   t e c hni que s .   T hi s   r e vi e w  u n de r s c o r e s   t h e   n e e d  f o r   a   hy b r i d   m o de l   i n t e gr a t i n g  un c e r t a i n t y   h a n d li ng,   f e a t ur e   s e l e c t i o n ,   a n d  o p t i mi z a t i o n   to  e nh a n c e   c l a s s i f i c a t i o n   a c c ur a c y .       3.   M E T HO D   He r e   we   de s c r i be   t h e   pr o c e dur e   to  a c hi e v e   a n   e f f i c i e n t   a n d  e f f e c t i v e   m e n t a l   h e a l t h - r e l a t e d   t e x t  c l a s s if i c a t i o n   us i ng  B E R T   +   F ew - s h o t   l e a r ni ng   +   GA .   T h e   a ppr o a c h   c o ns i s t s   o f   3  m a i n  pa r t s :   (i )  ge t t i n g   a n d  pr e pa r i n g  da t a ,   ( i i )  de s i g ni ng   a n d  tr a i ni ng  t h e   m o de l ,   ( i ii )   Opt i m i z a t i o n   w i t h   GA   a n d  f e w - s h o t  l e a r ni ng .   T h e   pr e - pr o c e s s o r   i s   t a i l o r e d   t o  b e   e f f e c t i ve   i n   a   l o w - l a b e l e d  da t a   pa r a d i g m   w hil e   o p t i mi z i ng  f o r   c l a s s if i c a t i o n   A c c ur a c y   a n d  ge n e r a li z a bil i t y   a c r o s s   o b s e r v e d  m e n t a l   he a l t h   d i m e ns i o ns .   T hi s   W o r kf l o w  i n  F i gur e   1 ,   s t a r t s   w i t h   t h e   pr e - pr oc e s s i ng,   w h e r e   t h e   da t a s e t   o f   m e n t a l   h e a l t h   t e x t   i s   c l e a ne d  by   r e m o vi ng   s pe c i a l   c h a r a c t e r s ,   s to p   wo r ds ,   a n d  do i n g  t o ke ni z a t i o n   us i ng  B E R T   to ke n i z e r .   T o   m a n a ge   c l a s s   i m ba l a nc e ,   us e   we i g h t e d  l o s s   ( C l a s s - b a l a n c e d  l o s s ) ,   s o   t h a t  t h e   m o de l   pr i o r i t i z e s   mi n o r i t y   c l a s s e s .   I n   t h e   f e w - s h o t  l e a r ni ng   t a s k  c r e a t i o n   s t e p,   t h e   da t a s e t  i s   d i vi de d  i n t o   N - wa y ,   K - s h ot   t a s ks ,   s e l e c t i n g   N  c l a s s e s   r a n do m ly   p e r   c y c l e ,   w i t h   K   e x a m p l e s   p e r   c l a s s   f o r m i ng  t h e   s uppo r t  s e t,   whi l e   a dd i t i o na l   e x a m p l e s   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2502 - 4752   I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i ,  Vo l .   4 4 ,   N o .   2 ,   N o v e m b e r   20 2 6 :   450 - 468   454   m a ke   up  t h e   que r y   s e t   f o r   e v a l ua t i o n .   Dur i n g  m e t a - l e a r ni ng  w i t h   m o de l - a g n o s t i c   m e t a - l e a r ni ng  ( M A M L ) ,  B E R T   i s   f i ne - t un e d  by   f i r s t   upda t i n g  pa r a m e t e r s   o n   t h e   s uppo r t   s e t ,   t e s t i n g  o n   t h e   que r y   s e t ,   a n d  a pp l yi ng   m e t a - upda t e s   to   i m pr o v e   i t s   a da pt a bil i t y   t o   n e w  c l a s s e s .   T h e n ,   G A   o p t i mi z a t i o n   i s   u s e d  t o   s e a r c h   f o r   t h e   b e s t  hy pe r pa r a m e t e r s   by   pe r f o r m i ng  S e l e c t i o n ,   C r o s s ov e r ,   a n d  M ut a t i o n   o n   d i f f e r e n t   c o nf i gur a t i o ns ,   e va l ua t i n g   t h e i r   pe r f o r m a n c e   b a s e d  o n   v a li da t i o n   A c c ur a c y .   F i na ll y ,   t h e   o p t i mi z e d  M A M L - B E R T   m o de l   i s   t r a i ne d  a n d  e v a l ua t e d  o n   un s e e n   m e n t a l   h e a l t h   t e x t   c a t e g o r i e s ,   wi t h   pe r f o r m a n c e   a s s e s s e d  us i ng  A c c ur a c y ,   P r e c i s i o n ,   R e c a ll ,   F 1 - s c o r e ,   a n d  a r e a   un de r   t h e   r e c e i v e r   o pe r a t i n g  c ha r a c t e r i s t i c   c ur v e   ( A UC - R OC ) .             F i gur e   1.   W o r kf l o w  d i a gr a m       3. 1.     Dat a   c ol l e c t ion   an d   d at as e t   s e l e c t ion   T h e   da t a s e t   wa s   o b t a i n e d  f r o m   pu bli c ly   a v a il a bl e   m e n t a l   h e a l t h   f o r u m s ,   i . e . ,   “ R e dd i t   M e n t a l   He a l t h  Da t a   o n   K a gg l e ”   [ 26] ,   wh e r e   i n d i v i dua l s   e x pr e s s   m e n t a l   h e a l t h   c o n c e r ns .   T h e s e   f o r um s   pr o vi de   r i c h   a n d  d i v e r s e   u s e r - ge ne r a t e d  c o n t e n t   t h a t   r e f l e c t s   v a r i o u s   m e n t a l   h e a l t h   i s s ue s .   T h e   da t a   wa s   ga t h e r e d  by   s c r a p i n g   m e n t a l   he a l t h - r e l a t e d  f o r u m s ,   f o c us i n g  o n   to p i c s   r e l e v a n t   to  t h e   f i ve   c l a s s e s :  Anxi e t y ,   De pr e s s i o n ,   S u i c i de W a t c h ,   L o ne l y ,   a n d  M e n t a l He a l t h .   E a c h   p o s t   wa s   m a n ua ll y   a nn o t a t e d  wi t h   o n e   o f   t h e s e   f i v e   l a b e l s ,   e ns ur i n g  c o n s i s t e n c y   a c r o s s   t h e   da t a s e t ,   a s   s h o wn   i n   T a bl e   1.       T a bl e   1.   S a m p l e   d a t a s e t   P o s t  I D   T e x t  c o nt e nt   C a te gor y   1   " I ' m  f e e li ng r e a ll y  d o w n t o da y , n o th in g s e e ms  t o  h e lp . "   D e pr e s s io n   2   "I ' m s c a r e d I   mi ght  hur t  m y s e l f  i f  I   c a n' t  ge t  s o m e  h e lp . "   S ui c id e W a tc h   3   " I   f e e l  s o  i s o la t e d ;   n o b o d y  unde r s ta nds  m y  s it ua ti o n. "   L o n e l y   4   " I  c a n' t  s e e m t o  s ha ke  t hi s  c o ns ta nt  w o r r y ;   it ' s   ov e r w he l mi ng. "   A nx i e t y   5   " I ’ m s ta r ti ng t h e r a p y  s oo n, h o pi ng i t  w il l  h e lp  w it h m y  m e nt a l  he a lt h. "   M e nt a lHe a lt h       3. 2.     Dat a   p r e - p r oc e s s in g   P r e pr o c e s s i n g  i s   a   c r uc i a l   s t e p  i n   m e n t a l   he a l t h  t e x t   c l a s s if i c a t i o n ,   e ns ur i n g  t h a t   t h e   da t a s e t   i s   c l e a ne d,   s tr uc t ur e d,   a n d  b a l a n c e d  b e f o r e   t r a i ni ng .   T h e   pr o c e s s   b e g i ns   w i t h   l o a d i n g  t h e   m e n t a l   h e a l t h   t e x t  da t a s e t,   f o l l o w e d  by   t e x t   c l e a ni ng,   whi c h   i nc l ude s   r e m o vi ng  s pe c i a l   c h a r a c t e r s ,   s to pw o r ds ,   a n d  pe r f o r m i ng   to ke ni z a t i o n   to   s t a n da r d i z e   t h e   i n put   da t a .   Ne x t,   t h e   c l e a ne d  t e x t  i s   c o n v e r t e d  i n t o   e m b e dd i ngs   us i n g  t h e   B E R T   to ke ni z e r ,   a l l o w i ng   t h e   m o de l   to  l e a r n   c o n t e x t ua l   r e pr e s e n t a t i o n s   e f f e c t i v e ly .   S i n c e   c l a s s   i m b a l a n c e   i s   a   c o m m o n   i s s ue   i n   m e n t a l   h e a l t h   c l a s s if i c a t i o n   t a s ks ,   we   h a n d l e   i t   us i n g  a   we i g h t e d  l o s s   f u n c t i o n .  S pe c i f i c a ll y ,   we   e m p l o y   c l a s s - b a l a nc e d  l o s s ,   whe r e   t h e   we i g h t   a s s i g n e d  t o  e a c h   c l a s s   wc   i s   de t e r m i n e d.   T hi s   e ns ur e s   t h a t  m i n o r i t y   c l a s s e s   c o n t r i b ut e   m o r e   to  t h e   o v e r a l l   l o s s   f u n c t i o n ,   pr e v e n t i n g  B E R T   f r o m   b e i ng   bi a s e d  to wa r d  m a j o r i t y   c l a s s e s .   Unli ke   s t a n d a r d  c r o s s - e n t r o py   l o s s ,   t hi s   m e t h o d  dy na m i c a ll y   a d j u s t s   c l a s s   we i g h t s ,   i m pr o vi n g  c l a s s if i c a t i o n   pe r f o r m a n c e   w i t h o ut   e x c e s s i ve   r e li a n c e   o n   s y n t h e t i c   da t a .   T h e   pr e - pr o c e s s i n g  s t e ps   a r e   s u m m a r i s e d  i n   T a bl e   2.       T a bl e   2.   P r e - p r o c e s s i n g  s u mm a r y   P r e - pr oc e s s in g s te ps   A c ti o n t a ke n   T o k e ni z a ti o n   S pl it ti ng t e x t  in t o  s ubw or ds  a nd w o r ds   N o r ma li z a ti o n   C o n v e r t e d t e xt  t o  l o w e r c a s e  a nd r e m ov e d s p e c ia l  c ha r a c t e r s   P a ddi ng a nd t r unc a ti o n   S ta nda r di z e d t e x t  l e ngt h ( ma x  512 t o k e ns )   L a b e l  e n c o di ng   L a b e ls  a s s ig ne d:  A nx i e t y = 0, D e pr e s s io n= 1, e t c .     Evaluation Warning : The document was created with Spire.PDF for Python.
I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i     I S S N:   2502 - 4752       Optimiz ing  me ntal   he alt h  tex t   c las s if ication  us ing   ge ne ti c   algor it hms   and  me ta - lear ning   ( A lok  K umar   J e na )   455   3. 2. 1.   Re s e ar c h   g ap   De s p i t e   s i g nif i c a n t   a dv a n c e m e n t s   i n   m e n t a l   he a l t h   t e x t   c l a s s i f i c a t i o n   us i ng  de e p  l e a r ni ng  m o de l s   li ke   B E R T ,   s e v e r a l   c h a ll e n ge s   r e m a i n   u na ddr e s s e d .   T r a di t i o n a l   c l a s s i f i c a t i o n   m o de l s   o f t e n   s t r uggl e   w i t h   c l a s s   im ba l a n c e ,   wh e r e   c e r t a i n   m e n t a l   h e a l t h   c o n d i t i o n s ,   s uc h   a s   S ui c i de W a t c h   o r   A nxi e t y ,   a r e   s e v e r e ly   un de r r e pr e s e n t e d  i n   da t a s e t s .   C ur r e n t   m e t h o ds   o f ten   de p e n d  o n   o v e r s a m p li ng  m e t h o ds   s uc h   a s   t h e   s y n t he t i c   mi n o r i t y   o v e r - s a m p l i ng  t e c hni que   ( S M OT E ) ,   whi c h   c a n   c r e a t e   s e m a n t i c   d i s to r t i o n s   w h e n   a pp li e d   to   t e x t   da t a ,   r e s ul t i n g  i n   u n r e l i a bl e   s y n t h e t i c   s a m p l e s .   M o r e o v e r ,   whi l e   m e t a - l e a r ni ng  t e c h ni que s   l i ke   M AM L   ha v e   b e e n   e x p l o r e d  f o r   f e w - s h o t  l e a r ni ng ,   t h e i r   e f f e c t i v e ne s s   i n   a da pt i n g  B E R T - b a s e d  m o de l s   to  hi g hly   im ba l a n c e d  da t a s e t s   r e m a i ns   u n de r e x p l o r e d.   A d d i t i o n a ll y ,   hy pe r pa r a m e t e r   t uni n g  p l a y s   a   c r i t i c a l   r o l e   i n  o p t i mi z i ng  pe r f o r m a n c e ,   y e t   c o n v e n t i o n a l   gr i d  s e a r c h   o r   r a n do m   s e a r c h   m e t h o ds   o f t e n   f a i l   t o   e f f i c i e n t l y   e x p l o r e   t h e   s e a r c h   s pa c e .   He nc e ,   GA s   we r e   s ugge s t e d  f o r   hy pe r pa r a m e t e r   o p t i mi z a t i o n .   T hi s   wo r k   f il l s   t h e s e   ga ps   by   us i ng  M AM L - B E R T   c o upl e d  w i t h   c l a s s - b a l a n c e d  l o s s   to   i m pr o v e   c l a s s   we i g h t i n g,   t h us   r e n de r i ng   s y n t he t i c   da t a   a ugm e n t a t i o n   unne c e s s a r y ,   a n d   a pp l y i ng  G A   f o r   hy pe r pa r a m e t e r   t un i n g  t o  i m pr o v e   a da pt a bi li t y   a n d  c l a s s if i c a t i o n   A c c ur a c y   i n  l o w - da t a ,   hi g hl y   im ba l a nc e d  m e n t a l   h e a l t h   t e x t   c l a s s if i c a t i o n   t a s ks .     3. 2. 2.   Re s e ar c h   c on t r ib u t ion s   T hi s   a n a ly s i s   pr o vi de s   a   c o m pr e he n s i ve   t e c hni qu e   f o r   m u l t i - c l a s s   c l a s s if i c a t i o n   o f   m e n t a l   h e a l t h - r e l a t e d   t e x t ua l   da t a   by   m a k i ng  us e   o f   a   f i ne - t un e d   B E R T   m o de l   de a li ng  w i t h   5  d i v e r s e   c a t e gor i e s   o f   Anxi e t y ,   De pr e s s i o n ,   S ui c i d e W a t c h ,   L o n e l y ,   a n d  M e n t a l H e a l t h .   T h e   s t udy   e m p ha s i z e s   t h a t  t h e   us e   o f   t r a n s f o r m e r - b a s e d  a r c hi t e c t ur e s   i s   a bl e   t o   a c c ur a t e l y   gr a s p  a n d  c a t e go r i z e   c o m p l e x   e m o t i o n a l   l a n gua g e ,   e nh a n c i ng   s e n t i m e n t   a n a ly s i s   a n d  i ns i g h t   i n t o  us e r - ge n e r a t e d   t e x t   f r o m   o nli ne   p l a t f o r m s .   I t   e n h a n c e s   t h e   un de r s t a n d i ng   o f   i n d i v i dua l s ,   e i t h e r   r e ga r d i n g  t h e i r   ps y c h o l o g i c a l   c h a r a c t e r i s t i c s   o r   i n   t e r m s   o f   t h e i r   l a n gua g e   us a ge ,   b y  e x t r a c t i n g  a n d  a n a ly s i ng  e m o t i o n a l   c o n t e x t .   T hi s   i s   i n   c o n t r a s t  to   c l a s s i c a l   a ppr o a c h e s   w h e r e   s y n t he t i c   o v e r s a m p l i ng  m e t h o ds   s uc h   a s   S M OT E   a r e   us e d,   whi c h   a r e   un a bl e   to  ge n e r a l i s e   t h e   l a r ge   t e x t  da t a s e t  wi t h   i m ba l a nc e d   c l a s s e s ;   h e r e   we   h a v e   a ddr e s s e d  t h e s e   c l a s s   i m ba l a nc e   i s s ue s   us i n g  a  c l a s s - b a l a n c e d  l o s s ,   whi c h   a da pt s   c l a s s   we i g h t s   to   im pr o v e   m o de l   f a i r ne s s   a n d  A c c ur a c y .   M o r e o v e r ,   t h e   pa pe r   pr o p o s e s   t h e   us e   o f   GA s   f o r   hy p e r pa r a m e t e r   o p t i mi z a t i o n ,   whi c h   o p t i mi z e s   B E R T ' s   f e a t ur e   e x t r a c t i o n   a n d  f in e - t uni ng  pr o c e s s ,   e n h a n c i ng  i t s   a da pt a bi li t y   a n d  e n a bli ng   m o r e   a c c ur a t e   c l a s s if i c a t i o n   i n   f e w - s h o t   l e a r ni n g   s c e n a r i o s .   T h e   s t ud y   pr o vi d e d  a   unif i e d  a n d   f l e xi b l e   p i pe li ne   f o r   t h e   e n t i r e   s e que n c e   o f   t a s ks ,   i n c l ud in g  da t a   pr e pr o c e s s i n g,   to ke ni s a t i o n ,   m e t a - l e a r ni n g  us i n g   M A M L ,   a n d  f i ne - t uni ng  o f   B E R T   w i t h   r e s pe c t   to  t h o s e   t a s ks ,   pr o vi d i ng  a   s c a l a bl e   a n d  r e pr o duc i bl e   f r a m e wo r k  t h a t  c a n   b e   a pp l i e d  to  a ny   N L P   a pp l i c a t i o n s   s uc h   a s   s e n t i m e n t   a n a ly s i s ,   que s t i o n   a n s we r i n g,   a n d   n a m e d  e n t i t y   r e c o gni t i o n .   T h e   s t ud y   pr e s e n t s   M AM L - B E R T   by   c o m bi n i ng   f e w - s h o t  l e a r ni ng   w i t h   GA   o pt i mi z a t i o n ,   whi c h  pr o v e s   to   b e   a bl e   t o   a c c ur a t e l y   c l a s s i f y   m e n t a l   he a l t h - r e l a t e d  c l a s s if i c a t i o n s ,   i ll u s t r a t i n g  t h e   im po r t a n c e   o f   a dv a nc e d  NL P   t e c hn o l o g y   i n  m e n t a l   il l ne s s   m o ni t o r i n g.   W i t h   t h e   po t e n t i a l   t o   a n a l y z e   t hi s   da t a   i n   r e a l   t i m e ,  AI - dr i v e n   i n t e r v e n t i o n s   t h a t   de l i ve r   i n s i g h t s   a n d   gui da n c e   i n   a   t i m e ly   m a nne r   a r e   j us t   t h e   s t a r t ,   a s   t hi s   r e s e a r c h   e d i t s   a n d  i m pr o v e s   d i g i t a l   m e n t a l   h e a l t h  s uppor t   s y s t e m s .   T h e s e   c o n t r i b ut i o ns   to ge t h e r   m o v e   t h e   f i e l d  f o r wa r d  by   m a k i ng  a   c o n t r i b ut i o n   to   de e p  l e a r ni ng  a n d  NL P   a pp l i c a t i o n s   i n   m e n t a l   h e a l t h   r e s e a r c h   by   a ddr e s s i ng  ke y   ga p s   i n   t h e   a r e a ,   s uc h   a s   s e n t i m e n t   a n a ly s i s ,   c l a s s   im ba l a n c e ,   a n d  l o w - da t a   l e a r ni ng  s c e n a r i o s .       4.   M ODE L   AR CHI T E CT UR E   DE S I GN   B E R T   a r c hi t e c t ur e   i s   a   s t a t e - of - t h e - a r t  t r a n s f o r m e r   m o de l   f r o m   Goo gl e   f o r   n a t ur a l   l a n gua g e   un de r s t a n d i ng  t a s ks .   T h e   m o de l   a r c hi t e c t ur e   us e s   th e   s e lf - a t t e n t i o n   m e c h a ni s m   o f   t h e   tr a n s f o r m e r ,   e na bli ng  i t   to   pr o v i d e   t h e   m o de l   w i t h   t he   e n t i r e   c o n t e x t   f o r   a   wo r d  ( b ot h   l e f t   a n d  r i g h t   o f   i t )   i n   a   s e n t e n c e ,   a s   o ppo s e d  to   uni d i r e c t i o n a l   m o de l s   t h a t  o nl y   a ll o w   l o o ki n g   a t  th e   l e f t   o r   r i g h t   c o n t e x t .   T hi s   s t udy   e m p l o y s   t h e   pr e - tr a i ne d   B E R T   m o de l   a n d  t h e n   pe r f o r m s   f i ne - t uni n g  f o r   m e n t a l   he a l t h   c l a s s if i c a t i o n   t a s ks .   F i gur e   2  s h o ws   t h e   b r o a de r   a r c hi t e c t ur e   o f   a   f i ne - t un e d  B E R T   m o de l   t h a t ' s   us e d  f o r   c l a s s if i c a t i o n  t a s ks .   He r e   i s   a n   e x p l a n a t i o n   of   h o w  t h e   di f f e r e n t   l a y e r s   wo r k .   B E R T   h a s   c h a n ge d  t h e   ga m e   i n   N L P   w i t h   i t s   t w o  m a i n   f e a t ur e s :  bi d i r e c t i o n a l   c o n t e x t   a n d  t r a n s f e r   l e a r ni ng.   I t  to ke ni z e s   t h e   i n put   t e x t  vi a   W o r dP i e c e ,   c o r r e l a t i n g  e a c h   to ke n   to  a n   e m b e dd i ng  a ug m e n t e d  by   po s i t i o na l   e n c o d i n gs .   T h e   tr a n s f o r m e r   e nc o de r ,   whi c h   i s   t h e   f o un da t i o n   o f   B E R T ,   u t i li z e s   a   m u l t i - l a y e r   s e l f - a tt e n t i o n   m e c h a ni s m   t h a t   a l l o w s   i t   to  l e a r n   r e l a t i o n s hi p s   b e t we e n   to ke n s   bi d i r e c t i o n a ll y .   T h e   e x t r a c t e d   f e a t ur e s   a r e   t h e n   f e d  t h r o ugh   f u ll y   c o nn e c t e d  l a ye r s   w i t h  a c t i v a t i o n   f u n c t i o ns   s uc h   a s   r e c t i f i e d  l i ne a r   uni t   ( R e L U )   o r   Ga us s i a n   e r r o r   l i ne a r   uni t   ( GE L U ) .   L a s t l y ,   t h e   s o f t m a x   l a y e r   pr o vi de s   t h e   pr o b a bil i t i e s   f o r   m u l t i - c l a s s   c l a s s if i c a t i o n .   B E R T   h a s   t w o  s t a ge s :  t h e   p r e - tr a i ni ng   s t a ge   l e a r ns   ge n e r a l   l a n gu a ge   r e pr e s e n t a t i o n s ,   a n d  t h e   f i ne - t uni ng  s t a ge   m o d i f i e s   t h e   we i g h t s   o f   t h e   m o de l   t o   a pp l y   i t   to   pa r t i c u l a r   t a s ks ,   wh e r e   i t   e x c e l s   a t   t h e   l e v e l   o f   s e n t i m e n t   a n a ly s i s ,   que s t i o n   a n s we r i n g,   a n d  t e x t   c l a s s if i c a t i o n .   E v e n   s m a ll e r   t a s k - s pe c i f i c   da t a s e t s   a r e   s h o wn   t o   y i e l d  s t a t e - o f - t h e - a r t   r e s ul t s   wh e n   f in e - t un e d   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2502 - 4752   I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i ,  Vo l .   4 4 ,   N o .   2 ,   N o v e m b e r   20 2 6 :   450 - 468   456   o n   a   pr e t r a i n e d   m o de l   t r a i n e d  o n   s o m e   l a r ge   c o r po r a ,   s i n c e   i t s   c o n t e x t   r e pr e s e n t a t i o n s   c a n   l e a r n   a ny t hi ng   f r o m   wo r d  m e a ni ng s   to  l o n g e r   c o n t e x t  r e pr e s e n t a t i o n s .   F i gur e   3  s h o ws   h o w   da t a   pa s s e s   t h r o ugh   di f f e r e n t   ph a s e s   o f   t h e   m o de l ,   f r o m   t h e   i ni t i a l   l o a d i ng  a n d   pr e - pr o c e s s i n g  s t e ps ,   t h r o ugh   B E R T s   f e a t ur e   e x t r a c t i o n   a n d  f i ne - t uni n g  t h e n   o n   to  t h e   o u t pu t  c l a s s if i c a t i o n  s t e p.   GA   i s   us e d  h e r e   f o r   t h e   hy pe r pa r a m e t e r   o p t i mi z a t i o n .   I t   f o l l o w s   a   c o n v e n t i o n a l   B E R T - s t y l e   f in e - t uni ng  p i p e li ne .   W e   h a v e   us e d  B E R T   i n   t h e   f e a t ur e   e x t r a c t i o n   l a y e r   ( B E R T   e n c o de r ) ,   whi c h   c a pt ur e s   hi g h - l e v e l   o r   de e p  s e m a n t i c   f e a t ur e s   f r o m   t h e   t e x t .   T h e   f u ll y   c o nn e c t e d  l a y e r   i n  y o ur   m o de l   c o r r e s po n ds   to   t h e   de n s e   l a y e r   us e d  f o r   c l a s s i f i c a t i o n .   I t  i n c o r por a t e s   a   GA   f o r   f e a t ur e   o p t i mi z a t i o n   by   hy pe r pa r a m e t e r   t uni n g,   t hi s   s t e p  wi ll   f ur t h e r   r e f i ne   t h e   m o de l   t o  e n s ur e   i t   pe r f o r m s   o p t i m a ll y   f o r   t hi s   s p e c i f i c   c l a s s if i c a t i o n   t a s k.           F i gur e   2.   B E R T   m o de l   a r c hi t e c t ur e           F i gur e   3.   M o de l   a r c hi t e c t ur e       Da t a   l o a d i n g  a n d  p re - pr o c e s s i n g:  T hi s   s e c t i o n   o f   t h e   p i pe li ne   f o c us e s   o n   pr e pa r i n g  t h e   r a w  da t a   b e f o r e   f e e d i n g  i t   i n t o   t h e   m o de l .   P r o pe r   pr e - p r o c e s s i n g  i s   c r uc i a l   t o   e n s ur e   t h a t   t h e   da t a   i s   i n   a   f o r m a t   t h a t   c a n   b e   e f f e c t i ve l y   pr o c e s s e d  by   t h e   t r a n s f o r m e r   m o de l .   I n   da t a s e t  s e l e c t i o n ,   t h e   da t a s e t   i s   c h o s e n   b a s e d   o n   t h e   da t a   i nv o l v e d  w i t h   m e n t a l   a bil i t y .   T hi s   i nv o l ve s   t h e   a n a ly s i s   o f   m e n t a l   c o n d i t i o n s   f r o m   th e   s e n t i m e n t   o f   t hi s   t e x t   da t a .   T h e n   da t a s e t   n o r m a l i z a t i o n  t y p i c a ll y   i nv o l ve s   s t a n da r d i z i ng  o r   s c a l i ng  t h e   da t a   to  b r i n g  a l l   f e a t ur e s   to   t h e   s a m e   s c a l e .   F o r   tex t   da t a ,   Evaluation Warning : The document was created with Spire.PDF for Python.
I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i     I S S N:   2502 - 4752       Optimiz ing  me ntal   he alt h  tex t   c las s if ication  us ing   ge ne ti c   algor it hms   and  me ta - lear ning   ( A lok  K umar   J e na )   457   n o r m a li z a t i o n   m a y   i nc l ud e   s t e ps   l i ke   l o we r c a s in g  a l l   wo r ds   a n d  r e m o vi ng  pu n c t ua t i o n ,   n u m be r s ,   a n d   unn e c e s s a r y   c h a r a c t e r s .   I n   t e x t - b a s e d  t a s ks ,   t hi s   a l s o   i n c l ude s   r e m o vi ng  s to p   wor ds   or   a pp l y i ng  ot h e r   t e x t  n o r m a li z a t i o n   t e c h ni qu e s .   I n   t h e   da t a   pr e - pr o c e s s i n g  s t a ge ,   t h e   m o de l   pe r f o r m s   t wo  b a s i c   i m po r t a n t   t a s ks .   W h e r e   t h e   f i r s t   t a s k  i s   T o ke ni z a t i o n .   T o ke ni z a t i o n   i s   t h e   pr o c e s s   o f   s pli t t i n g  t h e   t e x t  i n t o  i n d i v i dua l   wo r ds   o r   s ub - wo r ds .   I n   t hi s   d i a gr a m ,   t hi s   i s   c a r r i e d  o ut  us i n g  a   c o un t   v e c to r   tokeni z e r ,   whi c h   s p li t s   t h e   t e x t   i n t o   w o r d   pi e c e s   o r   s ub - wo r d   uni t s .   T h e   s e c o n d  t a s k  i s   n - gr a m   s e l e c t i o n .   I t   i nvo l v e s   s e l e c t i n g  gr o ups   o f   n   wo r ds   ( or   to ke n s )   t h a t   a ppe a r   f r e qu e n t l y   i n  t h e   t e x t   to   c a pt u r e   l o c a l   de pe n de n c i e s   i n   t h e   t e x t .   F o r   e x a m p l e ,   " go o d  m o r ni n g"   c o ul d  be   t r e a t e d  a s   a   2 - gr a m .   N - gr a m s   he l p  t h e   m o de l   c a pt ur e   m o r e   c o n t e x t   i n   t h e   t e x t .   T o ge t h e r ,   t h e s e   pr e - pr o c e s s i n g  s t e ps   e ns ur e   t h a t  t h e   r a w  t e x t   i s   c l e a n e d,   to ke ni z e d,   a n d  r e a d y   f o r   us e   i n   t h e   m o de l   t r a i ni ng.   M o de l   tr a i n e d  a n d  f i ne - t un e d  ( B E R T   +   C l a s s if i e r   l a y e r ) :  Af t e r   pr e - pr o c e s s i n g,   t h e   da t a   i s   f e d  i n t o  t h e   m o de l   f o r   tr a i ni n g.   T hi s   p a r t   o f   t h e   d i a gr a m   il l u s t r a t e s   h o w  B E R T   i s   f i ne - t un e d  f o r   t h e   s pe c i f ic   c l a s s if i c a t i o n   t a s k.   S t e ps   i n   m o de l   t r a i ni ng  a n d  f i ne - t uni ng ,      I n put   l a y e r :  T h e   i nput   l a y e r   i s   w he r e   to ke ni z e d  t e x t   e n t e r s   t h e   m o de l .   B E R T   a c c e pt s   to ke ni z e d  i np ut   a s   i nd i c e s   o f   v o c a b u l a r y   t o ke n s   ( W o r dP i e c e ) .   T hi s   i n put   wi ll   l i k e l y   b e   i n   t he   f o r m   o f   to ke n   I Ds   t h a t  c o r r e s po n d  to  a   v o c a b u l a r y   l e a r n e d  dur i n g  pr e - t r a i n i ng.   T h e   to ke n   I Ds   a r e   c o n v e r t e d  i n t o  de n s e   v e c to r s   us i n g  a n   e m be dd i ng  l a y e r .   E a c h   t o ke n   i n   t h e   i nput   s e que n c e   i s   m a ppe d  t o   a   hi g h - d im e n s i o n a l   ve c to r ,   c a pt ur i n g  s e m a n t i c   r e l a t i o ns hi ps   b e t we e n   wo r ds .   T hi s   i s   t h e   f i r s t   s t e p   wh e r e   B E R T   pr o c e s s e s   t h e   i n pu t.     F e a t ur e   e x t r a c t i o n   l a y e r :  I n   B E R T ,   t h e   t r a n s f o r m e r   e n c o de r   pr o c e s s e s   t h e s e   t o ke n   e m b e dd i ngs ,   pr o du c i n g   c o n t e x t - a wa r e   r e pr e s e n t a t i o n s   o f   e a c h   to ke n   i n   t h e   s e que n c e .   T h e   f e a t ur e   e x t r a c t i o n   pr o c e s s   us e s   B E R T ’ s   m u l t i - l a y e r   a t t e n t i o n   m e c h a ni s m   t o   c a p t ur e   r e l a t i o n s hi p s   b e t we e n   t o ke n s   i n   a   s e que n c e ,   r e ga r d l e s s   o f   d i s t a nc e .   T hi s   r e s u l t s   i n   c o n t e x t ua l i z e d  e m b e dd i n gs   wh e r e   t h e   m e a ni ng  o f   a   w o r d   i s   de pe n de n t   on   t h e   s ur r o un d i n g  wo r ds .   Af t e r   t h a t ,   t h e   GA   p l a y s   a   vi t a l   r o l e .   T h e   G A s   a r e   b e i ng  us e d  f o r   f e a t ur e   s e l e c t i o n .  C h o o s i n g  whi c h   f e a t ur e s   or   e m b e dd i ng s   to   us e   b a s e d  o n   pe r f o r m a n c e   o pt i m i z a t i o n .   An d  a l s o   f o r   hy pe r pa r a m e t e r   t uni n g,   wh e r e   t h e   GA s   c a n   a l s o   b e   a ppl i e d  to  f i nd  o p t i m a l   hy p e r pa r a m e t e r s   ( e . g . ,   l e a r ni ng   r a t e ,   b a t c h   s i z e ) .   T h e n   o pt i mi z a t i o n   o f   t h e   e m be d d i n gs   i s   c a r r i e d   o u t .   I t   c o ul d  a l s o   m e a n   o pt i m i z i n g  t h e   e m b e dd i ng s   by   us i ng  G A s   t o  e v o l v e   b e t t e r   f e a t ur e   r e pr e s e n t a t i o ns .     F u ll y   c o nn e c t e d  l a y e r   ( De n s e   l a y e r ) :  Af t e r   e x t r a c t i n g  t h e   c o n t e x t ua l   e m be dd i ngs   f r o m   B E R T ,   t h e   n e x t   s t e p  i s   a   f u ll y   c o nn e c t e d  l a y e r .   I n   t h e   c o n t e x t  o f   B E R T   f o r   c l a s s if i c a t i o n ,   t hi s   i s   wh e r e   t h e   e m be dd i ngs   a r e   pa s s e d  t h r o ugh   a   de n s e   l a y e r   ( i . e . ,   a   f u ll y   c o nne c t e d  n e ur a l   n e t wo r k   l a y e r ) .   T hi s   l a y e r   pr o c e s s e s   t h e   f e a t ur e s   e x t r a c t e d   by   B E R T   a n d  h e l ps   t h e   m o de l   m a ke   pr e d i c t i o n s   a b o ut  t h e   c l a s s   o f   t h e   i n put   t e x t .   A   s o f t m a x   a c t i v a t i o n   i s   t y p i c a ll y   a pp li e d  a t   t hi s   l a y e r   to  o u t pu t   c l a s s   pr o b a bil i t i e s .     Out pu t   l a y e r :  T h e   f i na l   o ut pu t  l a y e r   t y p i c a ll y   a pp li e s   a   s o f t m a x   a c t i v a t i o n   f u n c t i o n ,   whi c h   c o nve r ts   t h e   r a w  l o g i t s   f r o m   t h e   c l a s s i f i e r   i n t o  pr o b a bil i t i e s   f o r   e a c h   c l a s s .   S o f t m a x   e ns ur e s   t h a t   t h e   s um   o f   t h e   pr e d i c t e d  pr o b a bi li t i e s   f o r   a l l   c l a s s e s   e qua l s   1,   whi c h   a ll o ws   t h e   m o de l   t o   m a ke   pr o b a bil i s t i c   pr e d i c t i o n s .   F o r   a   bi n a r y   c l a s s if i c a t i o n   t a s k,   s o f t m a x   o ut pu t s   two   p r o b a bi li t i e s ;   f o r   m u l t i - c l a s s   c l a s s if i c a t i o n ,   s o f t m a x  o u t pu t s   p r o b a bi li t i e s   f o r   a l l   po s s i b l e   c l a s s e s .   F i ve   m a j o r   c o m po n e n t s   o f   t h e   m o de l   a r e   e x p l a i ne d  h e r e .   ( i )   E m b e dd i ng  l a y e r :  whi c h   c o nv e r t s   i n put   to ke n s   i n t o  de n s e   v e c t or s   r e pr e s e n t i n g  t h e i r   s e m a nt i c   m e a ni ng.   P r e - tr a i ne d  e m b e dd i ng s   f r o m   B E R T   a r e   us e d  h e r e .   ( i i )   T r a n s f o r m e r   e n c o de r :  T h e   B E R T   tr a n s f o r m e r   e n c o de r   c o n s i s t s   o f   m u l t i p l e   l a y e r s   o f   s e lf - a tt e n t i o n  m e c h a ni s m s   t h a t   h e l p  c a pt ur e   l o n g - r a n ge   de pe n de n c i e s   a n d  c o n t e x t ua l   r e l a t i o n s hi p s   i n   t h e   t e x t .   ( i ii )   F e a t ur e   e x t r a c t i o n   l a y e r :  T hi s   l a y e r   e x t r a c t s   t h e   m o s t   r e l e v a n t   f e a t ur e s   f o r   m e n t a l   h e a l t h   c l a s s i f i c a t i o n ,   opt i mi z e d   us i n g  G A s .  ( i v )   F u l ly   c o nn e c t e d  l a y e r :  Af t e r   f e a tur e   e x t r a c t i o n ,   t h e   m o de l   pa s s e s   t h r o ugh   a   f u ll y   c o n n e c t e d   ( de n s e )   l a y e r   t h a t  l e a r n s   r e l a t i o ns hi ps   b e t we e n   t h e   f e a t ur e s   a n d  m e n t a l   h e a l t h   c a t e g o r i e s .   Ou t pu t  l a y e r :  T h e   f i na l   o ut pu t  l a y e r   us e s   a   s o f t m a x   a c t i v a t i o n   f u n c t i o n   to  pr o duc e   a   pr o b a bil i t y   d i s t r i b ut i o n   o v e r   t h e   f i v e   m e n t a l   h e a l t h   c a t e go r i e s .     G i v e n   t h e   l i mi t e d  n u m be r   o f   l a b e l e d  s a m p l e s   f o r   e a c h   m e n t a l   h e a l t h   c a t e go r y ,   f e w - s h o t   l e a r ni n g   i s  e m p l o y e d  t o  e n a bl e   t h e   m o de l   t o   ge n e r a l i z e   e f f e c t i v e ly   f r o m   m i n im a l   da t a .   I n   f e w - s h o t  l e a r ni ng ,   t h e   m o de l   l e a r n s   h o w  to   a da p t   qui c k ly   t o   n e w  t a s ks   w i t h   o n ly   a   f e w  t r a i ni ng  e x a m p l e s .   T o   a c hi e v e   f e w - s h o t  l e a r ni ng ,  we   us e   t h e   M A M L   a l go r i t hm ,   a   po pul a r   m e t a - l e a r ni ng  t e c h ni que .   M A M L   e na bl e s   t h e   m o de l   to   l e a r n   f r o m   m u l t i p l e   m e n t a l   h e a l t h   c a t e go r i e s .   Dur i n g  t r a i ni ng,   t h e   m o de l   pe r f o r m s   a   s e r i e s   o f   gr a d i e n t   upda t e s   on   a   t a s k  ( C a t e g o r y )   w i t h   a   s m a ll   n u m be r   o f   e x a m p l e s .   T he   m o de l   i s   t h e n   o pt i m i z e d  to   b e   a da pt a bl e   a c r o s s   d i f f e r e n t   t a s ks   by   upda t i n g  t h e   m e t a - pa r a m e t e r s   b a s e d  o n   pe r f o r m a n c e   a c r o s s   m u l t i p l e   t a s ks .   T h e   B E R T   m o de l   i s   t r a i n e d  us i ng  t hi s   m e t a - l e a r ni ng  f r a m e wo r k,   wh e r e   e a c h   f e w - s h o t  t a s k  c o r r e s po n ds   to  a   di f f e r e n t   m e n t a l   h e a l t h   c a t e g o r y .   T hi s   a l l o ws   t h e   m o de l   to  ge n e r a l i z e   be tt e r   e v e n   w i t h  li mi t e d  da t a   f o r   e a c h   c a t e gor y .   G A s   wo r k  by   e v o l vi ng  a   po pul a t i o n   o f   c a n d i da t e   s o l ut i o ns   o v e r   ge ne r a t i o n s   us i n g  m e c h a ni s m s   i ns p i r e d  by   n a t ur a l   e v o l ut i o n   l ike   s e l e c t i o n ,   c r o s s o v e r ,   a n d  m ut a t i o n .   F o r   i n t e gr a ti ng  w i t h   B E R T ,   GA   c a n   b e   us e d  t o   o p t i m i z e   t h e   we i g h t s   o f   f e a t ur e   e x t r a c t i o n   l a y e r s   o r   hy pe r pa r a m e t e r s   t h a t   a f f e c t   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2502 - 4752   I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i ,  Vo l .   4 4 ,   N o .   2 ,   N o v e m b e r   20 2 6 :   450 - 468   458   B E R T ’ s   pe r f o r m a n c e .   T h e   b a s i c   o bj e c t i v e   o f   GA   i n   t h e   c o n t e x t  o f   B E R T   f i n e - t uni ng  to  m a xim i z e   t he   f i t n e s s   f u n c t i o n ,   whi c h   i s   t y p i c a l ly   t h e   pe r f o r m a nc e   m e t r i c   ( s uc h   a s   A c c ur a c y ,   pr e c i s i o n ,   F 1 - s c o r e ,   e t c . )   o f   t h e   m o de l  a f t e r   t r a i ni ng.       ( ) = P e r fo r m a nce   M e tr ic   of   B E RT   w it h   F e a tu r e   S e t     ( 1)     W h e r e   X i   i s   a   s e t   o f   f e a t ur e   v e c t or s   o r   hy pe r pa r a m e t e r s   a t   t h e   i t h   i nd i vi du a l   ( c a n d i da t e   s o l ut i o n )   i n  t h e   p o pul a t i o n ,   a n d  F   ( X i )   i s   t h e   f i t n e s s   f u n c t i o n  i n   ( 1 ) ,   r e pr e s e n t i n g  t h e   c l a s s if i c a t i o n   pe r f o r m a nc e   ( e . g . ,   A c c ur a c y )   a f t e r   t h e   B E R T   m o de l   i s   f i ne - t un e d  w i t h   t h e   f e a t ur e   s e t  X i .   GA   s t e ps   f o r   B E R T   f i ne - t uni n g:       I ni t i a l i z a t i o n :  S t a r t  wi t h   a   po pu l a t i o n   o f   r a n do m   f e a t ur e   s e t s   or   hy pe r pa r a m e t e r   c o m bi na t i o ns   X i   ( e . g. ,   l e a r ni ng  r a t e ,   b a t c h   s i z e ,   n u m be r   o f   l a y e r s   f o r   f e a t ur e   e x t r a c t i o n ) .     S e l e c t i o n :  C h o o s e   t h e   b e s t - pe r f o r m i ng  i n d i v i dua l s   b a s e d  o n   t h e   f i t n e s s   f u nc t i o n   F   ( X i ) .   F or   i n s t a nc e ,   we   mi g h t   s e l e c t   t h e   to p   k  f e a t ur e   s e t s   wi t h   t h e   hi g h e s t   pe r f o r m a n c e   m e t r i c s .     C r o s s o v e r :  C o m bi ne   s e l e c t e d  i n d i v i dua l s   ( pa r e n t s )   to   c r e a t e   n e w  o f f s pr i ng  ( f e a t ur e   s e t s ) .   T hi s   s t e p   s i m u l a t e s   t h e   r e c o m bi na t i o n   o f   f e a t ur e s   o r   hy pe r pa r a m e t e r s   a s   pe r   ( 2 ) .     of f s pr i ng   = Cr o s s o v e r     ( i   , )   ( 2)     W h e r e   X i   a n d  X j   a r e   pa r e n t   f e a t ur e   s e t s ,   a n d  X  o f f s pr i ng  i s   t h e   n e w  o f f s pr i n g  s e t   c r e a t e d   by   c o m bi n i ng  t h e   pa r e n t s .     M ut a t i o n :  R a n do m ly   m ut a t e   a   f e a t ur e   s e t  to  i n t r o d uc e   d i v e r s i t y   a n d  a v o i d  l o c a l   o pt i m a   a s   pe r   ( 3) .     m u t a t e d   = M u ta ti o n   ( of f s pr i ng )   ( 3)       E v a l ua t i o n :  E v a l ua t e   t h e   o f f s pr i ng ' s   pe r f o r m a n c e   a f t e r   t r a i ni ng  t h e   B E R T   m o de l   w i t h   t h e   m ut a t e d   o r   c r o s s o v e r   f e a t ur e   s e t.     R e p l a c e m e n t :  R e p l a c e   t h e   o l d  po pul a t i o n   w i t h  t h e   n e w  po pul a t i o n ,   e ns ur i n g  t h e   b e s t - pe r f o r mi ng   s o l ut i o ns   a r e   c a r r i e d  o v e r .     4. 1.     Op t im iz e d   m od e l   ou t p u t   T h e   f i na l   m o de l   i s   o b t a i n e d  a f t e r   r un ni ng  t h e   G A   f o r   20   ge n e r a t i o ns ,   y i e l d i ng  a n   o p t i m a l   s e t   o f   f e a t ur e   e x t r a c t i o ns   o r   hy pe r pa r a m e t e r s   X ∗   i n   ( 4 )   t h a t   m a xi mi z e s   t h e   m o de l 's   c l a s s if i c a t i o n   A c c ur a c y ,      ∗ = a r g   m a x   ( )   ( 4)     T h us ,   t h r o ugh   GA ,   we   a i m   t o   o p t i m i z e   t h e   f e a t ur e   r e pr e s e n t a t i o n   o r   hy p e r pa r a m e t e r s   i n   t h e   B E R T   m o de l   t o   e nh a nc e   i t s   pe r f o r m a n c e   i n   m e n t a l   h e a l t h   t e x t  c l a s s i f i c a t i o n   t a s ks .   T h e   m o de l ' s   pe r f o r m a n c e   wa s   o p t i mi z e d  to  t h e   hy pe r pa r a m e t e r s   i n   T a bl e   3 .         T a bl e   3.   Hy p e r pa r a m e t e r s   o p t i mi z e d  us i ng  G A   f o r   ( M AM L - B E R T )   f r a m e wo r k   H y p e r pa r a m e t e r   S e a r c h  s pa c e   D e s c r ip ti o n   L e a r ni ng  r a te   [ 1e - 5, 1 e - 3]   C o nt r o ls  t h e  i nn e r - l oo p a da pt a ti o n  of   B E R T   f or   f e w - s h o t  l e a r ni ng .   M e ta  l e a r ni ng  r a te   [ 1e - 3, 1 e - 1]   L e a r ni ng  r a te   f or  upda ti ng t h e  ba s e  m o d e l  a c r o s s  di f f e r e n t  f e w - s ho t  ta s ks .   B a tc h s i z e   [ 8, 16, 32]   N umbe r   of   tr a in in g s a mpl e s  pr oc e s s e d i n e a c h i t e r a ti o n.   N umbe r   of   in ne r  upd a te s   [ 1, 5, 10]   N umbe r   of   ta s k - s pe c i f i c  upda te s  dur in g t h e  M A M L   tr a in in g ph a s e .   D r o p o ut   r a te   [ 0.1, 0.5]   R e gul a r iz a ti o n  f a c t or  t o  pr e ve nt   ove r f it ti ng.       T h e s e   s e t t i n g s   we r e   s e l e c t e d  to  b a l a n c e   m o de l   A c c ur a c y   a n d  c o m put a t i o n a l   e f f i c i e n c y ,   e ns ur i n g   o p t i m a l   pe r f o r m a n c e   f o r   t h e   t e x t  c l a s s i f i c a t i o n  t a s k.   GA   f o r   hy pe r pa r a m e t e r   o p t i m i z a t i o n ,   we   h a v e   im p l e m e n t e d.   T h e   po pul a t i o n   s i z e   i s   50,   whe r e   50  pot e n t i a l   s o l ut i o n s   a r e   c o n s i de r e d  i n  e a c h   ge n e r a t i o n .   T h e   pr o b a bil i t y   t h a t   t w o   i n d i v i dua l s   w il l   c r o s s   o v e r   to  pr o duc e   o f f s pr i n g  i s   c o ns i de r e d  to   b e   0. 7.   T h e   r a t e   a t   whi c h  r a n do m   m ut a t i o ns   ( c h a n g e s   i n   t he   o f f s pr i ng)   o c c ur   dur i n g  t h e   G A   pr o c e s s   i s   s e t   to   0. 1 .   He r e   f o r   20  n u m b e r   o f   ge n e r a t i o n s   ( i t e r a t i o ns )   t h e   GA   w i ll   r u n .   T h e   m e t h o d   f o r   s e l e c t i n g  i n d i v i dua l s   f o r   t h e   n e x t   ge n e r a t i o n   is   to ur n a m e n t   s e l e c t i o n .   T h e   B E R T   m o de l   i s   f i ne - t une d  us i n g  t h e   f o l l o w i ng  s t e ps :  ( 1)   L o s s   f u nc t i o n :  T he   c r o s s - e n t r o py   l o s s   f u nc t i o n   i s   us e d  to   m e a s ur e   t h e   d i f f e r e n c e   b e t we e n   t h e   pr e d i c t e d  pr o b a bi li t i e s   a n d  t h e   t r ue   c l a s s   Evaluation Warning : The document was created with Spire.PDF for Python.
I n do n e s i a n   J   E l e c   E n g  &   C o m p  S c i     I S S N:   2502 - 4752       Optimiz ing  me ntal   he alt h  tex t   c las s if ication  us ing   ge ne ti c   algor it hms   and  me ta - lear ning   ( A lok  K umar   J e na )   459   l a b e l s .   ( 2)   Opt i mi z a t i o n   a l go r i t hm :  T h e   A da m   o pt i mi z e r   i s   us e d  f o r   t r a i ni ng  t h e   m o de l ,   a s   i t   a d a pt s   t h e   l e a r ni ng  r a t e   to  di f f e r e n t   pa r a m e t e r s .   ( 3 )   GA   o p t i mi z a t i o n :  A   G A   i s   a pp l i e d  to  f ur t h e r   o p t i mi z e   t h e   f e a t ur e   e x t r a c t i o n   l a y e r .   T h e   G A   s e l e c t s   t h e   m o s t   r e l e v a n t   f e a t ur e s   f o r   c l a s s if i c a t i o n   by   mi mi c k i ng  t h e   pr o c e s s   o f   n a t ur a l   s e l e c t i o n .     4. 2.     Com p ar is on   wit h   t r ad it ion al   h yp e r p a r am e t e r   t u n in g  m e t h od s   W e   ha v e   us e d  m e t h o ds   s uc h   a s   gr i d  s e a r c h   a n d  e v e n   B a y e s i a n   o p t i m i z a t i o n   b ut   o p t e d   f o r   a   GA   b e c a us e   i t   i s   b e t t e r   s ui t e d  f o r   m o r e   c o m p l e x   a n d  l a r ge r   s e a r c h   s pa c e s .   T h e   ke y   d i f f e r e n c e s   a r e   a s   s h o wn   i n  T a bl e   4.   W hil e   gr i d  s e a r c h   i s   c o m put a t i o n a ll y   im pr a c t i c a l   f o r   hi g h - d i m e ns i o na l   t uni ng,   GA   pr ogr e s s i ve l y   o p t i mi z e s   hy pe r pa r a m e t e r s   whil e   i n t r o duc i n g  va r i o us   s e a r c h   s pa c e   e l e m e n t s   to   a v o i d  c o nv e r ge n c e   to   l o c a l   mi n im a   dur i n g   hy pe r pa r a m e t e r   e x p l o r a t i o n .       T a bl e   4.   C o m pa r i s o n   w i t h   t r a di t i o n a l   hy pe r pa r a m e t e r   t uni n g  m e t h o ds   M e th o d   S tr e ng th s   L im it a ti o ns   G r id  s e a r c h   E x ha us ti ve l y  s e a r c h e s  a ll  c o mbi na ti o ns .   C o mput a ti o na ll y   e x pe ns i ve   f o r   la r ge  s e a r c h s pa c e s .   B a y e s ia n  o pt im i z a ti o n   U s e s  pr o ba bi li s ti c  m o d e ls  t o   f in d  o pt im a l  v a lu e s  e f f i c i e nt l y .   M a y  g e t  s tu c k i n l oc a l  o p ti ma ;  r e qui r e s  pr e de f in e d  pr io r s .   G e ne ti c  a lg or it hm ( G A )   E vol v e s  h y p e r pa r a m e t e r s  us in g  s e le c ti o n,  c r o s s ove r , a nd mut a ti o n.   R e qui r e s  mor e  i te r a ti o ns  t o   c o n ve r g e .       4. 3.     GA  c on f igu r at ion   ( Gener at ion s   an d   p op u l at ion   s iz e )   T h e   GA   c o nf i gur a t i o n   t h a t  we   c h o s e   to  us e   i n   o ur   s t udy   l i ke   po pul a t i o n   s i z e   is   20  ( e a c h   i s   a   s e t  o f   hy pe r pa r a m e t e r s ) ,  g e n e r a t i o ns   is   20  ge n e r a t i o ns   ( e n o ugh   i t e r a t i o n s   to  c o n v e r ge ) ,   us e d  t h e   r o ul e t te  wh e e l   s e l e c t i o n   ( we i g h t e d  to wa r ds   b e tt e r - pe r f o r m i ng  c onf i gur a t i o ns ) ,  c r o s s o v e r   r a t e   is   0. 8  ( c o m bi na t i o n   o f   we l l - pe r f o r m i ng  s o l ut i o n s   to   m a i n t a i n   d i ve r s i t y )   a n d  t h e   m ut a t i o n   r a t e   i s   0. 2  ( M u t a t e s   wi t h   a   c h a n c e   o f   s t a gn a t i o n ) .  S o,   h e r e   we   d r a w  a   c l e a r   i de a   r e ga r d i n g  t h e   r o l e   o f   GA   i n   hy pe r pa r a m e t e r   tuni n g  a n d  a l s o   di s c us s e d  wi t h   a   de t a i l e d  c o m pa r i s o n   w i t h   o t h e r   a ppl i c a bl e   m e t h o ds .       5.   M E T HO DOL OG I CA L   AP P ROAC H   T h e   wo r kf l o w  i s   s u m m a r i z e d  i n   a   s tr uc t ur e d   f o r m a t ,   e n a bli ng  b e t t e r   r e a da bil i t y   a n d  un de r s t a n d i ng.   T h e   t a bl e   o u t l i ne s   t h e   s t e p - by - s t e p  a l go r i t hm   u s e d  f o r   m e n t a l   h e a l t h   t e x t   c l a s s i f i c a t i o n .   I t  de ta i l s   t h e   i n t e gr a t i o n   o f   t h e   B E R T   m o de l   a n d  G A   f o r   f e a t ur e   e x t r a c t i o n   a n d  o p t i mi z a t i o n .   E a c h   s t e p   c o n t r i b ut e s   to  t h e   o v e r a l l   wo r kf l o w,   f r o m   da t a   pr e pr o c e s s i n g  to  f i na l   e v a l ua t i o n ,   e n s ur i ng  a n   e f f i c i e n t   a n d  e f f e c t i v e   c l a s s if i c a t i o n   s y s t e m .   A l go r i t hm   1  f o r   t h e   a ppr o a c h   d i s c u s s e d  i n ,      Al go r i t hm   1.   A   f o r   m e n t a l   h e a l t h   da t a   c l a s s if i c a t i o n   us i ng  o p t i mi z e d  M AM L - B E R T   S te p 1:  D a ta  P r e - pr oc e s s in g   1.   L o a d t h e   da ta s e t   ( me nt a l  h e a lt h t e x t  da ta s e t) .   2.   C le a n t he  t e x t   ( r e m ov e  s p e c ia l  c ha r a c t e r s , s to pw o r ds , a nd p e r f or m t o ke ni z a ti o n) .   3.   C o n v e r t  t e x t  in t o   e mb e ddi ng us in g B E R T  t o k e ni z e r .   4.   H a ndl e   c la s s   im ba la nc e   w it h  W e ig ht e d  L o s s :   ( C la s s - ba la nc e d  lo s s )   b y   th e   e qua ti o n   = 1 − 1 −   S te p 2:  F e w - s h o t  le a r ni ng  T a s k  C r e a ti o n   5.   F or m  N - w a y ,  K - s h o t  le a r ni ng  ta s ks ,  r a ndo ml y   s e l e c t  N   c la s s e s   a nd  S e le c t  K - la be l e d  e x a mpl e s   pe r   c la s s   f or   th e   s uppor t  s e t.   T he n  S e l e c t  a ddi ti o na l  e x a mpl e s   f o r   th e   que r y   s e t  ( t o   e v a lu a te   me ta - l e a r ni ng upda t e s ) .   S te p 3:  M e ta - L e a r ni ng w it h  M A M L   f o r   B E R T   6.   I ni ti a li z e  a   B E R T - ba s e  c la s s i f i e r   f θ   7.   F or   e a c h   m e ta - tr a in in g  l oo p ,  S a mpl e   a n  N - w a y ,  K - s h o t  ta s k,   a nd  c o mput e d  l o s s   o n  s upp o r t  s e t   us in g  W e ig ht e d  L o s s :  ℒ = ∑ = 1 ∗    ( , ̂ )   T h e n p e r f or m a  t a s k - s pe c i f i c  upda t e  t o   o bt a in  a da pt e d pa r a m e t e r s  ( θ ′ )   i. e .  ′ = −   C o mput e  t h e  que r y  l o s s  w it h upda te d pa r a me t e r s  θ ′ :     ℒ q u e r y = ∑ = 1 ∗    ( , ̂ )     T h e n upda t e  t h e  i ni ti a l  B E R T  pa r a m e t e r s  us in g t he  m e ta - l o s s ,        = − ∑ ℒ q u e r y ( ′ )   S te p 4:   G e n e ti c   a lg o r it h m ( G A )   f or   H y p e r pa r a m e t e r   O pt im iz a ti o n   8.   I ni ti a li z e  a  p o pul a ti o n  of  h y p e r pa r a m e t e r s   ( l e a r ni ng  r a te ,  ba t c h  s iz e , d r o p o ut , e t c . ) .   9.   T r a in  a nd e v a lu a t e  m o de ls  us in g F e w - S h o t  c la s s i f ic a ti o n  A c c ur a c y .   10.   P e r f or m  GA   o p e r a ti o ns :   S e l e c ti o n:   C h oo s e  t o p - p e r f or mi ng h y p e r pa r a m e t e r  s e ts .   C r o s s ove r :   C o mbi n e  s e l e c t e d h y p e r pa r a m e te r s  t o  g e n e r a t e   of f s pr in g.   Evaluation Warning : The document was created with Spire.PDF for Python.