I nte rna t io na l J o urna l o f   Adv a nces in Applie d Science s   ( I J AAS)   Vo l.  1 5 ,   No .   3 ,  Sep tem b er   20 2 6 ,   p p .   1 1 1 2 ~ 1 1 2 2   I SS N:  2252 - 8 8 1 4 ,  DOI :  1 0 . 1 1 5 9 1 /ijaas . v 1 5 . i 3 . pp 1 1 1 2 - 1 1 2 2           1112       J o ur na l ho m ep a g e :  h ttp : //ij a a s . ia esco r e. co m   Les io n - sem a ntic  t o ken guid ed  trans former f usio n f o r  sta g e - a da ptive dia betic   retinopa thy g ra di ng  and screening       M ura li G ujj ula ,   K um a r  Na r a y a na n   D e p a r t me n t   o f   C o mp u t e r   S c i e n c e   a n d   En g i n e e r i n g ,   S c h o o l   o f   E n g i n e e r i n g ,   V e l s I n st i t u t e   o f   S c i e n c e ,   T e c h n o l o g y   a n d   A d v a n c e d   S t u d i e s,  C h e n n a i ,   I n d i a       Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   Ma y   6 ,   2 0 2 5   R ev is ed   Au g   2 ,   2 0 2 6   Acc ep ted   Au g   1 3 ,   2 0 2 6       Dia b e ti c   re ti n o p a t h y   (DR)  sc re e n in g   fr o m   re ti n a l  f u n d u s   ima g e s  is  stil l   d iffi c u lt   b e c a u se   o f  t h e   h e tero g e n e it y   o f  les io n s,   sig n ifi c a n t  c las s  i m b a lan c e ,   a n d   lo w   re li a b il i ty   o f   e x ist in g   d e e p   lea rn i n g   a l g o rit h m s  o win g   to   t h e ir   g e n e ric  fe a tu re   p o o l in g   a n d   p a ss i v e   fu sio n   m e c h a n ism s.  To   o v e rc o m e   su c h   li m it a ti o n s,   t h is  st u d y   p re se n ts  a   h y b ri d   m o d e l   c a ll e d   Ha n d Eff iT ra n s - DR,   wh ich   c o m b i n e s  d e e p   re ti n a l   re p re se n tatio n s  wit h   h a n d c ra fted   les io n   d e sc rip to rs  v ia  t h e   d irec ted   tran s fo rm e r - b a se d   a tt e n ti o n   m e c h a n ism .   F irst,   a  les io n - p r io r - g u i d e d   t o k e n   s q u e e z e r  (LP G - TS )  m o d u le  is  p ro p o se d   in   th e   wo rk ,   wh ich   is  c a p a b le  o f  c r e a ti n g   les io n - sp e c ifi c   v isu a l  to k e n s  v ia   in teg ra ti n g   p rio r  k n o wle d g e   a b o u t  p a th o lo g y   i n to   th e   to k e n iza ti o n   p ro c e d u re .   M o re o v e r,   a   d irec ted   tran sfo rm e r - b a se d   fu sio n   ( T→V )  stra teg y   a ll o ws   fo r   a c ti v e ly   f u sin g   t h e   h a n d c ra fted   l e sio n   fe a tu re s  wit h   v isu a l   re p re s e n tatio n s.   Th e   in tro d u c e d   fra m e wo rk   is  a ss e ss e d   with   a   stra ti fied   fiv e - fo ld   c ro ss - v a li d a ti o n   p r o to c o l.   Its  a v e ra g e   c las sifica ti o n   a c c u ra c y   su r p a ss e s  9 7 % ,   wh i le   th e   m a c ro - F 1   sc o re   is  h i g h e r  t h a n   0 . 9 7   a n d   Co h e n ' s  k a p p a   is  g r e a ter  th a n   0 . 9 5 ,   in d ica ti n g   g o o d   a g re e m e n t   d e sp it e   t h e   p re se n c e   o f  c las s  i m b a lan c e .   Th e   p ro b a b il i ty   re li a b i li ty   is  m e a su re d   in   term s  o f  e x p e c ted   c a li b r a ti o n   e rro r   (ECE )   a n d   Brier  sc o re s  a n d   s h o ws   we ll - c a li b ra ted   c o n f id e n c e .   F u rth e r   v a li d a ti o n   is  p e rfo rm e d   o n   t wo   e x tern a l  d a tas e ts,  wh e re   c o n siste n t   p e rfo rm a n c e   with   m i n o r  d e c li n e   i s sh o wn .   K ey w o r d s :   Diab etic  r etin o p ath y   L esio n - awa r e  to k e n izatio n   Pro b ab ilit y   ca lib r atio n   R etin al  f u n d u s   im ag in g   T r an s f o r m e r   atten tio n   T h is i s  a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   Mu r ali  Gu jju la   Dep ar tm en t o f   C o m p u ter   Scie n ce   an d   E n g in ee r in g ,   Sch o o l o f   E n g in ee r in g   Vels I n s titu te  o f   Scien ce ,   T ec h n o lo g y   an d   Ad v a n ce d   Stu d ie s   C h en n ai,   I n d ia   E m ail:  h ar is . ee e@ g m ail. co m       1.   I NT RO D UCT I O N   Diab etic  r etin o p ath y   ( DR )   is   a  p r o g r ess iv e  m icr o v ascu lar   co m p licatio n   o f   d iab etes  m ellitu s   an d   r em ain s   o n e   o f   th e  lea d in g   ca u s es  o f   ir r e v er s ib le  v is io n   im p air m en t   wo r ld wid e.   T h e   d is ea s e  m an if ests   th r o u g h   r etin al  lesi o n s   s u ch   a s   m icr o an eu r y s m s ,   h em o r r h ag es,   h ar d   e x u d ates,  an d   n e o v as cu lar izatio n ,   wh ich   o f ten   ap p ea r   at  ea r l y   s tag es  with   s u b tle  v is u al  co n tr ast   an d   lo ca lized   s p atial  d is tr i b u tio n .   L a r g e - s ca le  s cr ee n in g   u s in g   f u n d u s   p h o to g r ap h y   is   th e r ef o r e  ess en tial  f o r   e ar ly   d iag n o s is   an d   tim ely   in ter v en tio n ,   y e t  m an u al  s cr ee n in g   is   lim ited   b y   s p ec ialis t  av ailab ilit y ,   i n ter - o b s er v er   v ar iab ilit y ,   a n d   in cr ea s in g   p atien t   b u r d e n .   As  a  r esu lt,  au to m ate d   DR   d etec tio n   u s in g   ar tific ia l  in tellig en ce   h as  b ec o m e  a n   a ctiv e  r esear ch   a r ea ,   aim in g   to   s u p p o r t  o p h th alm o l o g is ts   b y   p r o v id in g   f ast,  co n s i s ten t,  an d   s ca lab le  s cr ee n in g   s o lu tio n s   [ 1 ] ,   [ 2 ] .     Dee p   lear n in g ,   p a r ticu lar ly   co n v o l u tio n al  n e u r al  n etwo r k s   ( C NNs),   h as  d em o n s tr at ed   s tr o n g   p er f o r m an ce   in   DR   d etec tio n   b y   lear n in g   h ier ar c h ical  r e p r esen tatio n s   d ir ec tly   f r o m   r eti n al  im ag es  [ 3 ] ,   [ 4 ] .  C NN - b ased   s y s tem s   h av e  ac h iev ed   h ig h   ac cu r ac y   o n   p u b lic  b en c h m ar k s   an d   ar e   in cr ea s in g ly   e x p l o r e d   f o r   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ad v   Ap p l Sci     I SS N:   2252 - 8 8 1 4       Les io n - s ema n tic  to ke n   g u id e d   tr a n s fo r mer fu s io n   fo r   s ta g e - a d a p tive  d ia b etic  r etin o p a th y   …   ( Mu r a li Gu jju la )   1113   r ea l - wo r ld   d e p lo y m e n t  [ 5 ] .   Ho wev er ,   d esp ite  th eir   s u cc ess ,   C NN - o n ly   ap p r o ac h es  o f ten   f u n ctio n   as     b lack - b o x   m o d els,  o f f er i n g   li m ited   in ter p r etab ilit y   an d   r ed u ce d   r o b u s tn ess   wh en   ex p o s ed   to   v ar iatio n s   in   a c q u i s it i o n   d e v i c es ,   il l u m i n at io n   c o n d i t i o n s ,   o r   p a ti e n t   d e m o g r a p h i c s   [ 6 ] ,   [ 7 ] .  T h e s e  l i m i ta t i o n s   a r e   c r it i c a l  i n   m e d i c a l   s c r e e n i n g ,   w h e r e   m o d e l   r e l i a b i l i t y   a n d   t r a n s p a r e n c y   ar e   a s   i m p o r t a n t   a s   r aw   c l as s i f i ca t i o n   p e r f o r m a n c e .   T o   o v er co m e  s h o r tco m in g s   o f   p u r ely   d ee p   m o d els,  r ec en t  s tu d ies  h av e  ex p lo r e d   h y b r id   f r am ewo r k s   th at  co m b in e  d e e p   f ea tu r es   with   h an d cr af ted   r etin al  d escr ip to r s   an d   atten tio n   m e ch an is m s   [ 8 ] ,   [ 9 ] .  Han d cr af ted   f ea tu r es,  s u ch   a s   tex tu r e  s tatis tics   an d   lesi o n - lev el  d escr ip to r s ,   e n co d e   clin ically   m ea n in g f u l   in f o r m atio n   th at  co m p lem en t s   d ee p   r ep r esen tatio n s   an d   e n h an ce s   in ter p r etab ilit y   [ 1 0 ] .   At  th e  s am e  tim e,   tr an s f o r m er - b ased   ar ch itectu r es  an d   v is io n   tr an s f o r m er s   h a v e  b ee n   in t r o d u ce d   in to   r etin a l  im ag e  an aly s is   to   m o d el  lo n g - r an g e  d ep e n d en c ies  an d   g lo b al  co n tex t  th r o u g h   s elf - atten tio n   m ec h a n is m s   [ 1 1 ] ,   [ 1 2 ] .   T h ese   ap p r o ac h es  h av e  s h o wn   p r o m is e  in   ca p tu r in g   s p atial  r elatio n s h ip s   b etwe en   lesi o n s   an d   an ato m ical  s tr u ctu r es  th at  ar e  d if f icu lt t o   m o d el  u s in g   lo ca l c o n v o lu tio n   alo n e  [ 1 3 ] .     Mo r e   r ec en t  wo r k s   h av e  p r o p o s e d   C NN - tr a n s f o r m er   f u s io n   m o d els   f o r   DR   d ete cti o n   an d   g r a d i n g ,   r e p o r ti n g   im p r o v e d   d is c r i m i n a tio n   p er f o r m a n c e  co m p a r e d   to   s ta n d al o n e  C N Ns  [ 1 4 ] ,   [ 1 5 ] .   Nev er t h el ess ,   m o s t   ex is ti n g   f u s i o n   s t r a te g ies   r e ly   o n   s i m p le   f e at u r e   c o n ca te n at i o n   o r   s y m m et r ic   a tte n t io n ,   wh ich   t r ea ts   a ll   s p ati al   r e g i o n s   u n i f o r m l y   a n d   f a ils   t o   ex p li cit ly   em p h asi ze   l esi o n - d o m i n a n t   a r e as   [ 1 6 ] ,   [ 1 7 ] .   F u r t h e r m o r e ,   h an d cr af te d   f e at u r es,   w h en   in c o r p o r at ed ,   ar e   o f t en   a p p e n d ed   o n l y   a t   th e   cl ass if ie r   s t ag e,   lim iti n g   th e ir   in f l u en ce   o n   in t er m e d i at e  r e p r es en tati o n   le ar n i n g   [ 1 8 ] .   An o t h e r   c r it ic al  l im it ati o n   is   th at   m a n y   s t u d ies   f o c u s   p r im ar il y   o n   ac c u r a cy   o r   a r e a   u n d er   th e   r e ce i v e r   o p e r at in g   ch ar ac te r is ti c   cu r v e   ( AUROC ) ,   wh ile   o v e r lo o k i n g   p r o b ab ilit y   ca li b r at io n   a n d   co n f i d e n ce   r eli ab i lit y — f a ct o r s   t h a t  ar e  cr u c ia l  f o r   cli n i ca l  d e cisi o n - m a k i n g   [ 1 9 ] ,   [ 2 0 ] .     Desp ite  s ig n if ican t  p r o g r ess ,   s ev er al  g ap s   r em ain   i n   cu r r en t  DR   d etec tio n   m eth o d o l o g ies.  First,   ex is tin g   m o d els  r a r ely   in te g r ate  ex p licit  lesi o n   p r io r s   in to   th e  to k e n izatio n   o r   atten tio n   p r o ce s s ,   lead in g   to   d ilu ted   lesi o n   in f o r m atio n   wh en   f ea tu r es  ar e   g lo b ally   p o o led   o r   u n if o r m ly   p ar titi o n ed .   Seco n d ,   t h e  in ter ac tio n   b etwe en   h an d c r af ted   lesi o n   d escr ip to r s   an d   d ee p   v is u al  r ep r esen tatio n s   is   o f ten   wea k   o r   p ass iv e,   p r ev en tin g   clin ically   m ea n in g f u l  g u id an ce   d u r in g   f ea tu r e  f u s io n .   T h ir d ,   tr an s f o r m e r - b ased   f u s io n   m ec h an is m s   lack   d ir ec tio n ality   th at  r ef lects  clin ica l  r ea s o n in g ,   wh er e  lesi o n   s t atis tics   s h o u ld   in f o r m   v is u al  in ter p r etatio n   r at h er   th an   th e   r ev er s e  [ 2 1 ] ,   [ 2 2 ] .   Fin ally ,   m an y   r ep o r ted   s y s te m s   ar e  ev alu ate d   o n   im b ala n ce d   d atasets   u s in g   ac cu r ac y - ce n tr ic  m etr ics,   with o u t  s u f f icien t  a n aly s is   o f   c lass - wi s e  b eh av io r ,   r o b u s tn ess   ac r o s s   f o ld s ,   o r   p r o b a b ilit y   ca lib r atio n ,   w h ich   lim its   th eir   s u itab ilit y   f o r   r ea l - wo r ld   s cr ee n in g   s ce n ar io s   [ 2 3 ] ,   [ 2 4 ] .   T h e  p r o b le m   ad d r ess ed   in   th is   wo r k   is   th er ef o r e  th e  d ev el o p m en t  o f   a  DR   d etec tio n   f r am e wo r k   th at  i)   ex p licitly   em p h asizes  les i o n - r elev a n t  r eg io n s   d u r i n g   r ep r esen tatio n   lear n in g ;   ii)  en ab les  ac tiv e  an d   in ter p r etab le  i n ter ac tio n   b etw ee n   h a n d cr af te d   lesi o n   f ea tu r e s   an d   d ee p   v is u al  to k en s ;   an d   iii)  r em ai n s   r o b u s t  an d   r eliab le  u n d er   class   im b alan ce   an d   d ataset  v ar iab ilit y .   T o   ad d r ess   th e  id e n tifie d   g a p s ,   th is   wo r k   p r o p o s es  Han d E f f iTr a n s - DR ,   a  lesi o n - awa r e  h y b r i d   d ee p   lear n in g   f r a m ewo r k   f o r   au t o m ated   DR   d et ec tio n .     T h e  p r o p o s ed   m eth o d   in tr o d u ce s   two   k ey   in n o v atio n s .   First,  a  lesi o n - p r io r - g u id ed   to k e n   s q u ee ze r   ( L PG - T S)  g en er ates  lesi o n - ce n tr ic  v is u al  to k en s   b y   ex p licitly   in co r p o r atin g   lesi o n   p r io r   m ap s   d er iv e d   f r o m   r etin al  p r e - p r o ce s s in g .   T h is   en s u r es  th at  to k en   r ep r esen tati o n s   ar e  s p atially   an ch o r ed   to   p ath o lo g ical  r e g io n s   r ath er   th an   u n if o r m ly   s am p le d   b ac k g r o u n d   ar ea s .   Seco n d ,   a  d ir ec ted   tr an s f o r m er - b ased   f u s io n   m ec h a n is m   ( T →V )   is   em p lo y ed ,   wh er e   h an d cr af ted   lesi o n   d escr ip to r s   g u id e  th e   atten tio n   r ef in em e n t  o f   v is u al  to k en s ,   en ab lin g   clin ically   m ea n in g f u l  cr o s s - m o d al  r ea s o n in g .   I n   ad d itio n ,   th e  f r am ewo r k   i n teg r ates  a  lesi o n   s u m m ar y   to k en   t o   p r eser v e  g lo b al  r etin al  c o n tex t  a n d   e m p lo y s   ca lib r atio n - awa r e  e v alu atio n   to   ass ess   th e   r eliab ilit y   o f   p r ed icted   p r o b ab ilit ies.  T h e  o v er all  ar ch itectu r e  is   d esig n ed   to   b alan ce   d is cr im in ativ e  p er f o r m an ce ,   in ter p r etab ilit y ,   an d   r o b u s tn ess ,   alig n in g   with   th e  p r ac tical  r eq u i r em en ts   o f   DR     s cr ee n in g   s y s tem s .       2.   M E T H O D   2 . 1 .     Da t a s et   cha ra c t er is t ics a nd   cla s s   im ba la nce  co ns ide ra t io n   Pu b lic  DR   d atasets   ar e  in h er en tly   class - im b alan ce d ,   wi th   n o r m al  o r   m ild   ca s es  s ig n if ican tly   o u tn u m b er in g   m o d er ate - to - s ev er e  d is ea s e  s am p les.  T h is   i m b alan ce   p o s es  a  m ajo r   ch a llen g e,   as  m o d els  tr ain ed   with o u t  ap p r o p r iate  c o n s id er atio n   m a y   ac h iev e  h ig h   ac cu r a cy   w h ile  u n d e r p er f o r m in g   o n   clin ically   cr itical  m in o r ity   class es.  I n   t h is   s tu d y ,   s tr atif ied   f iv e - f o ld   cr o s s - v alid atio n   is   em p lo y e d   to   p r eser v e   class   d is tr ib u tio n   ac r o s s   f o l d s ,   en s u r in g   f air   a n d   u n b iased   ev alu ati o n .     Mo r eo v er ,   p e r f o r m an ce   is   ass ess ed   u s in g   m ac r o - av er a g ed   m etr ics,  C o h en ’ s   k a p p a,   an d   ca lib r atio n   m ea s u r es,  wh ich   p r o v id e   a  m o r e  in f o r m ativ e   ass ess m en t  u n d er   i m b alan ce   co m p a r ed   to   ac cu r ac y   alo n e   [ 2 5 ] .  T h e  p r o p o s ed   f r am ewo r k   is   ev alu ated   o n   a  p r im a r y   DR   d ataset  an d   f u r th er   v alid ated   o n   in d ep en d en t  d atasets   to   ass es s   g en er aliza tio n   ac r o s s   d if f er en t   d ata  d is tr ib u tio n s .   B y   co m b in in g   lesi o n - awa r e  m o d elin g ,   d ir ec te d   f u s io n ,   an d   im b ala n ce - s en s itiv e  ev alu atio n ,   th e  p r o p o s ed   a p p r o ac h   aim s   to   d eliv er   a   r el iab le  an d   clin ically   m ea n in g f u l so lu tio n   f o r   a u to m ated   DR   s cr ee n in g .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 8 1 4   I n t J  Ad v   Ap p l Sci ,  Vo l.   1 5 ,   No .   3 ,  Sep tem b er   2 0 2 6 :   1 1 1 2 - 1 1 2 2   1114   2 . 2 .     O v er v iew  o f   t he  pro po s ed  f r a m ewo r k   T h e  p r o p o s ed   f r am ewo r k ,   r e f er r ed   t o   as  Han d E f f iTr an s - DR ,   is   a  lesi o n - awa r e  h y b r id   lear n in g   ar ch itectu r e  d esig n ed   f o r   ac c u r ate  an d   r elia b le  DR   d etec t io n   f r o m   r etin al  f u n d u s   im a g es.  T h e   co m p lete   p r o ce s s in g   p ip elin e  is   illu s tr ated   in   Fig u r e   1 ,   wh ich   p r esen ts   th e  en d - to - e n d   f lo w   f r o m   i m ag e  p r e - p r o ce s s in g   to   ca lib r ated   DR   p r ed ictio n .   T h e  ce n tr al  d esig n   p h ilo s o p h y   o f   th e  f r am ewo r k   is   to   en s u r e  th at  p ath o lo g ical  lesi o n   in f o r m atio n   is   ex p licitl y   em b e d d ed   in to   b o th   f ea tu r e   r ep r esen tatio n   an d   f u s io n   s tag es,  r ath er   th an   b ein g   im p licitly   lear n ed   th r o u g h   d e ep   n etwo r k s   alo n e.   T o   ac h ie v e  th is ,   t h e  f r am ewo r k   i n teg r ates  lesi o n - ce n tr ic  v is u al  to k en izatio n ,   h a n d cr af t ed   r etin al  d escr ip to r s ,   an d   a  d ir ec ted   tr an s f o r m er - b ased   f u s i o n   m ec h an is m .   As  s h o wn   in   Fig u r e  1 ,   th e  m et h o d o lo g y   co n s is ts   o f   f iv e  s eq u en tial  s tag es:  im ag e  p r e - p r o ce s s in g   an d   lesi o n   en h an ce m e n t,  p a r allel  d ee p   an d   h an d cr af ted   f ea tu r e  ex tr ac ti o n ,   lesi o n - p r io r - g u id ed   to k en   g en er atio n ,   d ir ec ted   tr an s f o r m er   f u s io n ,   an d   ca lib r ated   class if icatio n .   T h ese  s tag es  ar e  t ig h tly   co u p led   to   m ain tain   co n s is ten cy   b etwe en   p ath o l o g ical  ev id e n c e  an d   f in al  d ec is io n - m ak i n g .           Fig u r e  1 .   Ov e r all  Han d E f f iTr a n s - DR   f r am ewo r k   ar c h itectu r e       2 . 3 .     I ma g e  pre - pro ce s s ing   a nd   lesi o n e n ha ncem ent   E ac h   in p u t  f u n d u s   im ag e   is   f ir s t  r esized   to   a  f i x ed   s p ati al  r eso lu tio n   an d   n o r m alize d   to   r ed u ce   illu m in atio n   v ar iatio n s   co m m o n ly   o b s er v ed   ac r o s s   s cr ee n in g   d e v ices.  C o n tr ast  en h an ce m en t  is   ap p lied   t o   im p r o v e   th e  v is ib ilit y   o f   s u b tle  DR   m an if estatio n s   s u ch   a s   m icr o - an e u r y s m s   an d   h em o r r h a g es .   No is e  s u p p r ess io n   an d   m o r p h o lo g ic al  r ef in em en t  a r e  s u b s eq u e n tly   em p lo y ed   to   p r eser v e   lesi o n   b o u n d ar ies  wh ile   s u p p r ess in g   b ac k g r o u n d   ar tef ac ts .   T h is   s tag e  p r o d u ce s   an   en h an ce d   r etin al  im ag e  th at  s u p p o r ts   b o th   d ee p   f ea tu r e  ex tr ac tio n   an d   lesi o n   lo ca lizatio n .   T h e  lesi o n   e n h a n ce m en t  p r o ce s s   also   g en er at es  a  b in ar y   lesi o n   m ask ,   wh ich   is   later   tr an s f o r m ed   in to   a  lesi o n   p r i o r   m ap .   I m p o r ta n tly ,   th is   lesi o n   p r i o r   is   n o t  tr ea ted   as  an   au x iliar y   o u tp u t;  in s tead ,   it   p lay s   a  d ir ec t   r o l e   in   g u id in g   r ep r esen tatio n   lear n in g ,   f o r m i n g   a   f o u n d atio n al   co m p o n en t o f   th e  p r o p o s ed   m eth o d o lo g y .     2 . 4 .     Dee p f e a t ure  ex t r a ct io n   a nd   lesi o n prio r  m o dellin g   Dee p   v is u al  f ea tu r es  ar e  e x tr ac ted   u s in g   a  p r etr ain ed   E f f i cien tNet - B 0   b ac k b o n e,   wh ic h   r em ain s   f r o z en   d u r i n g   tr ai n in g   to   p r e s er v e  g en er aliza b le  r etin al  r e p r esen tatio n s .   Fo r   a   g iv e n   p r e - p r o ce s s ed   f u n d u s   im ag e  ,   th e  b ac k b o n e  p r o d u ce s   a  s p atial  f ea tu r e  m ap   ,  as d ef in ed   in   ( 1 ) .     = ( ) ∈ ℝ × ×     ( 1 )     W h er e    an d     d en o te  t h e  s p atial  d im en s io n s   o f   th e  f ea tu r e  m ap ,   an d     r ep r esen ts   th e  c h an n el   d ep th .   T h is   f ea tu r e  m ap   r etain s   b o th   s em a n tic  an d   s p atial  in f o r m atio n   r e lev an t  to   DR   p ath o lo g y .   I n   p a r allel,   th e  en h an ce d   lesi o n   m ask   is   r esized   to   m at ch   th e   s p atial  r eso lu tio n   o f   ,   f o r m in g   a   lesi o n   p r io r   m ap   ∈ ℝ × × 1 .   T h e  co ex is ten ce   o f     an d     en ab les  th e   f r am ewo r k   t o   r ea s o n   jo i n tly   a b o u t  lear n ed   r etin al  s em an tics   an d   ex p licitly   lo ca lized   lesi o n   r eg io n s ,   wh ich   is   ess en tial f o r   p ath o lo g y - aw ar e  m o d ellin g .     2 . 5 .     L esio n - prio r - g ui ded t o ken sq ueez er   T o   tr an s f o r m   s p atial  f ea tu r e   m ap s   in t o   a   co m p ac t  y et   p ath o l o g y - f o cu s ed   r ep r esen tatio n ,   th e   f r am ewo r k   em p lo y s   L PG - T S,  as  illu s tr ated   in   Fig u r e  2 .   Un lik e  c o n v e n tio n al  p o o l in g   o r   p atch - b ased   to k en izatio n ,   L PG - T S  g en er a tes  les io n - ce n tr ic  v is u al  to k en s   b y   ad ap tiv ely   f u s in g   b ac k b o n e  s alien cy   an d   lesi o n   p r io r   in f o r m atio n .   T h e  f u s io n   p r o ce s s   is   g o v e r n ed   b y   s et  o f   lear n a b le  g ates a n d   is   f o r m u lated   as   in   ( 2 ) .     = ( ) ⊙  ( ) + ( 1 − ( ) ) ⊙  ( )   ( 2 )     W h er e   ( ⋅ )   an d    ( ⋅ )   ar e  1   ×   1   co n v o lu tio n al  p r o jectio n   o f   th e  f ea t u r e  m ap   an d   lesi o n   p r io r   m a p ,   r esp ec tiv ely ;    d en o tes  lear n ab le  g atin g   p ar am eter s ;  an d   ( ⋅ )   r ep r esen ts   th e  s ig m o id   ac tiv atio n .     T h is   f o r m u latio n   en a b les  th e  m o d el  to   d y n am ically   b ala n ce   lear n ed   v is u al  s alien cy   an d   ex p licit  lesi o n   ev id en ce ,   d ep en d in g   o n   im ag e   q u ality   an d   lesi o n   p r o m in en c e.   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ad v   Ap p l Sci     I SS N:   2252 - 8 8 1 4       Les io n - s ema n tic  to ke n   g u id e d   tr a n s fo r mer fu s io n   fo r   s ta g e - a d a p tive  d ia b etic  r etin o p a th y   …   ( Mu r a li Gu jju la )   1115   Sp atial  s o f tm ax   is   ap p lied   to   th e  f u s ed   s co r e  m ap   S  to   o b t ain   n o r m alize d   atten tio n   weig h ts .   T h ese  weig h ts   ar e  th en   u s ed   to   a g g r eg ate  s p atial  f ea tu r es  in to   a  f i x ed   n u m b er   o f   lesi o n - ce n t r ic  to k en s .   T h is   p r o ce s s   en s u r es  th at  th e   r esu ltin g   to k e n   s eq u en ce   co n ce n tr ates  r e p r e s en tatio n al  ca p ac ity   o n   clin ica lly   r elev an t   r eg io n s   r ath er   th an   u n if o r m ly   s am p le d   b ac k g r o u n d   ar ea s .           Fig u r e  2 .   Sch em atic  d iag r am   o f   th e  L PG - TS       2 . 6 .     H a nd cr a f t ed  f ea t ure  mo dellin g   a nd   lesi o n  s um m a ry   t o k en   I n   p ar allel  with   d ee p   f ea t u r e  p r o ce s s in g ,   h an d cr a f ted   r etin al  d escr ip to r s   ca p tu r i n g   tex tu r e   ch ar ac ter is tics   an d   lesi o n   p r o x y   s tatis tics   ar e  ex tr ac ted .   T h ese  d escr ip to r s   en c o d e  clin i ca lly   in ter p r etab le   in f o r m atio n   s u ch   as  in ten s ity   v ar iatio n ,   s tr u ctu r al  ir r eg u lar it y ,   an d   lesi o n   co m p o n en t  d is tr ib u tio n .   T o   en a b le  in ter ac tio n   with   tr an s f o r m er - b ased   atten tio n ,   th e  h an d cr af te d   f ea tu r e  v ec t o r   is   p r o jecte d   i n to   th e  s am e  laten t   em b ed d in g   s p ac e  an d   r ep licat ed   to   f o r m   a  s eq u e n ce   o f   h an d cr af ted   to k e n s ,   as illu s tr ated   in   Fig u r e  3 .           Fig u r e  3 .   L esio n   s u m m ar y   to k en   an d   h an d c r af ted   to k en   m o d ellin g       Ad d itio n ally ,   a  lesi o n   s u m m ar y   to k e n   is   g en er ate d   f r o m   th e   b ac k b o n e  f ea tu r e   m ap   u s in g   li g h tweig h t  co n v o l u tio n ,   f o llo wed   b y   g l o b al  av er ag e   p o o lin g   an d   l in ea r   p r o jectio n .   T h is   t o k en   p r eser v es   g lo b al     r etin al  co n tex t  th at  m ay   n o t  b e  f u lly   ca p tu r ed   b y   lesi o n - c en tr ic  to k en s   alo n e.   T o g eth er ,   th e  lesi o n - ce n tr ic   to k en s ,   lesi o n   s u m m ar y   to k e n ,   an d   h an d c r af ted   to k e n s   f o r m   a   u n if ie d   m u ltimo d al  t o k en   s et  s u itab le  f o r   tr an s f o r m er - b ased   f u s io n .     2 . 7 .     Dire ct ed  t r a ns f o rm er   f u s io n   C r o s s - m o d al  in teg r atio n   is   p e r f o r m e d   u s in g   a  d ir ec ted   tr a n s f o r m er   f u s io n   m e ch an is m ,   as  s h o wn   in   Fig u r e  4 .   I n   th is   d esig n ,   v is u al  to k en s   ac t  as  q u er ies,  wh ile  h an d cr a f ted   to k e n s   s er v e  as  k ey s   an d   v alu es.     T h is   d ir ec tio n ality   en s u r es  t h at  h an d cr af te d   lesi o n   d escr ip to r s   ac tiv ely   g u i d e  th e   r ef in em en t  o f   v is u al   r e p r ese n t ati o n s ,   r at h e r   t h a n   b ei n g   p ass i v el y   co n ca t en at ed .   T h e  d i r e cte d   at te n ti o n   o p e r a ti o n   i s   d ef in e d   as   i n   ( 3 ) .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 8 1 4   I n t J  Ad v   Ap p l Sci ,  Vo l.   1 5 ,   No .   3 ,  Sep tem b er   2 0 2 6 :   1 1 1 2 - 1 1 2 2   1116    ( , , ) =   (  √ )   ( 3 )     W h er e    co r r esp o n d s   to   lesi o n - ce n tr ic  v is u al  to k en s ,     an d     co r r esp o n d   to   h a n d cr af te d   to k en s ,   an d     d en o tes  th e  k ey   d im en s io n ality .   R esid u al  co n n ec tio n s   an d   f ee d - f o r war d   r e f in em en t  ar e  ap p lied   to     s tab ilize   tr ain in g   an d   en h an ce   r ep r esen tatio n al  ex p r ess iv en ess .   T h is   f u s io n   s tr ateg y   en ab les  clin ically   m ea n in g f u l  cr o s s - m o d al  r ea s o n in g   b y   allo win g   h a n d cr af te d   lesi o n   k n o wled g e  t o   d i r ec tly   in f lu e n ce   v is u al   atten tio n   d y n am ics.           Fig u r e  4 .   Dir ec ted   tr an s f o r m er   f u s io n   m ec h an is m       2 . 8 .     Cla s s if ica t io n a nd   ca lib ra t io n a s s ess m ent   T h e  f u s ed   r ep r esen tatio n   o b tain ed   af ter   tr an s f o r m e r   f u s io n   is   p ass ed   th r o u g h   a  d en s e  cla s s if icatio n   h ea d   f o llo wed   b y   a  s o f tm a x   lay er   to   p r o d u ce   DR   class   p r o b ab ilit ies.  B ey o n d   s tan d ar d   d is cr im in atio n   p er f o r m an ce ,   t h e  f r am ew o r k   ex p licitly   ev alu ates  p r e d ictio n   co n f id en ce   an d   ca lib r atio n ,   as  illu s tr ated   in   Fig u r e  5 .   C o n f i d en ce   s co r es  a r e  an aly ze d   u s in g   ex p ec te d   ca lib r atio n   er r o r   ( E C E )   an d   B r ier   s co r e  to   q u an tify   th e  alig n m en t  b etwe en   p r e d icted   p r o b ab ilit ies an d   o b s er v ed   ac cu r ac y .           Fig u r e  5 .   C lass if icatio n   an d   ca lib r atio n   ev alu atio n   p ip elin e       T h is   ca lib r atio n - awa r e  e v alu atio n   en s u r es  th at  th e   p r o p o s ed   s y s tem   n o t  o n ly   ac h i ev es  h ig h   class if icatio n   p er f o r m an ce   b u t  also   p r o v id es  r eliab le  c o n f id en ce   esti m ates,  wh ich   ar e  cr it ical  f o r   r ea l - wo r ld   DR   s cr ee n in g   an d   r ef er r al  wo r k f lo ws.  T h e  p r o p o s ed   m eth o d o lo g y   in teg r ates le s io n   ev id en ce   at  b o th   th e  to k e n   g en er atio n   le v el  an d   th e  f u s io n   lev el,   en s u r in g   th at  p ath o lo g ical  in f o r m atio n   ac tiv ely   s h a p es  r ep r esen tatio n   lear n in g .   T h e  L PG - T S  m ec h an is m   in tr o d u ce s   lesi o n - ce n tr ic  to k en izatio n ,   wh ile  th e   d i r ec ted   tr an s f o r m er   f u s io n   en f o r ce s   clin ically   g u i d ed   cr o s s - m o d al  in te r ac tio n .   T o g eth er ,   th ese  d esig n   ch o ice s   y ield   a  c o h er e n t,  in ter p r etab le,   a n d   r o b u s t D R   d etec tio n   f r am ewo r k   th at  alig n s   with   p r ac tical  s cr ee n in g   r eq u i r em en ts .       3.   RE SU L T S AN D  D I SCU SS I O N   T h e  ex p er im en tal  ev alu atio n   o f   th e  p r o p o s ed   Han d E f f iTr a n s - DR   f r am ewo r k   is   s tr u ctu r ed   to   an aly ze   m o d el  b e h av io r   at  th r ee   c o m p lem en tar y   lev els:   i )   f o l d - wis e  lear n in g   d y n am ics  an d   d is cr im in ativ e   p er f o r m an ce ,   ii)  c r o s s - f o ld   r o b u s tn ess   an d   ca lib r atio n   co n s is ten cy ,   an d   iii)  g e n er aliza tio n   o n   i n d ep e n d en t   v alid atio n   d atasets .   T h is   m u lti - lev el  an aly s is   en s u r es  th at  th e  r ep o r ted   p e r f o r m an ce   is   n o t  c o n f in ed   to   a  s in g le  d ata  s p lit .  I t in s tead   r ef lects   s tab le  an d   clin ically   m ea n in g f u l   b eh av io r   ac r o s s   v ar y in g   d ata  d is tr ib u tio n s .     3 . 1 .     F o ld - wis e  t ra ini ng   dy na m ics a nd   co nv er g ence   beha v io r   T h e  lear n in g   b eh a v io r   o f   th e   p r o p o s ed   m o d el  is   f ir s t  an aly ze d   u s in g   t h e  tr ain in g   an d   v alid atio n   ac cu r ac y   an d   lo s s   cu r v es  o b tai n ed   f r o m   f o ld - 1 ,   as  s h o wn   in   Fig u r e  6 .   As  o b s er v ed   in   Fig u r e  6 ( a) ,   th e  tr ain in g   an d   v alid atio n   ac cu r ac y   c u r v es  ex h ib it  a  r a p id   i n cr ea s e  d u r in g   t h e  in itial  ep o ch s ,   f o llo wed   b y   a  g r ad u al   s tab ilizatio n ,   in d i ca tin g   ef f ici en t  f ea tu r e  lear n in g   an d   co n v er g en ce .   I m p o r tan tly ,   th e  v alid atio n   ac cu r ac y   clo s ely   f o llo ws  th e  tr ain in g   ac cu r ac y   with o u t  s ig n if ica n t  d iv er g en ce ,   s u g g esti n g   th at   th e  m o d el  av o i d s   o v er f itti n g   d esp ite  its   h y b r id   a r ch itectu r e.   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ad v   Ap p l Sci     I SS N:   2252 - 8 8 1 4       Les io n - s ema n tic  to ke n   g u id e d   tr a n s fo r mer fu s io n   fo r   s ta g e - a d a p tive  d ia b etic  r etin o p a th y   …   ( Mu r a li Gu jju la )   1117   C o m p lem en tar y   e v id en ce   is   p r o v id e d   b y   th e   lo s s   cu r v es  i n   Fig u r e  6 ( b ) ,   wh er e   b o t h   tr ain in g   an d   v alid atio n   l o s s es  d ec r ea s e  m o n o to n ically   an d   s tab ilize   at  l o w  v alu es.  T h e  a b s en ce   o f   o s cillato r y   b e h av io r   o r   late - ep o ch   d iv e r g en ce   d e m o n s tr ates  th at  th e  les io n - p r io r - g u i d ed   to k en izat io n   an d   d ir ec te d   tr an s f o r m er   f u s io n   d o   n o t   in tr o d u ce   tr ain in g   i n s tab ilit y ,   ev en   wh en   m u lti p le  in f o r m atio n   s tr ea m s   ar e   f u s ed .   T h is   s tab le  co n v er g en ce   is   p ar ticu la r ly   r elev an t  f o r   m ed ical  im ag e   a n aly s is ,   wh er e  o v er - p ar am ete r ized   m o d els  o f ten   s u f f er   f r o m   p o o r   g en er aliza tio n .           ( a)   ( b )     Fig u r e  6 .   L ea r n in g   b eh a v io r   o f   th e  p r o p o s ed   m o d el  ac r o s s   ep o ch s   ( f o ld - 1 ) : ( a)   tr ai n in g   a n d   v alid atio n   ac cu r ac y   an d   ( b )   tr ain in g   an d   v alid atio n   lo s s       3 . 2 .     F o ld - wis e  dis cr im ina t iv e  perf o rm a nce  a nd   cla s s - lev el  a na ly s is   T h e  class - lev el  d is cr im in ativ e   b eh av i o r   o f   t h e  m o d el  f o r   f o ld - 1   is   an aly ze d   u s in g   th e  n o r m alize d   co n f u s io n   m atr ix   s h o wn   in   Fi g u r e  7   a n d   th e  c o r r esp o n d in g   o p er atin g   c h ar ac ter is tics   r ep o r ted   in   T ab le  1 .   T h e   co n f u s io n   m atr ix   r ev ea ls   a  s tr o n g   d iag o n al   d o m in an ce ,   with   h ig h   co r r ec t   class if icatio n   r ates  f o r   b o th   DR   an d   n o - DR   class e s .   Qu an titativ el y ,   T ab le  1   r ep o r ts   a  f o ld - 1   a cc u r ac y   o f   0 . 9 5 1 7 ,   with   a  s en s itiv ity   ( r ec all)   o f   0 . 9 7 5 7   f o r   t h e  DR   class   an d   a   s p ec if icity   o f   0 . 9 1 3 4   f o r   th e  n o - DR   class .   T h is   b alan ce   in d i ca tes  th at  th e  m o d el  ef f ec tiv ely   p r io r itizes   DR   d ete ctio n   wh ile  m ain tain in g   r ea s o n ab le  s p ec if icity ,   wh ich   is   ess en tial  f o r   s cr ee n in g   s ce n ar io s   wh er e  f alse n eg ativ e s   ar e  clin ically   co s tly .           Fig u r e  7 .   No r m alize d   co n f u s io n   m atr ix   ( f o ld - 1 ,   DR   v s   No - D R )   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 8 1 4   I n t J  Ad v   Ap p l Sci ,  Vo l.   1 5 ,   No .   3 ,  Sep tem b er   2 0 2 6 :   1 1 1 2 - 1 1 2 2   1118   T ab le  1 .   Fo ld - 1   o p er atin g   c h ar ac ter is tics   M e t r i c   F o r mu l a   ( u si n g   D R   a s   p o si t i v e )   V a l u e   C o u n t s   TP   =   3 6 1 ,   F N   =   9 ,   F P   =   2 0 ,   TN   =   2 1 1 ,   N   =   601   —   A c c u r a c y   ( TP   +   TN )   /   N   0 . 9 5 1 7   S e n s i t i v i t y   /   R e c a l l   ( D R )   TP   /   ( TP   +   F N )   0 . 9 7 5 7   S p e c i f i c i t y   ( no - D R )   TN   /   ( TN   +   FP)   0 . 9 1 3 4   P r e c i s i o n   ( D R )   TP   /   ( TP   +   FP)   0 . 9 4 7 5   F 1   ( D R )   2 · TP   /   ( 2 · TP   +   FP   +   F N )   0 . 9 6 1 4   P r e c i s i o n   ( no - D R )   TN   /   ( TN   +   F N )   0 . 9 5 9 1   R e c a l l   ( no - D R )   TN   /   ( TN   +   FP)   0 . 9 1 3 4   F1 - sc o r e   ( no - D R )   2 · TN   /   ( 2 · TN   +   FN   +   FP)   0 . 9 3 5 7   M a c r o - F 1   ( F o l d - 1)   M e a n   ( F 1 _ D R ,   F 1 _ N o - D R )   0 . 9 4 8 6       T h e  ac h iev ed   p er f o r m a n ce   o f   ea ch   class   alig n s   well  with   p r ev io u s   lesi o n - awa r e  an d   atten t io n - b ased   r esear ch   in   DR   d etec tio n ,   wh ich   s tated   th at  d is cr im in ati o n   was  en h an ce d   th r o u g h   h ig h lig h tin g   lesi o n s     [ 1 6 ] ,   [ 2 1 ] .   T h is   s ig n if ies  th at   th e  d ev elo p e d   f r am ewo r k   s u cc ess f u lly   h ig h lig h ts   clin icall y   im p o r tan t  r etin al   lesi o n s .   Fu r th er   in s ig h t   is   o b t ain ed   f r o m   t h e  class - wis e  F1   s co r es.  T h e   DR   class   ac h iev es  an   F1 - s co r e   o f   0 . 9 6 1 4 ,   wh ile  th e  n o - DR   class   attain s   an   F1 - s co r e  o f   0 . 9 3 5 7 ,   r esu ltin g   in   a  m ac r o - F1   o f   0 . 9 4 8 6 .   T h ese  r esu lts   d em o n s tr ate  th at  th e  m o d el  d o es  n o t  ex h ib it  class   b ias  an d   m ain tain s   co n s is ten t  p er f o r m an ce   ac r o s s   b o th   p ath o lo g ical  an d   n o n - p ath o lo g ical  s am p les.  T h is   b eh av io r   ca n   b e  attr ib u ted   to   th e  le s io n - ce n tr ic  to k en   g en er atio n ,   wh ich   ex p licitly   e m p h asizes   p ath o lo g ical  r e g io n s   with o u t su p p r ess in g   g lo b al  r etin al  co n tex t.     3 . 3 .     Dis cr im ina t iv e  po wer   a nd   pro ba bil i s t ic  re lia bil it y   B ey o n d   ac cu r ac y - b ased   ev al u atio n ,   th e   d is cr im in ativ e  ca p ab ilit y   o f   th e  p r o p o s ed   f r a m ewo r k   is   an aly ze d   u s in g   r ec ei v er   o p e r at in g   ch ar ac ter is tic  ( R OC )   an d   p r ec is io n – r ec all  ( PR )   cu r v es.  T h e  R OC   cu r v e  f o r   f o ld - 1 ,   as  s h o wn   in   Fig u r e   8 ,   y ield s   an   AUROC   o f   ap p r o x i m ately   0 . 9 9 4 ,   in d icatin g   ex ce llen t  class   s ep ar ab ilit y .   Hig h   AUROC   v alu es  ar e  p a r ticu lar ly   im p o r ta n t  in   DR   s cr ee n i n g ,   as  th ey   r ef lect  th e  m o d el’ s   ab ilit y   to   r an k   p ath o l o g ical  im ag es a b o v e  n o n - p ath o l o g ical  o n es a cr o s s   a  wid e  r an g e  o f   d ec is io n   th r esh o ld s .           Fig u r e  8 .   R OC   cu r v e  with   AU R OC   ( f o ld - 1)       E v alu atio n   r esu lts   f o r   th e  Han d E f f iTr a n s - DR   alg o r ith m   in   ter m s   o f   d is cr im in atio n   q u ality   an d   p r o b a b ilit y   ca lib r atio n   ar e   s h o wn   in   Fig u r e  9 .   I n   Fig u r e  9 ( a ) ,   th e  PR   cu r v e  is   d ep icted ,   w h er ea s   Fig u r e  9 ( b )   d is p lay s   th e  r eliab ilit y   d iag r am .   T h e  ar ea   u n d e r   th e  p r ec is io n – r ec all  cu r v e   ( AUPR C )   is   q u ite  h ig h     ( AUPR C   ≈   0 . 9 9 4 ) .   T h e  latter   f ac t  in d icate s   g o o d   tr ad e - o f f   PR   p r o p er ties   f o r   th e  DR   clas s .   T h e  m o r e  im p o r tan t   p o in t   is   th at  t h e  r eliab ilit y   d iag r am   in d ica tes  a   g o o d   m atch   b etwe en   p r ed ic ted   p r o b ab ilit y   an d   em p ir ical  ac cu r ac y .   T h is   o b s e r v atio n   is   q u an titativ ely   s u p p o r ted   b y   th e  d is cr im in ativ e  an d   ca lib r atio n   m etr ics  r ep o r ted   in   T ab le   2 ,   wh er e   th e  E C E   an d   B r ier   s co r e   r em ain   lo w   ( 0 . 0 2 5   an d   0 . 0 5 8 ,   r esp ec tiv ely ) .     Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ad v   Ap p l Sci     I SS N:   2252 - 8 8 1 4       Les io n - s ema n tic  to ke n   g u id e d   tr a n s fo r mer fu s io n   fo r   s ta g e - a d a p tive  d ia b etic  r etin o p a th y   …   ( Mu r a li Gu jju la )   1119   Su ch   ca lib r atio n   b eh av i o r   is   cr itical  f o r   clin ical  d ec is io n   s u p p o r t  s y s tem s ,   wh er e  p r ed icted   co n f id en ce   o f ten   in f o r m s   r ef er r al  th r esh o ld s   an d   f o llo w - u p   ac tio n s .   T h e   AU R OC   an d   ca lib r atio n   m etr ics  ar e  s im ilar   to   o th er   s tate - of - th e - ar t  DR   d etec to r   b ased   o n   tr an s f o r m e r s   [ 1 7 ] ,   a n d   th e  E C E   an d   B r ier   s co r es  ar e  co n s is ten t  with   r ec e n t  s tu d ies  em p h asizin g   th e  n ec ess ity   o f   a  well - ca lib r ated   d ee p   lear n in g   m o d el  in   h ea lth ca r e     d ec is io n - m ak in g   s y s tem s   [ 2 0 ] ,   [ 2 5 ] .           ( a)   ( b )     Fig u r e  9 .   Per f o r m an c e  ev alu at io n   o f   t h e  p r o p o s ed   f r am ewo r k : ( a)   PR   cu r v e   a n d   ( b )   r eliab il ity   ( ca lib r atio n )       T ab le  2 .   Fo ld - 1   d is cr im in ativ e   an d   ca lib r atio n   m etr ics   M e t r i c   V a l u e   A U R O C   0 . 9 9 4   A U P R C   0 . 9 9 4   EC E   0 . 0 2 5   B r i e r   s c o r e   0 . 0 5 8       3 . 4 .     Cro s s - f o ld ro bu s t nes s   a nd   s t a bil it y   a na ly s is   T o   ass ess   r o b u s tn ess   ac r o s s   d if f er en t  d ata  p ar titi o n s ,   f iv e - f o ld   cr o s s - v alid atio n   r esu lts   ar e   s u m m ar ized   in   T ab le  3 .   T h e  m ea n   ac cu r ac y   ac r o s s   f iv e  f o ld s   is   0 . 9 6 5 3   with   a  s tan d ar d   d ev iatio n   o f   0 . 0 0 8 3 ,   wh ile  th e  m ea n   m ac r o - F1   s c o r e  is   0 . 9 6 5 3   with   a  s im ilar ly   lo w  v ar ian ce .   T h ese  r esu lt s   in d icate   th at  th e   p r o p o s ed   f r a m ewo r k   m ain tai n s   s tab le  p er f o r m an ce   ac r o s s   f o ld s   an d   is   n o t  o v er ly   s en s itiv e  to   s p ec if ic     tr ain – test   s p lits .   C o n s is ten tly   h ig h   AURO C   ( m ea n   0 . 9 9 3 1 )   a n d   AUPR C   ( m ea n   0 . 9 9 3 7 )   v alu es  ac r o s s   f o ld s   f u r th er   co n f ir m   t h e  r o b u s tn ess   o f   th e  d is cr im in ativ e  ca p a b ilit y .   T h e  r elativ ely   lo w   s tan d ar d   d e v iatio n   o f   C o h en ’ s   k ap p a  ( 0 . 0 1 6 7 )   s u g g ests   s tr o n g   ag r ee m e n t  b ey o n d   ch an ce   a cr o s s   all  f o ld s ,   r ein f o r cin g   t h e  r eliab ilit y   o f   th e   m o d el.   I m p o r tan tly ,   ca lib r atio n   m etr ics  s u c h   as  E C E   an d   B r ier   s co r e  r em ain   l o w  an d   s tab le  ac r o s s   f o ld s ,   d em o n s tr atin g   t h at  p r o b ab ilit y   esti m ates a r e  co n s is ten tly   r eliab le  an d   n o t c o n f in ed   t o   a  s in g le  f av o r a b l e  s p lit.       T ab le  3 .   C r o s s - f o ld   p er f o r m an ce   s u m m ar y   ( 5   f o ld s )   M e t r i c   M e a n   S t d .   d e v i a t i o n   A c c u r a c y   0 . 9 6 5 3 1 8   0 . 0 0 8 3 4 5   M a c r o - F1   0 . 9 6 5 3 0 3   0 . 0 0 8 3 4 6   A U R O C   0 . 9 9 3 0 9 4   0 . 0 0 2 0 9   A U P R C   0 . 9 9 3 7 1 7   0 . 0 0 1 3 8 2   C o h e n ’ s  k a p p a   0 . 9 3 0 6 2   0 . 0 1 6 6 7 9   EC E   0 . 0 2 4 9 4 5   0 . 0 0 7 4 9 4   B r i e r   s c o r e   0 . 0 5 7 8 4   0 . 0 1 2 6 2 8       3 . 5 .     E x t er na l  v a lid a t io n a nd   g ener a liza t io n   ca pa bil it y   T o   ev alu ate   g en e r aliza tio n   b ey o n d   th e   p r im a r y   d ataset,   th e  tr ain e d   m o d el  is   test e d   o n   two   in d ep en d en t v alid atio n   d atasets .   T h e  p er f o r m an ce   o n   v alid ati o n _ d ataset - 1   is   r ep o r ted   in   T a b le  4 ,   wh ile  r esu lts   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 2 5 2 - 8 8 1 4   I n t J  Ad v   Ap p l Sci ,  Vo l.   1 5 ,   No .   3 ,  Sep tem b er   2 0 2 6 :   1 1 1 2 - 1 1 2 2   1120   on  v alid atio n _ d ataset - 2   ar e   p r esen ted   in   T ab le   5 .   On   v alid atio n _ d ataset - 1 ,   th e  m o d el  ac h iev es  a   m ea n   ac cu r ac y   o f   0 . 9 5 6 8   an d   a  m ac r o - F1 - s co r e  o f   0 . 9 5 6 0 ,   wit h   AURO C   an d   AUP R C   v alu es  ex ce ed in g   0 . 9 9 .   Alth o u g h   a  s lig h t   r ed u ctio n   i s   o b s er v ed   co m p ar ed   to   t h e  p r im ar y   d ataset,   th e  p er f o r m an ce   r em ain s   s tr o n g ,   in d icatin g   ef f ec tiv e   tr an s f er ab i lity .   Similar ly ,   v alid atio n _ d ataset - 2   y ield s   a  m ea n   ac cu r ac y   o f   0 . 9 6 2 7   an d   m ac r o - F1   o f   0 . 9 6 2 1 ,     with   AURO C   an d   AUPR C   v alu es  o f   0 . 9 9 2 4   a n d   0 . 9 9 2 8 ,   r esp ec tiv ely .   T h e  ca lib r atio n   m etr ics  o n   b o th   v alid atio n   d atasets   r em ain   c o m p ar ab le   to   t h o s e  o b s er v ed   d u r in g   cr o s s - v alid atio n ,   s u g g esti n g   th at   th e  m o d el   d o es  n o t  e x h ib it  o v er co n f id e n t  p r ed ictio n s   wh en   ex p o s ed   to   u n s ee n   d ata  d is tr ib u tio n s .   T h is   b eh a v io r   is   p ar ticu lar ly   im p o r tan t  f o r   r e al - wo r ld   d e p lo y m e n t,  wh er e   v ar iatio n s   in   ac q u is itio n   d ev ices  an d   p atien t   d em o g r a p h ics   ar e  in e v itab le.       T ab le  4 .   Valid atio n   p er f o r m an ce   o n   v alid atio n _ d ataset - 1   M e t r i c   M e a n   S t d .   d e v i a t i o n   A c c u r a c y   0 . 9 5 6 8 4   0 . 0 0 9 2 1 5   M a c r o - F1   0 . 9 5 5 9 9   0 . 0 0 9 4 8 7   A U R O C   0 . 9 9 0 7 5   0 . 0 0 2 6 4 1   A U P R C   0 . 9 9 1 1   0 . 0 0 2 0 7 8   C o h e n ’ s   k a p p a   0 . 9 1 5 6 7   0 . 0 1 8 3 9 2   EC E   0 . 0 2 8 9 1   0 . 0 0 6 9 2 8   B r i e r   S c o r e   0 . 0 6 2 3 4   0 . 0 1 1 8 5 3       T ab le  5 .   Valid atio n   p er f o r m an ce   o n   v alid atio n _ d ataset - 2   M e t r i c   M e a n   S t d .   d e v i a t i o n   A c c u r a c y   0 . 9 6 2 7 3   0 . 0 0 8 7 4 9   M a c r o - F1   0 . 9 6 2 1 4   0 . 0 0 8 6 8 1   A U R O C   0 . 9 9 2 4 1   0 . 0 0 2 3 7 1   A U P R C   0 . 9 9 2 8 2   0 . 0 0 1 7 3 1   C o h e n ’ s  k a p p a   0 . 9 2 4 5 8   0 . 0 1 7 1 5 6   EC E   0 . 0 2 6 1 2   0 . 0 0 6 8 4 5   B r i e r   S c o r e   0 . 0 5 9 1   0 . 0 1 2 0 0 1       3 . 6 .     Co m pa ra t iv e  perf o r m a nce  a cr o s s   da t a s et s   A  co n s o lid ated   co m p ar is o n   o f   p er f o r m a n ce   ac r o s s   th e  p r im a r y   d ataset  an d   b o th   v ali d atio n   d atasets   i s   p r o v id e d   i n   T a b le  6 .   T h e   t ab le  h ig h lig h ts   th at   th e  p r o p o s ed   f r am ewo r k   m ain tai n s   co n s is ten tly   h i g h   p er f o r m an ce   ac r o s s   all  d atasets ,   with   ac cu r ac y   an d   m ac r o - F 1   v alu es  r em ain i n g   ab o v e  0 . 9 5   an d   d is cr im in ativ e  m etr ics  co n s is ten tly   ex ce ed i n g   0 . 9 9 .   W h ile  a  m o d est  d eg r a d atio n   is   o b s er v ed   o n   e x ter n al   d atasets ,   th e  d r o p   is   lim ited   an d   ex p ec ted ,   in d icatin g   s tr o n g   g en e r aliza tio n   r ath er   th an   d ataset - s p ec if ic  o p tim iza tio n .       T ab le  6 .   Ov e r all  av er ag e d   p er f o r m an ce   c o m p ar is o n   ac r o s s   d atasets   D a t a s e t   A c c u r a c y   M a c r o - F1   A U R O C   A U P R C   C o h e n ’ s  k a p p a   EC E   B r i e r   s c o r e   P r i mary   d a t a set   ( 5 - f o l d )   0 . 9 6 5 3   0 . 9 6 5 3   0 . 9 9 3 1   0 . 9 9 3 7   0 . 9 3 0 6   0 . 0 2 4 9   0 . 0 5 7 8   V a l i d a t i o n   d a t a se t - 1   0 . 9 5 6 8   0 . 9 5 6   0 . 9 9 0 8   0 . 9 9 1 1   0 . 9 1 5 7   0 . 0 2 8 9   0 . 0 6 2 3   V a l i d a t i o n   d a t a se t - 2   0 . 9 6 2 7   0 . 9 6 2 1   0 . 9 9 2 4   0 . 9 9 2 8   0 . 9 2 4 6   0 . 0 2 6 1   0 . 0 5 9 1       Ov er all,   th ese  f in d in g s   ar e  co n s is ten t  with   r ec en t  C N N - tr an s f o r m er   h y b r id   f r am ewo r k s   f o r   r etin al   d is ea s e  an aly s is   [ 1 4 ] ,   [ 1 7 ] .   T h e  p r o p o s ed   Ha n d E f f iT r an s - D R   f r am ewo r k   f u r th er   s tr en g th e n s   th ese  ap p r o ac h es  b y   in teg r atin g   lesi o n - g u id ed   t o k en izatio n   with   d ir ec ted   tr a n s f o r m er   f u s io n ,   r esu ltin g   in   r o b u s t  an d   r eliab le   DR   d etec tio n .   T h e  f o ld - wis e  s tab ilit y ,   co m b in ed   with   s tr o n g   ex ter n al  v alid atio n   p er f o r m an ce ,   s u p p o r ts   th e  f r am ewo r k ’ s   s u itab ilit y   f o r   DR   s cr ee n in g   s ce n ar io s   wh er e  co n s is ten t  b eh av io r   ac r o s s   p o p u latio n s   an d   r eliab le   co n f id en ce   esti m atio n   ar e  ess en tial.       4.   CO NCLU SI O N   T h is   wo r k   p r esen ted   Han d E f f iTr an s - DR ,   a  lesi o n - awa r e   h y b r i d   f r a m ewo r k   f o r   au to m ated   DR   d etec tio n   th at  e x p licitly   in teg r ates  p ath o lo g ical  p r io r s   i n to   b o th   r ep r esen tatio n   lear n i n g   an d   f ea tu r e  f u s io n   s tag es.  B y   in tr o d u cin g   a  le s io n - g u id ed   to k en izatio n   s tr ateg y   an d   a  d ir ec ted   tr a n s f o r m er - b ased   f u s io n   m ec h an is m ,   th e   p r o p o s ed   ap p r o ac h   e n s u r es  th a t  clin ically   r elev an t  lesi o n   in f o r m atio n   ac t iv ely   in f lu e n ce s   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Ad v   Ap p l Sci     I SS N:   2252 - 8 8 1 4       Les io n - s ema n tic  to ke n   g u id e d   tr a n s fo r mer fu s io n   fo r   s ta g e - a d a p tive  d ia b etic  r etin o p a th y   …   ( Mu r a li Gu jju la )   1121   lear n ed   v is u al  r ep r esen tatio n s .   T h e  u s e  o f   s tr atif ied   c r o s s - v alid atio n   an d   e x ter n al   d ataset  v alid atio n   d em o n s tr ates  r o b u s tn ess   u n d e r   class   im b alan ce   an d   d ataset   v ar iab ilit y ,   wh ile  ca lib r atio n   an aly s is   h ig h lig h ts   th e  r eliab ilit y   o f   p r ed ictio n   co n f id en ce .   Ov er all,   th e  p r o p o s ed   f r am ewo r k   ad v an ce s   au to m ated   DR   s cr ee n in g   b y   co m b in in g   ac c u r ac y ,   r o b u s tn ess ,   an d   in ter p r eta b ilit y ,   m ak in g   it  s u itab le  f o r   lar g e - s ca le  clin ical  d ep lo y m e n t a n d   d ec is io n - s u p p o r t sy s tem s .         ACK NO WL E DG M E N T S   T h e  au th o r s   wo u ld   lik e   to   ac k n o wled g e   Vels  I n s titu te  o f   Scien ce ,   T ec h n o lo g y   an d   Ad v an ce d   Stu d ies,  C h en n ai,   I n d ia,   f o r   p r o v id in g   th e  n ec ess ar y   ac ad e m ic  an d   r esear ch   s u p p o r t f o r   th is   s tu d y .         F UNDING   I NF O R M A T I O N   T h is   r esear ch   r ec eiv ed   n o   s p ec if ic  g r an t  f r o m   a n y   f u n d in g   ag en c y   in   th e  p u b lic,   c o m m er cial,   o r     not - f o r - p r o f it secto r s .         AUTHO R  CO NT RI B UT I O NS ST A T E M E N T   T h is   jo u r n al  u s es  th e  C o n tr ib u to r   R o les  T ax o n o m y   ( C R ed iT)   to   r ec o g n ize  in d iv id u al  au th o r   co n tr ib u tio n s ,   r ed u ce   au th o r s h ip   d is p u tes,  an d   f ac ilit ate  co llab o r atio n .     Na m e  o f   Aut ho r   C   M   So   Va   Fo   I   R   D   O   E   Vi   Su   P   Fu   Mu r ali  Gu jju la   ✓   ✓   ✓   ✓     ✓     ✓   ✓     ✓         Ku m ar   Nar ay an an   ✓   ✓     ✓             ✓     ✓   ✓       C   :    C o n c e p t u a l i z a t i o n   M   :    M e t h o d o l o g y   So   :    So f t w a r e   Va   :    Va l i d a t i o n   Fo   :    Fo r mal   a n a l y s i s   I   :    I n v e s t i g a t i o n   R   :    R e so u r c e s   D   :   D a t a   C u r a t i o n   O   :   W r i t i n g   -   O r i g i n a l   D r a f t   E   :   W r i t i n g   -   R e v i e w   &   E d i t i n g   Vi   :    Vi su a l i z a t i o n   Su   :    Su p e r v i s i o n   P   :    P r o j e c t   a d mi n i st r a t i o n   Fu   :    Fu n d i n g   a c q u i si t i o n         CO NF L I C T   O F   I N T E R E S T   ST A T E M E NT   T h e  au th o r s   d ec lar e  n o   co n f lict o f   in ter est.        DATA AV AI L AB I L I T Y   T h e  p r i m ar y   r etin al  f u n d u s   i m ag es  u s ed   in   th is   s tu d y   wer e  o b tain e d   f r o m   th e  p u b licly   ac ce s s ib l e   d ataset  o n   Ka g g le  at   h ttp s ://www. k ag g le. co m /c/ap to s 2 0 1 9 - b lin d n ess - d etec tio n /d ata.   T h e   s o u r ce   tr ain in g   s et   co n tain s   3 , 6 6 2   la b elled   im ag e s :  1 , 8 0 5   no _ DR   im ag es  an d   1 , 8 5 7   DR   im ag es  af ter   co m b in in g   th e  m ild   ( 3 7 0 ) ,   m o d er ate  ( 9 9 9 ) ,   s ev er e  ( 1 9 3 ) ,   an d   p r o life r ativ e  DR   ( 2 9 5 )   c ateg o r ies.   No   n ew  p atien t  o r   clin ical  d ata  wer e  co llected .   Acc ess   to   th e  s o u r ce   im ag es  r eq u ir es  co m p li an ce   with   Kag g le  r eg is tr atio n   an d   th e  d ataset  p r o v id e r ’ s   ter m s ; th er ef o r e ,   th e  im ag es a r e  n o t r ed is tr ib u ted   with   th is   ar ticle.   Ag g r eg ate  r esu lts   ar e  r ep o r ted   in   th e   ar ticle.   Stu d y - g en er ated   s p lit  f iles   an d   p r o ce s s ed   o u tp u ts   ar e  av ailab le  f r o m   th e  c o r r esp o n d i n g   au t h o r ,  [ MG ] ,   u p o n   r ea s o n ab le  r eq u est,  s u b ject  to   th e  o r ig in al  d atase t te r m s       RE F E R E NC E S   [ 1 ]   T.   Y .   W o n g ,   C .   M .   G .   C h e u n g ,   M .   La r se n ,   S .   S h a r ma,   a n d   R .   S i mó ,   “ D i a b e t i c   r e t i n o p a t h y , ”   N a t u re   R e v i e w s   D i sea se   Pri m e rs ,    v o l .   2 ,   n o .   1 ,   M a r .   2 0 1 6 ,   d o i :   1 0 . 1 0 3 8 / n r d p . 2 0 1 6 . 1 2 .   [ 2 ]   M .   M .   I sl a m,   H . - C .   Y a n g ,   T.   N .   P o l y ,   W . - S .   J i a n ,   a n d   Y . - C .   J .   L i ,   “ D e e p   l e a r n i n g   a l g o r i t h ms  f o r   d e t e c t i o n   o f   d i a b e t i c   r e t i n o p a t h y   i n   r e t i n a l   f u n d u s  p h o t o g r a p h s:   a   s y st e ma t i c   r e v i e w   a n d   m e t a - a n a l y s i s,”   C o m p u t e r   Me t h o d s   a n d   Pro g r a m s   i n   Bi o m e d i c i n e ,    v o l .   1 9 1 ,   J u l .   2 0 2 0 ,   d o i :   1 0 . 1 0 1 6 / j . c m p b . 2 0 2 0 . 1 0 5 3 2 0 .   [ 3 ]   V .   G u l s h a n   e t   a l . ,   “ D e v e l o p m e n t   a n d   v a l i d a t i o n   o f   a   d e e p   l e a r n i n g   a l g o r i t h m  f o r   d e t e c t i o n   o f   d i a b e t i c   r e t i n o p a t h y   i n   r e t i n a l   f u n d u s   p h o t o g r a p h s , ”   J A MA ,   v o l .   3 1 6 ,   n o .   2 2 ,   D e c .   2 0 1 6 ,   d o i :   1 0 . 1 0 0 1 / j a ma. 2 0 1 6 . 1 7 2 1 6 .   [ 4 ]   D .   S .   W .   T i n g   e t   a l . ,   “ D e v e l o p m e n t   a n d   v a l i d a t i o n   o f   a   d e e p   l e a r n i n g   sy s t e m  f o r   d i a b e t i c   r e t i n o p a t h y   a n d   r e l a t e d   e y e   d i s e a se s   u si n g   r e t i n a l   i m a g e s   f r o m   m u l t i e t h n i c   p o p u l a t i o n s   w i t h   d i a b e t e s, ”   J A MA ,   v o l .   3 1 8 ,   n o .   2 2 ,   D e c .   2 0 1 7 ,     d o i :   1 0 . 1 0 0 1 / j a m a . 2 0 1 7 . 1 8 1 5 2 .   [ 5 ]   M .   D .   A b r à mo f f ,   P .   T.   La v i n ,   M .   B i r c h ,   N .   S h a h ,   a n d   J .   C .   F o l k ,   “ P i v o t a l   t r i a l   o f   a n   a u t o n o mo u s  A I - b a se d   d i a g n o s t i c   s y st e m  f o r   d e t e c t i o n   o f   d i a b e t i c   r e t i n o p a t h y   i n   p r i mar y   c a r e   o f f i c e s, ”   n p j   D i g i t a l   M e d i c i n e ,   v o l .   1 ,   n o .   1 ,   A u g .   2 0 1 8 ,     d o i :   1 0 . 1 0 3 8 / s 4 1 7 4 6 - 018 - 0 0 4 0 - 6.   [6 ]   M .   V o e t s,   K .   M ø l l e r se n ,   a n d   L.   A .   B o n g o ,   “ R e p r o d u c t i o n   s t u d y   u s i n g   p u b l i c   d a t a   o f :   d e v e l o p m e n t   a n d   v a l i d a t i o n   o f   a   d e e p   l e a r n i n g   a l g o r i t h m   f o r   d e t e c t i o n   o f   d i a b e t i c   r e t i n o p a t h y   i n   r e t i n a l   f u n d u s   p h o t o g r a p h s , ”   PLO S   O N E ,   v o l .   1 4 ,   n o .   6 ,   J u n .   2 0 1 9 ,     d o i :   1 0 . 1 3 7 1 / j o u r n a l . p o n e . 0 2 1 7 5 4 1 .   [ 7 ]   N .   Tsi k n a k i s  e t   a l . ,   “ D e e p   l e a r n i n g   f o r   d i a b e t i c   r e t i n o p a t h y   d e t e c t i o n   a n d   c l a ss i f i c a t i o n   b a s e d   o n   f u n d u s  i m a g e s:   a   r e v i e w , ”   C o m p u t e rs   i n   B i o l o g y   a n d   Me d i c i n e ,   v o l .   1 3 5 ,   A u g .   2 0 2 1 ,   d o i :   1 0 . 1 0 1 6 / j . c o mp b i o me d . 2 0 2 1 . 1 0 4 5 9 9 .   Evaluation Warning : The document was created with Spire.PDF for Python.