scieee Science in your language
[en] (orig)

Machine Learning Method for Multi-Scale Anomaly Detection in Cloud Environments Based on Transformer Architecture

Author: Kang, Yue
Publisher: Zenodo
DOI: 10.5281/zenodo.17537064
Source: https://zenodo.org/records/17537064/files/Machine+Learning+Method+for+Multi-Scale+Anomaly+Detection+in+Cloud+Environments+Based+on+Transformer+Architecture.pdf
Jou nal o Compu e Technology and So wa e
ISSN: 2998-2383
Vol. 3, No. 4, 2024
Machine Lea ning Me hod o Mul i-Scale Anomaly De ec ion in
Cloud En i onmen s Based on T ans o me A chi ec u e
Yue Kang
Ca negie Mellon Uni e si y, Pi sbu gh, USA
[email protected]
Abs ac : This pape add esses he complexi y o anomaly de ec ion in cloud se ice en i onmen s and p oposes a de ec ion
me hod based on a mul i-scale T ans o me . The me hod models ea u es ac oss empo al g anula i ies and uses con ex ual
in o ma ion o cap u e bo h sho - e m luc ua ions and long- e m ends, a oiding ea u e loss and insu icien disc imina ion
unde a single ime scale. The model in oduces mul i-head a en ion and ga ing s uc u es o achie e complemen a y modeling o
global and local ea u es, he eby enhancing he ecogni ion o di e se anomaly pa e ns in complex cloud en i onmen s. A
sys ema ic analysis o pa ame e sensi i i y and en i onmen al sensi i i y is conduc ed, e ealing pe o mance di e ences unde
a ying lea ning a es, numbe s o a en ion heads, and load condi ions, which e i ies he obus ness and adap abili y o he
me hod ac oss di e se scena ios. Expe imen s a e ca ied ou on publicly a ailable da ase s, e alua ing key me ics including
P ecision, Recall, F1-Sco e, and De ec ion La ency. The esul s show ha he p oposed me hod ou pe o ms exis ing app oaches
in bo h accu acy and esponse speed, e ec i ely imp o ing he eliabili y and eal- ime pe o mance o cloud se ice moni o ing.
O e all, he mul i-scale T ans o me anomaly de ec ion me hod demons a es s ong de ec ion capabili y and p ac ical alue in
cloud compu ing scena ios, p o iding a easible solu ion o la ge-scale ime-se ies modeling and anomaly iden i ica ion.
Keywo ds: Mul iscale modeling; cloud se ice moni o ing; anomaly de ec ion; esponse ime
1. In oduc ion
The popula iza ion o cloud compu ing has d i en he
digi al ans o ma ion o en e p ises and o ganiza ions.
Dis ibu ed se ice a chi ec u es ha e become he co e
ounda ion suppo ing mode n in o ma ion sys ems. In his
p ocess, cloud se ice pla o ms unde ake massi e compu ing,
s o age, and communica ion asks. Thei ope a ional s a e
di ec ly a ec s business con inui y and use expe ience.
Howe e , due o he dynamic, he e ogeneous, and high-
concu ency na u e o cloud se ices, a ious anomalies a e
ine i able. These anomalies include pe o mance bo lenecks,
esou ce con en ion, ne wo k luc ua ions, and po en ial
secu i y h ea s. They o en p esen complex mul idimensional
cha ac e is ics. Some a e e lec ed in sudden sho - e m
luc ua ions, while o he s a e hidden in long- e m c oss-se ice
dependencies. Wi hou e ec i e de ec ion and ea ly wa ning
mechanisms, hese anomalies may lead o esou ce was e,
deg aded use expe ience, and la ge-scale se ice in e up ions.
The e o e, achie ing e icien , accu a e, and scalable anomaly
de ec ion in complex cloud en i onmen s has become a long-
e m esea ch ocus in bo h academia and indus y[1].
T adi ional anomaly de ec ion me hods o en ely on
s a is ical modeling and machine lea ning algo i hms. They
ocus on de ec ing de ia ions in single me ics o p ede ined
pa e ns. These me hods achie ed some success in ea ly small-
scale cloud se ices. Ye hey show clea limi a ions in oday's
en i onmen s, whe e mul idimensional indica o s in e ac ,
enan s swi ch dynamically, and se ice opologies e ol e
apidly. De ec ion mechanisms based on ixed h esholds o
single-dimensional ea u es canno adap o dis ibu ion shi s
caused by dynamic esou ce alloca ion. In addi ion, adi ional
machine lea ning me hods lack su icien exp essi e powe
when aced wi h complex dependencies and nonlinea empo al
pa e ns. These sho comings esul in high alse ala m and
miss a es, educing he e iciency o esou ce scheduling and
isk managemen . Hence, new modeling pa adigms a e
equi ed o o e come he cons ain s o adi ional amewo ks
and o enable in-dep h mining and e ec i e modeling o mul i-
scale and mul i-modal ea u es in cloud se ices[2].
Wi h he ise o deep lea ning, especially ad ances in
sequence modeling and a en ion mechanisms, T ans o me
a chi ec u es ha e shown s ong ad an ages in modeling
complex empo al da a. Compa ed wi h ecu en o
con olu ional ne wo ks, T ans o me s cap u e long- ange
dependencies h ough global a en ion, a oiding g adien
anishing and limi ed ecep i e ields. In cloud se ice
anomaly de ec ion, his capabili y helps iden i y c oss-window
anomaly pa e ns and hidden mul i a ia e co ela ions. Ye
anomalies in cloud sys ems usually exhibi mul i-scale
cha ac e is ics. Sho - e m luc ua ions may signal imminen
ailu es, while long- e m shi s may e lec sys emic isks.
Relying on single-scale ep esen a ions is insu icien o
cap u e such di e si y and complexi y. Combining mul i-scale
modeling wi h T ans o me s uc u es has hus become a
p omising di ec ion o b eak cu en pe o mance bo lenecks
in anomaly de ec ion.
F om an applica ion pe spec i e, in oducing mul i-scale
T ans o me s in o cloud anomaly de ec ion has no only
academic bu also signi ican enginee ing alue. Cloud se ice
ope a ions equi e simul aneous a en ion o esou ce
op imiza ion, ask scheduling, and secu i y p o ec ion.
Anomaly de ec ion plays a key ole in ensu ing he imeliness
and accu acy o hese decisions. Th ough he modeling powe
o mul i-scale T ans o me s, de ec ion sys ems can cap u e
se ice beha io a mul iple le els. A he mic o le el, hey
de ec sudden luc ua ions. A he meso le el, hey iden i y
pe iodic pa e ns. A he mac o le el, hey e eal long- e m
ends. Such mul i-le el pe cep ion educes alse ala ms and
misses and imp o es obus ness and s abili y. I also p o ides
heo e ical and me hodological suppo o building in elligen
and adap i e cloud managemen sys ems, enabling mo e
eliable ope a ions unde complex condi ions[3].
In summa y, esea ch on anomaly de ec ion in cloud
se ices wi h mul i-scale T ans o me s ca ies impo an
academic and p ac ical signi icance. On he one hand, i
add esses he sho comings o adi ional me hods in dynamic
and complex en i onmen s and pushes anomaly de ec ion
owa d mul i-dimensional and mul i-le el modeling. On he
o he hand, i mee s he u gen demand o cloud pla o ms o
in elligen ope a ions. I imp o es esou ce u iliza ion, educes
ope a ional cos s, and enhances sys em eliabili y. Mo e
impo an ly, i con ibu es o he cons uc ion o u u e
in elligen cloud ecosys ems. I plays a posi i e ole in ensu ing
se ice con inui y, op imizing use expe ience, and
s eng hening secu i y p o ec ion. The e o e, explo ing he use
o mul i-scale T ans o me s in cloud anomaly de ec ion is bo h
a na u al ex ension o echnological p og ess and a key pa h o
he sus ainable e olu ion o cloud sys ems[4].
2. Rela ed wo k
Anomaly de ec ion is a c i ical componen o ensu ing
sys em s abili y and has been widely s udied in cloud
compu ing en i onmen s. Ea ly esea ch mainly elied on
s a is ical me hods and ule-based mechanisms. These
app oaches iden i ied anomalies by modeling me ic
dis ibu ions o se ing h esholds. They wo ked well in small-
scale sys ems whe e signi ican de ia ions could be de ec ed
e ec i ely. Howe e , hei pe o mance declined when acing
mul i- enan sha ing, he e ogeneous esou ce coupling, and
high-concu ency asks. Wi h he expansion o cloud se ices,
esea ch shi ed owa d machine lea ning-based anomaly
de ec ion. Supe ised and unsupe ised models we e de eloped
o educe eliance on h esholds and imp o e adap abili y. Ye
hese me hods o en ocused on single-dimensional ea u es.
They s uggled o model complex empo al pa e ns and c oss-
se ice dependencies. As a esul , alse ala ms and missed
de ec ions emained a challenge in la ge-scale and dynamic
en i onmen s.
The in oduc ion o deep lea ning has ad anced cloud
se ice anomaly de ec ion. Con olu ional neu al ne wo ks and
ecu en neu al ne wo ks ha e been widely applied o model
se ice logs and pe o mance me ics. They aimed o cap u e
local spa ial ea u es and empo al pa e ns[5]. These
app oaches enhanced he ep esen a ion o complex da a and
p o ided he abili y o lea n nonlinea ela ionships and c oss-
ime dependencies. Howe e , hey showed limi a ions in
modeling long- ange dependencies and mul i-dimensional
in e ac ions. Con olu ional s uc u es we e cons ained by
limi ed ecep i e ields. Recu en s uc u es su e ed om
g adien anishing and low compu a ional e iciency. In
complex and dynamic cloud en i onmen s, hese limi a ions
educed de ec ion e ec i eness in high-dimensional and long-
e m sequence analysis. They also limi ed he gene al
applicabili y o such models in la ge-scale deploymen s.
The eme gence o he T ans o me has o e ed new
oppo uni ies o anomaly de ec ion. I s sel -a en ion
mechanism p o ides global modeling capabili ies. I can
cap u e bo h sho - e m and long- e m dependencies and model
in e ac ions among mul iple a iables. This has shown
ad an ages in analyzing high-dimensional moni o ing da a o
cloud se ices. By alloca ing a en ion weigh s, he model can
dynamically ocus on c i ical momen s o impo an me ics.
This imp o es he accu acy o anomaly localiza ion and
ecogni ion. Howe e , single-scale T ans o me models emain
insu icien o di e se anomaly pa e ns in cloud se ices.
Real-wo ld anomalies include sudden spikes as well as long-
e m d i s. Relying only on single-scale ep esen a ions makes
i di icul o models o balance pa e ns ac oss di e en
empo al le els. This esul s in incomple e and uns able
de ec ion pe o mance[6].
Mul i-scale modeling has he e o e become an impo an
di ec ion in anomaly de ec ion. By cons uc ing mul i-scale
ep esen a ions, models can cap u e anomaly ea u es a
di e en empo al g anula i ies. They can pe cei e sho - e m
bu s s while also e ealing long- e m ends. When combined
wi h T ans o me s uc u es, his app oach e ains global
modeling capabili ies and enhances he ep esen a ion o mul i-
le el ea u es. I be e adap s o he complexi y o cloud
en i onmen s. Recen s udies ha e shown ha in eg a ing
mul i-scale modeling wi h a en ion mechanisms educes
de ec ion e o s and imp o es gene aliza ion unde dynamic
dis ibu ions. Thus, me hods ha combine mul i-scale
modeling wi h T ans o me s a e eme ging as a on ie in cloud
anomaly de ec ion. They p o ide a solid heo e ical and
me hodological ounda ion o building mo e in elligen and
eliable ope a ion and main enance sys ems[7].
3. Me hod
This s udy in oduces a cloud se ice anomaly de ec ion
me hod ha in eg a es mul i-scale T ans o me s. The app oach
le e ages hie a chical ea u e modeling and he global
in e ac ion capabili y o he sel -a en ion mechanism o
e icien ly ep esen and disc imina e anomalies in
mul idimensional moni o ing da a unde complex cloud
en i onmen s. The o e all idea is o i s pe o m mul i-scale
decomposi ion on aw ime-se ies da a o cloud se ices o
cap u e luc ua ion pa e ns a di e en empo al g anula i ies.
Then, he ex ac ed mul i-scale ea u es a e mapped and uni ied
in o a sha ed ep esen a ion space h ough embedding and
sequence modeling. Finally, a mul i-scale a en ion mechanism
is inco po a ed in o he T ans o me o model dependencies
ac oss ime and me ics, wi h an anomaly sco ing unc ion used
o p oduce de ec ion esul s. The me hod heo e ically
add esses bo h sho - e m anomalies and long- e m ends,
p o iding a new solu ion o in elligen anomaly de ec ion in
cloud se ice en i onmen s. The model a chi ec u e is shown
in Figu e 1.
Figu e 1. Mul i-Scale T ans o me F amewo k o Cloud Se ice Anomaly De ec ion
Fi s , assume ha he mul i-dimensional moni o ing
indica o s o he cloud se ice a ime s ep
a e ep esen ed
as a ec o
d
Rx 
, whe e
d
ep esen s he ea u e
dimension. Th ough mul i-scale con olu ion and empo al
py amid s uc u e, he o iginal sequence can be mapped in o a
mul i-scale ea u e se
 
)()2()1( ,...,, M
zzz
, whe e each scale
co esponds o a di e en ime g anula i y. This p ocess can be
o malized as:
)1( ,...,2,1),( :
)()( MmxCon z k
mm
 
Whe e
)(m
Con
ep esen s he con olu ion ope a o o
he
m
h scale, and
k
x:
ep esen s he local segmen wi hin
he ime window.
Subsequen ly, he mul i-scale ea u es a e uni o mly
p ojec ed in o a sha ed ep esen a ion space o be inpu in o he
T ans o me s uc u e. The mapping p ocess can be exp essed
as:
(2) )( )()()( m
mm
zLinea h 
Whe e
)(m
Linea
ep esen s he linea ans o ma ion
co esponding o scale
m
. Finally, he ea u es o all scales
a e conca ena ed in o he o e all ep esen a ion
h
.
Du ing he T ans o me encoding phase, a mul i-head
sel -a en ion mechanism is used o model c oss- empo al and
c oss-scale dependencies. Fo he inpu sequence
 
T
hhhH ,...,, 21

, he a en ion calcula ion o mula is:
(3) )max(),,( V
d
QK
So VKQA en ion
k
T

Whe e
VKQ ,,
is he que y, key, and alue ma ix
espec i ely, and
k
d
is he scaling ac o .
The sequence ep esen a ion
'H
ob ained based on he
a en ion mechanism can be u he ans o med in o a s able
con ex ep esen a ion a e esidual connec ion and
no maliza ion ope a ions. The p ocess can be exp essed as:
(4) ))(( hA en ionhLaye No mu 
Laye No m
is used o main ain nume ical s abili y and
accele a e con e gence.
Finally, he anomaly sco ing unc ion is used o measu e
he de ia ion be ween he cu en momen ep esen a ion and
he no mal mode o he sys em. Le he e e ence ep esen a ion
be
, hen he anomaly sco e can be exp essed as:
(5) 2
2
us 
2

ep esen s he bino m. A highe sco e indica es ha
he se ice beha io a ha momen is mo e likely o be
abno mal.
Th ough he abo e modeling p ocess, his me hod, unde
he syne gis ic e ec o mul i-scale ea u e decomposi ion and
global a en ion modeling, can e ec i ely cap u e sho - e m
luc ua ions and long- e m ends in cloud se ice da a, and
achie e mo e obus and accu a e anomaly de ec ion.
4. Expe imen al Resul s
4.1 Da ase
This s udy employs he Sma Manu ac u ing IoT-Cloud
Moni o ing Da ase as he basis o alida ing he p oposed
me hod. The da ase consis s o mul i a ia e ime se ies
eco ds ha cap u e esou ce usage me ics and ope a ional
s a es in cloud-based indus ial IoT scena ios. I includes
di e se signals such as CPU u iliza ion, memo y consump ion,
ne wo k h oughpu , senso eadings, and sys em ale s. These
da a p o ide a ealis ic and ich ep esen a ion o cloud se ice
beha io s unde di e en condi ions.
The da ase is highly aligned wi h he objec i es o his
s udy. I has clea ad an ages in combining mul idimensional
eleme y ea u es wi h anomaly- ela ed pa e ns, which ma ch
well wi h he mul i-scale modeling capabili y o he p oposed
amewo k. I s empo al esolu ion and he di e si y o
moni o ing me ics enable he model o sys ema ically cap u e
sho - e m luc ua ions and long- e m shi s in cloud se ice
pe o mance. The da a s uc u e is well o ganized while also
con aining dynamic a ia ions. This suppo s hie a chical
ea u e ex ac ion, c oss-scale usion, and anomaly sco ing,
while a oiding unnecessa y complexi y un ela ed o cloud
moni o ing.
Applying he p oposed me hod o his da ase makes i
possible o e ec i ely e alua e he abili y o he mul i-scale
T ans o me a chi ec u e o de ec anomalies ac oss di e en
empo al scales. The con inui y o he da ase and he di e si y
o signal ypes p o ide s ong suppo o ep esen a ion
lea ning in he embedding and usion s ages. They also allow
s able e alua ion o e e ence memo y upda es and sco ing
mechanisms. The da ase design ensu es ha he me hod is
alida ed unde condi ions close o eal ope a ional scena ios.
This o e s meaning ul e idence o assessing he obus ness
and in e p e abili y o he model.
4.2 Expe imen al Resul s
To alida e he e ec i eness o he p oposed me hod, we
selec ed ecen models ha ha e shown s ong pe o mance in
ep esen a ion obus ness and anomaly-s yle e alua ion as
baselines. These me hods (USAD, T anAD, DARA,
iT ans o me ), al hough o iginally designed o ime-se ies
anomaly de ec ion, sha e commonali ies wi h alignmen
obus ness asks in hei abili y o model sensi i i y o small
signal de ia ions and pe u ba ions, and hus se e as sui able
e e ence me hods in alignmen scena ios. The compa ison
esul s on he obus ness benchma k a e shown in Table 1.
Table1: Compa a i e esul s on alignmen obus ness
benchma ks
Model
P ecision
(%)
Recall (%)
F1-Sco e
(%)
De ec ion
La ency
(ms)
Anomaly-
T ans o me [8]
89.5
92.0
90.7
250
DGT-PF[9]
88.2
90.1
89.1
220
MAAT[10]
90.0
91.5
90.7
210
TiSAT[11]
87.8
89.3
88.5
230
Ou s
91.2
93.0
92.1
200
The compa a i e expe imen al esul s show ha he
p oposed mul i-scale T ans o me me hod demons a es
signi ican ad an ages in cloud se ice anomaly de ec ion.
Compa ed wi h Anomaly-T ans o me and TiSAT, Ou s
achie es highe alues in P ecision. This indica es ha he
me hod is mo e accu a e in dis inguishing no mal beha io s
om anomaly pa e ns and can e ec i ely educe alse
posi i es. This imp o emen aligns wi h he design o mul i-
scale ea u e decomposi ion and c oss-scale modeling. The
model can ex ac mo e ine-g ained pa e ns a di e en
empo al g anula i ies, which enhances he eliabili y o
anomaly disc imina ion.
Fo Recall, Ou s also main ains a clea lead. Compa ed
wi h DGT-PF and MAAT, ou me hod shows s onge
co e age in cap u ing anomalies. This means ha i no only
iden i ies sho - e m bu s anomalies bu also e ec i ely acks
long- e m e ol ing anomaly ends. The esul e lec s he
balanced abili y o he mul i-scale T ans o me in global
modeling and local sensi i i y. I ensu es ha sys ems can
comp ehensi ely pe cei e po en ial isks in complex and
dynamic en i onmen s, which is c ucial o main aining he
con inui y o cloud se ices.
F1-Sco e, as a combined measu e o P ecision and Recall,
also highligh s he supe io o e all pe o mance o Ou s.
Compa ed wi h o he models, ou me hod achie es a be e
balance be ween accu acy and co e age. This alida es he
e ec i eness o a en ion mechanisms and mul i-scale ea u e
usion. The esul s show ha he me hod main ains de ec ion
s abili y unde high-dimensional and mul i-sou ce ea u es
while supp essing noise and edundancy. This makes he model
mo e obus in dynamic cloud en i onmen s.
In e ms o De ec ion La ency, Ou s achie es he lowes
delay compa ed wi h o he me hods. This ad an age is
pa icula ly impo an in cloud se ice scena ios. Real- ime
pe o mance is a co e equi emen o anomaly de ec ion
sys ems in p ac ical deploymen . Lowe la ency means ha he
sys em can espond o po en ial isks mo e quickly. The
expe imen al esul s show ha he p oposed me hod balances
e icien pa alleliza ion and accu a e modeling in i s design. I
no only imp o es de ec ion accu acy bu also s eng hens eal-
ime wa ning capabili ies. This indica es ha he mul i-scale
T ans o me model has highe usabili y and o wa d-looking
po en ial in eal applica ions, p o iding s able and eliable
echnical suppo o cloud se ice ope a ions.
This pape also conduc s compa a i e expe imen s on he
hype pa ame e sensi i i y o he mul i-scale T ans o me
model unde di e en lea ning a es. The expe imen al esul s
a e shown in Figu e 2.
Figu e 2. Hype pa ame e sensi i i y expe imen s o mul i-
scale T ans o me models a di e en lea ning a es
The esul s unde di e en lea ning a es show ha
P ecision i s inc eases and hen dec eases, eaching i s peak
a ound a mode a e lea ning a e. This indica es ha he mul i-
scale T ans o me model can mo e e ec i ely cap u e key
ea u es in cloud moni o ing da a wi hin his pa ame e ange.
When he lea ning a e is oo low, insu icien upda es limi he
exp essi e powe o ea u es. When i is oo high, aining
ins abili y occu s, and anomaly disc imina ion becomes biased.
This is closely ela ed o he sensi i i y o ea u e modeling
equi ed by complex signals in cloud en i onmen s.
Recall shows an o e all upwa d end and emains s able a
highe lea ning a es. This sugges s ha he me hod is mo e
adap i e in expanding anomaly co e age. Mul i-scale ea u e
modeling and c oss- empo al dependency cap u e allow he
model o comp ehensi ely iden i y po en ial sys em anomalies
e en wi h la ge s ep sizes. Co esponding o he di e si y o
anomaly dis ibu ions in cloud se ice en i onmen s, his end
e lec s he balanced abili y o he me hod in global pa e n
pe cep ion and local anomaly de ec ion.
The end o F1-Sco e is consis en wi h he changes o
P ecision and Recall. I pe o ms bes in he medium- o-high
lea ning a e ange. This shows ha he model achie es a be e
ade-o be ween accu acy and co e age. Wi h he a en ion
in e ac ion and usion mechanisms o he mul i-scale
T ans o me , he model can supp ess noise in high-dimensional
dynamic indica o s while main aining sensi i i y o key signals.
This pe o mance ma ches he high demands o cloud anomaly
de ec ion o o e all e ec i eness and enables s able
disc imina ion unde complex mul i-sou ce condi ions.
The a ia ion o De ec ion La ency shows ha la ency
dec eases signi ican ly as he lea ning a e inc eases and
eaches he lowes alue in he mode a e ange. This indica es
ha he me hod has ad an ages in pa allel modeling and
e icien upda es. In cloud anomaly de ec ion scena ios whe e
eal- ime pe o mance is c i ical, lowe la ency means he
sys em can issue ale s mo e quickly and p e en he sp ead o
po en ial isks. The sensi i i y o la ency o he lea ning a e
also e eals he impo ance o pa ame e uning in pe o mance
op imiza ion, p o iding p ac ical insigh s o model
deploymen in cloud en i onmen s.
This pape also analyzes he impac o di e en numbe s o
a en ion heads on he model anomaly de ec ion pe o mance.
The expe imen al esul s a e shown in Figu e 3.
P ecision shows a end o i s inc easing and hen
dec easing wi h di e en numbe s o a en ion heads. I ises
signi ican ly om 1 o 4 heads, eaches he highes alue a 8
heads, and declines a 12 heads. This indica es ha a a
mode a e scale, he model can be e ocus on key ea u es and
educe in e e ence om i ele an pa e ns, hus imp o ing he
accu acy o anomaly ecogni ion. When he numbe o heads is
oo la ge, ep esen a ions become o e ly dispe sed. The model
s uggles o main ain concen a ion on impo an ea u es,
which educes accu acy.
Recall inc eases o e all as he numbe o heads g ows and
peaks a ound 6 heads be o e sligh ly declining. This sugges s
ha wi h ewe heads, he model canno co e di e se anomaly
pa e ns. A mode a e numbe o heads allows mo e
comp ehensi e cap u e o bo h sho - e m luc ua ions and
long- e m ends. When he numbe o heads is oo high,
a en ion dis ibu ion becomes sca e ed. The abili y o de ec
weak anomalies o ma ginal ea u es dec eases, leading o a
sligh educ ion in ecall.
Figu e 3. The impac o di e en numbe s o a en ion
heads on model anomaly de ec ion pe o mance
F1-Sco e emains high be ween 6 and 8 heads, e lec ing a
good balance be ween accu acy and co e age. A mode a e
numbe o a en ion heads ensu es p ecision in de ec ing majo
anomalies while also main aining b oad co e age. This leads o
op imal o e all pe o mance. When he numbe o heads
becomes oo la ge, edundan a en ion eme ges and he
balance is dis up ed, esul ing in a decline in o e all
pe o mance.
De ec ion La ency shows a end o i s dec easing and
hen inc easing as he numbe o heads ises, eaching i s
lowes alue a 6 heads. Wi h ewe heads, pa allelism is
limi ed, and in e ence speed is slowe . As he numbe inc eases,
e iciency in ea u e in e ac ion and con ex agg ega ion
imp o es, which educes la ency. Howe e , wi h u he
inc eases, compu a ion and esou ce consump ion ise, causing
la ency o ebound. Fo cloud se ice scena ios, his indica es
ha a mode a e numbe o a en ion heads can achie e a
balance be ween de ec ion accu acy and eal- ime pe o mance.
This pape also e alua es he impac o changing
en i onmen al condi ions on he de ec ion la ency and accu acy
o he mul i-scale T ans o me . The expe imen al esul s a e
shown in Figu e 4.
Figu e 4. Impac o Changing En i onmen al Condi ions
on Mul i-Scale T ans o me De ec ion La ency and Accu acy
P ecision shows clea a ia ion unde di e en condi ions.
Mixed Load is he highes (0.91). Memo y P essu e is nex

(0.88). CPU Spike and Disk I/O Bu s a e in he middle (0.86
and 0.83). Ne wo k Ji e is he lowes (0.80). This indica es
ha he mul i-scale T ans o me o ms mo e disc imina i e
mul i-g anula i y ep esen a ions unde composi e loads. C oss-
scale usion can ex ac s able anomaly ea u es om
concu en esou ce aces. In con as , ji e - ype ne wo k
dis u bances ampli y sho - e m noise and weaken he s abili y
o a en ion ocus, which educes p ecision. Fo cloud se ice
moni o ing, composi e me ic linkage p o ides a iche con ex
o disc imina ion, while high- equency andom ji e poses
s onge demands on denoising and obus ocusing abili y.
Recall shows a complemen a y end o P ecision. Disk I/O
Bu s is he highes (0.88). Ne wo k Ji e ollows closely
(0.85). Mixed Load and CPU Spike emain a a medium-high
le el (0.82 and 0.78–0.88). Memo y P essu e is he lowes
(0.79). This sugges s ha unde I/O loads wi h ela i ely
p edic able hy hms, mul i-scale empo al modeling mo e
easily cap u es anomaly windows. C oss-scale dependencies
allow he model o emain sensi i e a longe ime g anula i ies.
Fo memo y p essu e and ji e scena ios, co e age depends on
he model's abili y o swi ch ocus be ween sho and long
windows, which helps a oid missed de ec ions.
F1-Sco e ises mode a ely wi h scene complexi y, anging
om 0.82 o 0.86. Mixed Load is he highes , ollowed by Disk
I/O Bu s and Memo y P essu e. Ne wo k Ji e and CPU Spike
a e lowe . The s eady imp o emen o he combined me ic
shows ha mul i-scale encoding and ga ed usion achie e a
ans e able balance be ween supp essing edundancy and
main aining co e age. When scenes p o ide iche c oss-me ic
cues, a en ion dis ibu ion be ween global and local le els
becomes mo e e icien . The model p ese es c i ical sudden
signals while educing alse igge s.
De ec ion La ency is he lowes in Disk I/O Bu s (0.22s).
Ne wo k Ji e is nex (0.24s). Memo y P essu e and Mixed
Load a e in he middle (0.27s and 0.26s). CPU Spike is he
highes (0.29s). The di e ences e eal he sensi i i y o mul i-
scale agg ega ion pa hs o scena io cha ac e is ics. When
hy hms a e clea e o local pa e ns a e mo e s able, con ex
agg ega ion and ga ed decisions a e as e . Ex eme spikes
inc ease he demand o ine sho -window esolu ion and
anomaly h eshold con ol, which p olongs he in e ence chain.
Fo online ale deploymen , his "scena io–la ency–accu acy"
coupling sugges s ha sho -window channels and ga ing
h esholds should be ine- uned in high-spike and s ong-ji e
cases o main ain bo h imeliness and disc imina i e powe .
Nex , his s udy analyzed he model's anomaly de ec ion
capabili y and esponse ime unde di e en cloud se ice loads.
The expe imen al esul s a e shown in Figu e 5.
P ecision shows clea di e en ia ion ac oss load ypes.
Mixed Load is he highes (0.91). Memo y Bound and I/O
In ensi e a e sligh ly highe han he middle le el (0.87 and
0.86). Ligh Load is a he middle (0.84). Ne wo k Bu s and
CPU Bound a e lowe (0.81 and 0.79). This indica es ha in
composi e loads and s o age o disk-domina ed condi ions,
mul i-scale ep esen a ions mo e easily o m s able decision
bounda ies. Synch onous luc ua ions o mul i-sou ce signals
p o ide a iche con ex o c oss-scale usion. In con as ,
single CPU limi a ions o high- equency ne wo k bu s s
in oduce mo e noise o local pa e n d i , which weakens
ea u e ocusing and h eshold s abili y.
Figu e 5. Analysis o he model's anomaly de ec ion
capabili ies and esponse ime unde di e en cloud se ice
loads
Recall shows a complemen a y end o P ecision. Ne wo k
Bu s and Mixed Load ank he highes (0.86 and 0.84).
Memo y Bound and I/O In ensi e ollow a an uppe le el
(0.83 and 0.83). CPU Bound comes nex (0.82). Ligh Load is
he lowes (0.76). This sugges s ha in scena ios wi h s ong
bounda ies o dense e en cues, c oss- empo al co e age is
s onge . The model can swi ch adap i ely be ween sho and
long windows o cap u e bo h bu s s and ends. In con as ,
unde smoo he signals wi h a ligh load, anomalies a e spa se
and weak in magni ude. Co e age is lowe and elies mo e on
long- e m accumula ion o small de ia ions.
F1-Sco e ises s eadily wi h load complexi y, anging om
0.80 o 0.88. Mixed Load eaches he highes le el, ollowed by
I/O In ensi e and Memo y Bound. This end indica es ha
c oss-scale usion pe o ms be e in complex coupled
scena ios. I supp esses edundancy and accumula es e idence,
main aining high P ecision wi hou sac i icing Recall. By
compa ison, CPU-bound and Ne wo k Bu s a e limi ed by
single-dimensional bo lenecks and equen dis u bances.
These condi ions equi e ine-g ained sho -window channels
and adjus ed ga ing h esholds o imp o e global and local
a en ion alloca ion, hus enhancing o e all disc imina i e
abili y.
De ec ion La ency is he lowes unde Ne wo k Bu s
(0.22s). Mixed Load and I/O In ensi e a e sligh ly highe
(0.23–0.24s). Memo y Bound and Ligh Load a e in he middle
(0.26s and 0.25s). CPU Bound is he highes (0.28s). The
dis ibu ion indica es ha when load pa e ns p o ide clea
disc imina i e cues, such as bu s s o mul i-sou ce coupling,
mul i-scale agg ega ion and decision con e gence a e as e . In
con as , unde compu a ional cons ain s o g adual signal
changes, he model equi es longe con ex in eg a ion and
mo e obus decision p ocesses. Fo online ale deploymen ,
his "load ype–accu acy–la ency" co espondence sugges s
ha sho and long window a ios and ga ing s a egies should
be adjus ed dynamically acco ding o scena io cha ac e is ics o
ensu e bo h de ec ion pe o mance and imeliness in complex
cloud en i onmen s.
5. Conclusion
This s udy p oposes a mul i-scale T ans o me anomaly
de ec ion me hod. By modeling ea u es ac oss empo al
g anula i ies and using con ex ual in o ma ion, i e ec i ely
imp o es he accu acy and e iciency o anomaly iden i ica ion
in cloud se ice en i onmen s. Expe imen al esul s show ha
he me hod achie es high obus ness and adap abili y unde
di e en loads and en i onmen al condi ions. I balances
de ec ion accu acy and esponse speed a he same ime. This is
o g ea signi icance o cloud compu ing scena ios wi h s ic
eal- ime equi emen s. I no only educes he isk o sys em
ailu es bu also p o ides s ong assu ance o se ice
con inui y and eliabili y. The in oduc ion o his me hod
u he demons a es he po en ial o mul i-scale ea u e
in e ac ion in modeling complex ime-se ies signals and o e s
new insigh s o esea ch in anomaly de ec ion.
The me hod emphasizes he complemen a y ole o c oss-
scale ea u es. I a oids missing local anomalies in a single
ime window and o e comes he insensi i i y o global
modeling o ine-g ained luc ua ions. By combining mul i-
head a en ion wi h ga ing mechanisms, he model can mo e
p ecisely ex ac key pa e ns om mul i-sou ce da a, he eby
imp o ing he comp ehensi eness and e ec i eness o
anomaly de ec ion. This modeling ad an age is no only
applicable o cloud se ice moni o ing bu can also be
ans e ed o o he domains ha p ocess la ge-scale ime-se ies
da a, such as indus ial p oduc ion, sma g ids, and inancial
sys ems. In hese applica ions, he abili y o mul i-scale
modeling can also help iden i y po en ial isks and abno mal
pa e ns, p o iding suppo o business con inui y and isk
con ol.
The esul s also e eal he impo an in luence o pa ame e
sensi i i y and en i onmen al changes on model pe o mance.
They indica e ha ine- uning is equi ed du ing deploymen
acco ding o di e en load cha ac e is ics and sys em s a es. By
analyzing he pe o mance unde a ia ions in lea ning a e,
numbe o a en ion heads, and en i onmen al dis u bances,
his s udy p o ides a p ac ical e e ence o deploymen and
op imiza ion unde esou ce-cons ained condi ions. Such
lexibili y makes he me hod easible in di e se scena ios and
helps achie e mo e e icien anomaly de ec ion and ale ing in
complex en i onmen s wi h mul i- enancy and pa allel asks on
cloud pla o ms.
Looking o wa d, he applica ion o mul i-scale
T ans o me s in cloud se ice anomaly de ec ion s ill has oom
o expansion. On one hand, sel -supe ised lea ning and
inc emen al lea ning s a egies can be in eg a ed o imp o e
adap abili y in dynamic en i onmen s and educe eliance on
labeled da a. On he o he hand, he model s uc u e can be
combined wi h ligh weigh design and dis ibu ed in e ence
amewo ks o suppo la ge -scale eal- ime moni o ing and
low-la ency de ec ion. In addi ion, usion wi h c oss-modal
da a can be explo ed by in eg a ing sys em logs, con igu a ion
iles, and pe o mance me ics o build a mo e comp ehensi e
anomaly de ec ion ecosys em. Wi h he con inuous
de elopmen o cloud se ices, he p oposed me hod no only
enhances cu en sys em pe o mance bu also lays he
ounda ion o u u e in elligen and adap i e ope a ion and
main enance sys ems.
Re e ences
[1] Q. Liu, W. Li, C. Zhang, Y. Chen, Y. Wu, Z. Zhang, and S. Lu, "Mul i-
scale anomaly de ec ion o ime se ies wi h a en ion-based ecu en
au oencode s," P oceedings o he 2023 Asian Con e ence on Machine
Lea ning, pp. 674-689, 2023.
[2] M. S. Islam, W. Pou majidi, L. Zhang, J. S einbache , T. E win, and A.
Mi anskyy, "Anomaly de ec ion in a la ge-scale cloud pla o m,"
P oceedings o he 2021 IEEE/ACM 43 d In e na ional Con e ence on
So wa e Enginee ing: So wa e Enginee ing in P ac ice (ICSE-SEIP),
pp. 150-159, 2021.
[3] T. Bai, H. Wang, J. Guo, X. Ma, M. Talasila, S. Tang, and Q. Yang,
"Online sel -e ol ing anomaly de ec ion o eliable cloud compu ing,"
P oceedings o he 2022 IEEE/ACM 15 h In e na ional Con e ence on
U ili y and Cloud Compu ing (UCC), pp. 31-40, 2022.
[4] Zhang S, Zhong Z, Li D, e al. E icien kpi anomaly de ec ion h ough
ans e lea ning o la ge-scale web se ices[J]. IEEE Jou nal on
Selec ed A eas in Communica ions, 2022, 40(8): 2440-2455.
[5] Yu R, Wang Y, Wang W. AMAD: Ac i e lea ning-based mul i a ia e
ime se ies anomaly de ec ion o la ge-scale IT sys ems[J]. Compu e s
& Secu i y, 2024, 137: 103603.
[6] Xin R, Chen P, G osso P, e al. A ine-g ained obus pe o mance
diagnosis amewo k o un- ime cloud applica ions[J]. Fu u e
Gene a ion Compu e Sys ems, 2024, 155: 300-311.
[7] Callou G, Viei a M. A ailabili y and pe o mance analysis o cloud
se ices[C]//P oceedings o he 13 h La in-Ame ican Symposium on
Dependable and Secu e Compu ing. 2024: 262-271.
[8] Xu J, Wu H, Wang J, e al. Anomaly ans o me : Time se ies anomaly
de ec ion wi h associa ion disc epancy[J]. a Xi p ep in
a Xi :2110.02642, 2021.
[9] He H, Li X, Chen P, e al. E icien ly localizing sys em anomalies o
cloud in as uc u es: a no el dynamic g aph ans o me based pa allel
amewo k[J]. Jou nal o Cloud Compu ing, 2024, 13(1): 115.
[10] J. Xu, H. Wu, J. Wang, and M. Long, "Anomaly ans o me : Time
se ies anomaly de ec ion wi h associa ion disc epancy," a Xi p ep in
a Xi :2110.02642, 2021.
[11] Doshi K, Abudalou S, Yilmaz Y. Tisa : Time se ies anomaly
ans o me [J]. a Xi p ep in a Xi :2203.05167, 2022.