scieee Science in your language
[en] (orig)

Run-Time Adaptation of Complex Event Forecasting

Author: Alevizos, Elias; Giatrakos, Nikos; Artikis, Alexander
Publisher: Zenodo
DOI: 10.1145/3701717.3730539
Source: https://zenodo.org/records/15629511/files/3701717.3730539.pdf
Run-Time Adap a ion o Complex E en Fo ecas ing
Manolis Pi sikalis
NCSR Demok i os
A hens, G eece
[email p o ec ed]
Elias Ale izos
NCSR Demok i os
A hens, G eece
The Ame ican College o G eece
A hens, G eece
[email p o ec ed]
Nikos Gia akos
Technical Uni e si y o C e e
Chania, G eece
[email p o ec ed]
Alexande A ikis
NCSR Demok i os
A hens, G eece
Uni e si y o Pi aeus
Pi aeus, G eece
[email p o ec ed]
Abs ac
Complex E en Fo ecas ing (CEF) is a p ocess whe eby com-
plex e en s o in e es a e o ecas o e a s eam o simple
e en s. CEF acili a es p oac i e measu es by an icipa ing
he occu ence o complex e en s. This p oac i e p ope y,
makes CEF a c ucial ask in many domains; o ins ance, in
ma i ime si ua ional awa eness, o ecas ing he a i al o
essels a po s allows o be e esou ce managemen , and
highe ope a ional e iciency. Howe e , ou wo ld’s dynamic
and e ol ing condi ions necessi a e he use o adap i e me h-
ods. Fo example, o sa e y easons, ma i ime essels may
adap hei ou es o a oid powe ul swell wa es; in aud an-
aly ics, auds e s e ol e hei ac ics o a oid de ec ion e c.
CEF sys ems ypically ely on p obabilis ic models, ained
on his o ical da a. This ende s such CEF sys ems inhe en ly
suscep ible o da a e olu ions ha can in alida e hei un-
de lying models. To add ess his p oblem, we p opose
RTCEF
,
a no el amewo k o Run-Time Adap a ion o CEF, based
on a dis ibu ed, se ice-o ien ed a chi ec u e. We e alua e
RTCEF
on wo use-cases and ou ep oducible esul s show
ha ou p oposed app oach has signi ican bene i s in e ms
o o ecas ing pe o mance wi hou sac i icing e iciency.
CCS Concep s
•Compu e sys ems o ganiza ion
→
Real- ime sys ems;
•Theo y o compu a ion
→
Fo mal languages and au-
oma a heo y;•Ma hema ics o compu ing
→
Bayesian
compu a ion.
This wo k is licensed unde a C ea i e Commons A ibu ion 4.0 In e na-
ional License.
DEBS ’25, Go henbu g, Sweden
©2025 Copy igh held by he owne /au ho (s).
ACM ISBN 979-8-4007-1332-3/25/06
h ps://doi.o g/10.1145/3701717.3730539
Keywo ds
complex e en o ecas ing, un- ime adap a ion, op imisa ion
ACM Re e ence Fo ma :
Manolis Pi sikalis, Elias Ale izos, Nikos Gia akos, and Alexande
A ikis. 2025. Run-Time Adap a ion o Complex E en Fo ecas ing.
In The 19 h ACM In e na ional Con e ence on Dis ibu ed and E en -
based Sys ems (DEBS ’25), June 10–13, 2025, Go henbu g, Sweden.
ACM, New Yo k, NY, USA, 12 pages. h ps://doi.o g/10.1145/3701717.
3730539
1 In oduc ion
Complex E en Fo ecas ing (CEF) is akin o Complex E en
Recogni ion (CER) [
17
,
22
], bu wi h a o wa d-looking pe -
spec i e. Bo h asks ope a e on a s eam o simple e en s,
while hei ou pu consis s o Complex E en s (CEs). Fo
example, in a ma i ime si ua ional awa eness [
4
], he s eam
o simple e en s would con ain posi ional messages o es-
sels, while he ou pu s eam would con ain ma i ime CEs
such as (illegal) ishing ac i i ies. The di e ence be ween
CER and CEF is ha , in he o me , elemen s o he ou pu
s eam e e o CE de ec ions, while in CEF, elemen s o he
ou pu s eam e e o he p obabili y o a CE happening in
he u u e. Consequen ly, CER enables eac i e esponses
upon CE de ec ions, while CEF suppo s p oac i e measu es
by an icipa ing u u e CEs. This p oac i e p ope y ende s
CEF sys ems highly desi able. CER and CEF applica ions
span di e se domains, such as ma i ime si ua ional awa e-
ness [
2
,
28
] whe eby CEs such as ishing a e de ec ed o
o ecas o e a s eam o ma i ime da a; c edi ca d aud
managemen [
2
,
32
] whe eby auds a e de ec ed o o ecas
o e a s eam o ansac ion da a; and so on.
CEF ope a es o e cons an ly e ol ing condi ions. Take o
example he p oblem o ma i ime ou e op imisa ion. Vessels
may ollow a di e en ou e depending on he swell wa e
condi ions, i.e., wa es ha can signi ican ly a ec na iga ion
and essel s abili y [
11
]. Ano he example is inancial aud
9
DEBS ’25, June 10–13, 2025, Go henbu g, Sweden Pi sikalis e al.
de ec ion— auds e s cons an ly adap hei ac ics o a oid
ge ing caugh [
3
]. Mo eo e , CEF sys ems ely on p oba-
bilis ic models ained on his o ical da a [
1
,
25
,
26
]. This
ende s CEF sys ems inhe en ly suscep ible o e olu ions in
he inpu ha can in alida e hei unde lying models— ecall
he p e ious example ela ing ma i ime ou es wi h wea he .
Addi ionally, as wi h he majo i y o ainable models, CEF
models ha e hype pa ame e s ha equi e ine uning o op-
imal pe o mance. Wayeb [
2
], a s a e-o - he-a CEF engine,
is no excep ion o he abo e.
To add ess he abo e challenges we p opose
RTCEF
, an
open-sou ce amewo k o Run-Time Adap a ion o CEF
o e cons an ly e ol ing da a s eams.
RTCEF
adop s a dis-
ibu ed a chi ec u e comp ising a ge ed se ices o e ec-
i ely (a) enable un- ime upda e o CEF models wi h li le
o no down ime, (b) ensu e ha ansi ion be ween mod-
els does no cause loss o o ecas s. In o he wo ds,
RTCEF
suppo s con inuous adap a ion o dynamic changes in he
inpu s eam wi h li le o no e ec on e iciency. Fu he -
mo e,
RTCEF
p o ides a end-based policy which ac s as a
decision making mechanism o dis inguish whe he hype -
pa ame e op imisa ion o CEF model e aining, wi hou
changing hype pa ame e s, is he bes way o main ain accu-
a e o ecas s. In addi ion o
RTCEF
, we also p esen
o CEF
,
a baseline amewo k o CEF hype pa ame e op imisa ion,
ha in con as o
RTCEF
, op imises CEF in an o line manne .
Ou con ibu ions a e:
•
we in oduce
RTCEF
, an open-sou ce
1
amewo k add ess-
ing he challenges and equi emen s o un- ime CEF o e
e ol ing da a s eams h ough a dis ibu ed a chi ec u e
which enables CEF o seamlessly un on pa wi h aining
o op imisa ion asks, ensu ing no dis up ions;
•
we o mally p o e ha
RTCEF
achie es lossless un ime
adap a ion, i.e., no o ecas is los upon hype pa ame e
op imisa ion o e aining decisions;
•
we ex ensi ely e alua e
RTCEF
and
o CEF
on wo eal-
wo ld c i ical use-cases om he ma i ime and inancial
domains and ou ep oducible esul s alida e ha
RTCEF
,
compa ed o
o CEF
, can signi ican ly imp o e o ecas ing
pe o mance wi h li le o no lag upon un- ime changes.
2 Backg ound
CEF is a ask ha allows o ecas ing CEs o in e es , such as
ishing ac i i ies o essel endez ous, o e an inpu s eam
o simple e en s; e.g., imes amped posi ion messages o ma -
i ime essels. Fo ecas s in ol e he occu ence o a CE in
he u u e accompanied by a deg ee o ce ain y [
2
]. This
beha iou is usually de i ed om s ochas ic models ha
p ojec in o he u u e e olu ions o he inpu ha can cause
a de ec ion o a CE. Fo he ask o CEF, we u ilise Wayeb,
1h ps://zenodo.o g/ eco ds/15229227
Table 1: An example s eam o a single essel com-
posed o i e e en s. Each e en has a essel iden i ie ,
a alue o ha essel’s speed and a imes amp.
essel ID 78986 78986 78986 78986 78986 ...
speed 5 3 9 14 11 ...
imes amp 1 2 3 4 5 ...
a CEF engine in oduced in [
2
], which employs symbolic
au oma a as i s compu a ional model. The use submi s a
que y/pa e n o Wayeb which is hen compiled in o a sym-
bolic, s eaming au oma on. This au oma on may be used o
pe o m e en ecogni ion, i.e., o de ec ins ances o pa e n
sa is ac ion upon a s eam o inpu e en s. Whene e he
au oma on eaches a inal s a e, a complex e en is epo ed
as ha ing occu ed. In o de o pe o m o ecas ing, Wayeb
cons uc s a p obabilis ic model o he compiled au oma on,
by using pa (s) o a s eam o aining. The model allows
us o in e , a any gi en momen , he possible pa hs ha he
au oma on may ollow in he u u e. By sea ching among he
possible u u e pa hs, we can es ima e when he au oma on
is expec ed o each a inal s a e and hus epo a CE. The
ou pu o Wayeb hus consis s o wo s eams: a) one epo -
ing he de ec ed e en s, and b) one epo ing he o ecas s
o e en s expec ed o occu in he u u e.
Wayeb has clea , composi ional seman ics o he pa e ns
exp essed in i s language and can suppo mos o he com-
mon ope a o s [
17
]. Wayeb’s pa e ns a e exp essed as Sym-
bolic Regula Exp essions (
SRE
s), whe e e minal exp essions
a e Boolean exp essions, i.e., logical o mulae ha use he
s anda d Boolean connec i es o conjunc ion ‘
∧
’, disjunc-
ion ‘
∨
’ and nega ion ‘
¬
’ on p edica es [
2
]. Wayeb
SRE
s a e
de ined using he g amma below:
𝑅::=𝑅1+𝑅2(union) | 𝑅1·𝑅2(conca ena ion)
|𝑅∗
1(Kleene-s a )| !𝑅1(complemen )
|𝜓(Boolean exp ession)
𝑅1, 𝑅2
a e egula exp essions, and
𝜓
is a Boolean exp ession.
The seman ics o he abo e ope a o s a e de ailed in [
2
].
E alua ion o
SRE
s on a s eam o e en s equi es i s hei
compila ion in o symbolic au oma a. T ansi ions in sym-
bolic au oma a a e labeled wi h Boolean exp essions. Fo
a symbolic au oma on o mo e o ano he s a e, i i s ap-
plies he Boolean exp essions o i s cu en s a e’s ou going
ansi ions o he elemen las ead om he s eam. I an
exp ession is sa is ied, hen he co esponding ansi ion is
igge ed and he au oma on mo es o ha ansi ion’s a -
ge s a e. Fo example, in ma i ime si ua ional awa eness,
a domain expe could use Wayeb’s language o speci y a
pa e n
𝑅
:
=(𝑠𝑝𝑒𝑒𝑑 >
10
)·(𝑠𝑝𝑒𝑒𝑑 >
10
)
o iden i ying
10
Run-Time Adap a ion o Complex E en Fo ecas ing DEBS ’25, June 10–13, 2025, Go henbu g, Sweden
0
s a 1 2
¬(speed >10)
speed >10
¬(speed >10)
speed >10
Figu e 1: S eaming symbolic au oma on c ea ed om
he exp ession 𝑅:=(𝑠𝑝𝑒𝑒𝑑 >10)·(𝑠𝑝𝑒𝑒𝑑 >10).
speed iola ions in speci ic a eas whe e he maximum al-
lowed speed is 10
𝑘𝑛𝑜𝑡𝑠
. This pa e n is sa is ied when he e
a e wo consecu i e e en s whe e a essel’s speed exceeds
he h eshold. The compiled au oma on co esponding o
𝑅
is illus a ed in Figu e 1. Fo an inpu s eam consis ing o
he e en s in Table 1, he au oma on would un as ollows.
Fo he i s h ee inpu e en s, he au oma on emains in
s a e 0. A e he ou h e en , i mo es o s a e 1and a e
he i h e en i eaches i s inal s a e, s a e 2, igge ing also
a CE de ec ion o 𝑅a imes amp =5.
To pe o m CEF, Wayeb needs a p obabilis ic desc ip ion
o a symbolic au oma on de i ed om a
SRE
. Fo his pu -
pose, Wayeb employs P edic ion Su ix T ees (PSTs) [
30
,
31
]–
a o m o Va iable-o de Ma ko Models. Va iable-o de
Ma ko Models, compa ed o ixed-o de Ma ko models,
cap u e longe - e m dependencies as in p ac ice hey allow
o highe o de (
𝑚
) alues han he la e . Each node in a
PST con ains a “con ex ” and a dis ibu ion ha indica es
he p obabili y o encoun e ing a symbol, condi ioned on
he con ex . Figu e 4 ( op le ) shows an example o a PST.
Each “symbol” o a PST co esponds o a p edica e o he
au oma on o which we wan o build a p obabilis ic model.
Fo example, he p edica e
(𝑠𝑝𝑒𝑒𝑑>
10
)
may be such a “sym-
bol” o he pa e n
𝑅
. The same p edica e, bu nega ed i.e.,
¬(𝑠𝑝𝑒𝑒𝑑>
10
)
, may be ano he such “symbol”. Lea ning a PST
om da a is an inc emen al p ocess ha adds new nodes co -
esponding o symbols only when necessa y [
2
,
30
,
32
]. The
lea ning p ocess in ol es wo key hype pa ame e s. Fi s ,
he
pMin ∈ [
0
,
1
]
hype -pa ame e which co esponds o
a h eshold de e mining which symbols a e deemed o be
“ oo a e” o be aken unde conside a ion by he lea ning
algo i hm (symbols wi h a p obabili y o appea ance less
han
pMin
a e disca ded). Second, he
𝛾
hype pa ame e is a
symbol dis ibu ion smoo hing pa ame e .
Wi h he esul ing PST, o e e y s a e
𝑞
o an au oma on
and he las
𝑚
(o de o he PST) symbols o he inpu s eam,
we can calcula e he wai ing- ime dis ibu ion (
𝑊𝑞
), ha is,
he p obabili y o eaching a inal s a e in
𝑛
ansi ions om
a s a e
𝑞
. Recall ha a CE is de ec ed whene e an au oma on
eaches a inal s a e. Figu e 4 (middle and bo om le ) shows
an example o an au oma on and he wai ing- ime dis ibu-
ions lea n om a aining da ase . Wayeb hen pe o ms
CEF as ollows. Gi en he cu en s a e
𝑞
o an au oma on,
using
𝑊𝑞
, we compu e he p obabili y o eaching a inal s a e
(
𝑝𝐶𝐸
) wi hin he nex
𝑛
ansi ions (o , equi alen ly, inpu
e en s). I
𝑝𝐶𝐸
exceeds a con idence h eshold
𝜃 c ∈ [
0
,
1
]
,
Wayeb emi s a “posi i e” o ecas (deno ing ha he CE is
expec ed o occu ), o he wise a “nega i e o ecas ” (no CE is
expec ed) is emi ed.
A o ecas o a CE is cha ac e ised as a T ue Posi i e (
TP
)
i a posi i e o ecas (i.e., he CE will occu in he u u e)
was emi ed and he CE indeed occu ed o , espec i ely, as a
False Posi i e (
FP
) i he CE did no occu . A o ecas o a CE
is cha ac e ised as a T ue Nega i e (
TN
) i a nega i e o ecas
is emi ed (i.e., he CE will no occu in he u u e) and he
CE does no occu o , espec i ely, as a False Nega i e (
FN
) i
he CE does occu . No e ha a o ecas canno be e alua ed
as
TP
,
FP
,
TN
o
FN
upon i s emission. I can be e alua ed
as such a e he nex
𝑛
inpu e en s ha e a i ed, a which
poin we can know whe he he o ecas e en did occu o
no . Gi en ha Wayeb pe o ms bo h CEF and CER, o e-
cas s a e e alua ed on- he- ly. Using hese classi ica ions o
o ecas s, he pe o mance o CEF may be quan i ied h ough
Ma hew’s Co ela ion Coe icien (
MCC
), de ined as ollows:
𝑀𝐶𝐶 =√︁P ecision ×Recall ×Speci ici y ×NPV
−√FDR ×FNR ×FPR ×FOMR (1)
whe e
NPV =TN
TN+FN
,
Speci ici y =TN
TN+FP
,
FDR =
1
−
P ecision
,
FNR =
1
−Recall
,
FPR =
1
−Speci ici y
and
FOMR =
1
−NPV
.P ecision and Recall a e de ined as usual.
The e o e,
MCC ∈ [−
1
,
1
]
es ima es he ag eemen , in which
case
MCC =
1, (o disag eemen , esp.
MCC =−
1) be ween
he emi ed o ecas s and obse a ions. In con as o F1-
Sco e, which akes in o accoun only posi i e ins ances,
MCC
akes in o accoun bo h posi i e and nega i e ins ances. Since
Wayeb p oduces bo h posi i e and nega i e o ecas s,
MCC
is a i ing choice.
Gi en he abo e, he hype pa ame e s equi ed o ain-
ing Wayeb models, i.e., PSTs, a e he ollowing. The maxi-
mum o de
𝑚
o he PST, along wi h he symbol e aining
p obabili y h eshold
pMin
, he symbol dis ibu ion smoo h-
ing pa ame e
𝛾
and he con idence h eshold
𝜃 c
. The nai e
way o ain a Wayeb PST is o manually ix he alues o
hese hype pa ame e s and hen selec a aining da ase
om which a PST may be ex ac ed. This p ocess can be
pe o med o line and Wayeb may hen employ he lea n
PST o online e en o ecas ing. As we explain below, his
is no he p ope way o go.
3 Challenges o CEF
Pe o ming CEF o e cons an ly e ol ing da a s eams ex-
hibi s se e al signi ican challenges.
Challenge 1. CEF hype pa ame e op imisa ion en ails com-
plica ed ade-o s.
11
DEBS ’25, June 10–13, 2025, Go henbu g, Sweden Pi sikalis e al.
5 10 15 20 25
0
0.2
0.4
0.6
0.8
1
Weeks (Ma i ime)
MCC
Wayeb
20 40 60 80
0
0.2
0.4
0.6
0.8
1
Weeks (Finance)
Wayeb
Figu e 2:
MCC
sco es o Wayeb o o ecas ing a CE
ela ed o he a i al o essels a a po o e ma i ime
posi ional da a (le ), and o ecas ing he occu ence
o inancial auds o e ansac ional da a ( igh ).
In Wayeb, al hough se ing he maximum o de mgen-
e ally imp o es accu acy, i leads o longe aining imes.
Simila ly, inding he op imal alue o
𝜃 c
, i.e., he p oba-
bili y h eshold o emi ing a o ecas , is a c ucial s ep as
o e ly low o high
𝜃 c
alues can cause many alse posi-
i es o alse nega i es, espec i ely. Fu he mo e,
pMin
, he
h eshold de e mining which symbols a e “ oo a e” o be
included du ing aining, can also a ec accu acy. High
pMin
alues can p oduce simple models bu may disca d use ul
symbols. On he o he hand, excessi ely low alues o
pMin
can deg ade he accu acy o he o ecas s due o o e i ing
o he PSTs o insigni ican symbols. The symbol dis ibu ion
smoo hing pa ame e
𝛾
beha es in he same manne . Manu-
ally ixing he abo e combina ion o pa ame e s would lead
o sub-op imal esul s. Mo eo e , exhaus i e hype pa ame-
e space explo a ion is o high compu a ional complexi y
making i p ohibi i e o un- ime se ings whe e Wayeb’s
hype pa ame e s need o be uned mul iple imes o adjus o
da a e olu ions ha in alida e he deployed PSTs. To add ess
hese issues,we p opose
RTCEF
, a amewo k o he un- ime
adap a ion o CEF.
RTCEF
, p esen ed in he ollowing sec ion,
employs Bayesian op imisa ion o e icien ly explo e only a
small ac ion o he pa ame e space and lea n he op imal
combina ion o hype pa ame e alues o he en i e pa am-
e e space. Fu he mo e, in con as o adi ional Bayesian
op imisa ion se ups, we do no s a each op imisa ion un
om sc a ch, ins ead we le e age knowledge om p e ious
uns by cons an ly e eshing a sample se wi h new samples.
Challenge 2. Run- ime CEF op imisa ion has inhe en ly in-
c eased complexi y, while CEF applica ions ypically in ol e
p ocessing Big s eaming Da a wi h ola ile s a is ical p ope -
ies ha can se e ely a ec CEF pe o mance.
Run- ime op imisa ion o Wayeb is a complica ed and
challenging ask because i in ol es (a) aining a Va iable-
o de Ma ko Model, ha is, a PST (b) using i o es ima ing
wai ing- ime dis ibu ions and (c) subsequen ly pe o ming
p obabilis ic, au oma on-based pa e n ma ching (Figu e 4).
Consequen ly, employing an analy ical o mula o model he
pe o mance o Wayeb o a gi en hype pa ame e se and
inpu is impossible wi hou aining and es ing Wayeb.
Al hough an ini ial op imal hype pa ame e se can be
ound o some his o ical da ase , in he un- ime se ings
en i onmen al changes migh happen ha can in alida e
he deployed Wayeb’s PST. See o example Figu e 2, which
shows he
MCC
sco e o Wayeb on o ecas ing wo CE in a
ma i ime si ua ional awa eness se ing and a inancial aud
de ec ion se ing. In bo h cases da a e olu ions in he inpu
s eam cause signi ican luc ua ions and d ops in CEF sco es.
Consequen ly, he e is a need o con inuous adap a ion o e
e ol ing da a s eams.
RTCEF
add esses his challenge wi h
un- ime PST e aining o hype pa ame e op imisa ion.
Challenge 3. Time-c i ical applica ions employing CEF e-
qui e undis up ed p oduc ion o o ecas s.
In c i ical applica ions, such as ma i ime si ua ional awa e-
ness o c edi ca d aud managemen , upda ing he cu -
en ly deployed PST wi h a new e sion should no s all
he p oduc ion o CE o ecas s, as such delays would hal
he p oac i e decision-making mechanisms o s akeholde s.
Consequen ly, upda ing he deployed PST wi h newly e-
ised e sions should happen in negligible ime ensu ing no
dis up ions in CEF and no loss o o ecas s. Finally, al hough
hype pa ame e op imisa ion can esul in high pe o ming
models, i does no come wi hou a cos . Hype pa ame e op-
imisa ion is, esou ce-wise, an expensi e p ocedu e which
should only happen when necessa y. The
RTCEF
amewo k
add esses he abo e challenges using a no el dis ibu ed,
se ice-o ien ed a chi ec u e.
4 Run-Time CEF Adap a ion
We s a by p esen ing
o CEF
, a baseline amewo k o
hype pa ame e op imisa ion o CEF unde he s a iona i y
assump ion, i.e., assuming ha he e a e no e olu ions in he
inpu ha migh in alida e he CEF model. Subsequen ly, we
p esen
RTCEF
, which add esses all challenges o un- ime
CEF men ioned in Sec ion 3.
4.1
CEF Unde he S a iona i y Assump ion
Unde he s a iona i y assump ion, a single PST, p oduced
h ough aining on some his o ical, s a ic da ase , will su ice
o u u e inpu . Consequen ly, in his se ing, we may use
a amewo k o o line hype pa ame e op imisa ion, he e-
a e
o CEF
. The aim o
o CEF
is he iden i ica ion o an
op imal con igu a ion
𝑐𝑜𝑝𝑡
ha yields he bes pe o mance
o Wayeb, quan i ied by he
MCC
sco e (see Equa ion
(1)
).
A con igu a ion 𝑐is de ined as ollows:
𝑐=[𝑚,𝜃 c,pMin,𝛾]
whe e
𝑚
,
𝜃 c
,
pMin
and
𝛾
a e Wayeb’s hype pa ame e s (see
Sec ion 2) wi h hei domain empi ically se as:
𝑚∈ [1,5]𝜃 c ∈ [0.0,1.0]
pMin ∈ [0.0001,0.01]𝛾∈ [0.0001,0.01]
12
Run-Time Adap a ion o Complex E en Fo ecas ing DEBS ’25, June 10–13, 2025, Go henbu g, Sweden
Pe o mance Me ic
x
(a) P io knowledge.
Dini
x
Pe o mance Me ic
(b) 𝐷𝑖𝑛𝑖𝑡 samples ( ed lines).
x
a(x) alue
nex mic o-benchma k
(c) Sampling ia 𝑎(𝑥).
Comple ed mic o-
benchma ks
x
Pe o mance Me ic
(d) BO conclusion.
Figu e 3: Bayesian Op imisa ion Ope a ion.
Model Fac o y (O line) Con olle (o line)
Wayeb Se e
• Lea n a p edic ion su ix ee
• Es ima e wai ing ime dis ibu ions
TRAIN
TEST
C
Sco e
BO (GPR) Model
C
nex mic o-benchma k
Acq. unc. alue
Acquisi ion unc ion
BO op imise
His o ical
da a
Sa ed
models
¬con e gence ? new
mic o-bench.:deploy
op . model
Hype -
pa ame e s
[m, θ c,
pMin, γ]
MCC sco e
Repo
Pe o m CEF unde he s a iona i y assump ion
• Cons uc o ecas s
ε, (0.6, 0.4)
a, (0.7, 0.3) b, (0.5, 0.5)
aa, (0.75, 0.25) ba, (0.1, 0.9)
0
s a 1 2 3 4
a b b b
a
a
a
b
ba
1 2 3 4 5 6 7 8 9 10 11 12
Numbe o u u e e en s
0
0.2
0.4
0.6
0.8
1
Comple ion P obabili y
s a e:0
in e al:5,12
s a e:1
s a e:2
s a e:3
Figu e 4: A chi ec u e o o CEF.
Gi en he in ini e pa ame e combina ions, exhaus i e sea ch
is compu a ionally p ohibi i e. Fu he mo e, due o Wayeb’s
complexi y, pe o mance o a gi en pa ame e se canno
be known be o ehand. Consequen ly, o ind he op imal
con igu a ion
𝑐
we employ Bayesian op imisa ion (BO) [
6
,
14
]
i.e., a s ochas ic me hod o op imising expensi e- o-e alua e
objec i e unc ions ha a e complex o canno be desc ibed
by analy ic o mulae. In ou wo k, he objec i e unc ion
is de ined as
𝑓(𝑐)=MCC𝑐
, whe e
MCC𝑐
deno es he
MCC
sco e o Wayeb gi en con igu a ion 𝑐.
The goal o BO is o ind he ec o o Wayeb’s hype pa-
ame e s ha maximises CEF pe o mance, using a minimal
se o Wayeb aining- es uns, e med ‘mic o-benchma ks’,
as aining samples. Unlike o he op imisa ion me hods [
34
]
BO does no equi e a high numbe o mic o-benchma ks
o an analy ical o mula [
6
,
14
,
32
]. BO employs a p oba-
bilis ic model—called su oga e model— o app oxima e he
unknown objec i e unc ion, in ou case CEF pe o mance
quan i ied by
MCC
, and i e a i ely e ines his model. We
employ a Gaussian P ocess Reg esso (GPR) as he su oga e
model. Ini ial belie s abou he objec i e unc ion mus be
o mula ed be o e obse ing any da a. In BO, p io s a e o -
en speci ied o he mean and co a iance unc ions o he
Gaussian P ocess model. Fo example, a p io belie migh
sugges ha he unc ion is smoo h and lies wi hin a ce ain
ange o alues. P io s a e ep esen ed as:
𝑓(𝑐) ∼ GP(𝜇0(𝑐), 𝑘0(𝑐,𝑐′))
whe e
𝜇0(𝑐)
and
𝑘0(𝑐, 𝑐′)
a e he p io mean and co a iance
(ke nel) unc ions, espec i ely.
E e y ime we obse e a new mic o-benchma k and col-
lec CEF pe o mance me ics by aining and es ing Wayeb
gi en a con igu a ion
𝑐
, we acqui e a new aining sample
(𝑐, MCC𝑐)
, o i on he GPR, he eby upda ing ou pos e io
belie in ligh o new e idence. The pos e io dis ibu ion
ep esen s ou upda ed knowledge abou Wayeb’s pe o -
mance and a e obse ing
𝑛
new aining samples, deno ed
by Da a, he pos e io is gi en by:
𝑓(𝑐) | Da a ∼GP(𝜇𝑛(𝑐),𝑘𝑛(𝑐,𝑐′))
𝜇𝑛(𝑐)
and
𝑘𝑛(𝑐, 𝑐′)
being he pos e io mean and co a iance
unc ions upda ed h ough Bayesian in e ence [6, 14].
Fo selec ing aining samples, we s a by andomly pick-
ing poin s om he inpu pa ame e domain, and hen exe-
cu e he espec i e mic o-benchma ks and obse e Wayeb’s
MCC
sco es. We call his ini ial se o con igu a ions
𝑐
, pai ed
wi h
MCCc
sco es,
𝐷𝑖𝑛𝑖𝑡
. Subsequen ly, using Bayesian in e -
ence, he i s pos e io s a e calcula ed and he expec ed e-
sul is illus a ed by compa ing he p io in Figu e 3a agains
he pos e io in Figu e 3b.
A e
𝐷𝑖𝑛𝑖𝑡
, he nex mic o-benchma ks a e selec ed using
an acquisi ion unc ion
𝑎(𝑐)
. The acquisi ion unc ion guides
he selec ion o he nex e alua ion poin by quan i ying he
u ili y o sampling a pa icula poin
𝑥
in he inpu space
i.e., he domain o Wayeb’s con igu a ions.
𝑎(𝑐)
balances ex-
plo a ion and exploi a ion. Explo a ion in ol es sampling
𝑐
con igu a ions in he inpu space ha a e no ye well-
explo ed o ha ha e high unce ain y associa ed wi h hem,
while exploi a ion in ol es sampling
𝑐
poin s ha a e likely
o yield he bes objec i e unc ion alues exploi ing he cu -
en knowledge. Fo ins ance, in he plo o Figu e 3c he
acquisi ion unc ion chooses he poin in he inpu domain
wi h he highes unce ain y. Di e en acquisi ion unc ions
in oduce s ochas ici y in he BO p ocess by inco po a ing
unce ain y es ima es om he p obabilis ic model. BO con-
cludes ei he when a mic o-benchma k budge is deple ed
o when he alue o
𝑓(𝑐)
con e ges. Figu e 3d illus a es a
GPR wi h minimal unce ain y a ound i s mean alues, a e
he mic obenchma k budge has been deple ed.
13

DEBS ’25, June 10–13, 2025, Go henbu g, Sweden Pi sikalis e al.
Figu e 4 illus a es he a chi ec u e o
o CEF
, comp is-
ing a Model Fac o y alongside a Con olle . The Model Fac-
o y includes a Wayeb Se e ha u ilises his o ical aining
and alida ion da ase s o cons uc and e alua e PSTs. The
Con olle , includes he BO op imise which is execu ed o -
line on a his o ical da ase . The Con olle ini ialises BO
by p o iding a se o con igu a ions i.e.,
𝑐
ec o s o he
Model Fac o y, which, espec i ely, conduc s he p esc ibed
mic o-benchma ks, sa es empo a ily he candida e PSTs,
and sends epo s o he Con olle . The Con olle will use
hese epo s o upda ing he GPR su oga e model o BO.
o CEF
deploys he PST ha is expec ed o maximise
MCC
based on he hype pa ame e ec o
𝑐𝑜𝑝𝑡
calcula ed by BO.
On he o he hand,
o CEF
su e s om se e al disad an-
ages: (i) i d i es i s decisions by a ibu ing equal impo -
ance o cumula i e pe o mance me ic s a is ics, while in
a s eaming se up we o en need o ake in o conside a ion
only a sliding window o ecen measu emen s and de y
obsole e ones; (ii) i canno op imise CEF hype pa ame e s
a un- ime which is a c ucial limi a ion, since luc ua ions
in he inpu ’s s a is ical p ope ies in s eaming se ings is
he no m a he han an in equen si ua ion; (iii) i canno
dis inguish whe he he hype pa ame e s o aining PSTs
should be adjus ed h ough BO o i i is only he Wayeb’s
PST ha should be e ained, wi hou changing hype pa am-
e e s. RTCEF, p esen ed below, add esses hese issues.
4.2 CEF O e E ol ing Da a S eams
We p opose RTCEF, which is buil wi h h ee majo goals in
mind. Fi s , i upda es a un- ime PSTs acco ding o inpu
da a e olu ions; second, i pe o ms CEF wi hou dis up ions,
i.e., PST upda ing does no cause delays on CEF; and hi d,
i does no o e use esou ces o p oducing new PSTs. The
a chi ec u e o
RTCEF
consis s o i e main se ices, ac ing as
Ka ka p oduce s and consume s, unning syne gis ically o
ensu e undis up ed CEF and dynamic PST e aining o hy-
pe pa ame e op imisa ion. Figu e 5 illus a es hese se ices
and he communica ion links be ween hem. Synch onisa-
ion o he a ious se ices is deno ed by do ed a ows in
Figu e 5. Below wi h de ails he p ocessing o each se ice
comp ising ou amewo k.
Obse e . In o de o de e mine whe he he
MCC
sco e
o Wayeb has de e io a ed, he quali y o i s o ecas s mus
be moni o ed. This ask is handled by he Obse e se ice
( igh o Figu e 5) which consumes
MCC
sco es om he ‘Re-
po s’ opic and, p oduces ‘ e ain’ o ‘op imise’ ins uc ions
as indica ed in Algo i hm 1. Essen ially, a e ain ins uc ion
eques s a new PST o Wayeb wi hou changing aining hy-
pe pa ame e s. An op imisa ion ins uc ion, eques s a new
PST, p oduced h ough hype pa ame e op imisa ion. No e
Collec o
Da ase s
Ou pu
s eam
Inpu
s eam Wayeb
Models Repo s
Model Fac o y
Commands Sco es
Con olle
Obse e
Ins uc s
Da a
collec ion Op imisa ion and e- aining
Complex e en o ecas ing
Me ics
moni o ing
Figu e 5: A chi ec u e o
RTCEF
. Cylinde s and ounded
ec angles deno e opics and se ices espec i ely. Fo
simplici y, we omi synch onisa ion opics; ins ead we
use g ay a ows.
Algo i hm 1 Obse e se ice
Requi e: 𝑘, gua d_n,𝑚𝑎𝑥_𝑠𝑙𝑜𝑝𝑒, min_sco e
1: sco es ← []
2: gua d ← −1
3: while T ue do
4: sco e𝑖←consume(Repo s)
5: sco es.upda e(sco e𝑖, k)
6: pi _cond ←sco e𝑖<min_sco e
7: slope_cond ←False
8: i gua d ≥0 hen gua d ←gua d −1
9: i len(|𝑠𝑐𝑜𝑟𝑒𝑠|)>2 hen
10: (𝑎𝑖,𝑏𝑖) ← i _ end(sco es)
11: slope_cond ←𝑎𝑖<max_slope
12: i (slope_cond and gua d ≥0)o pi _cond hen
13: send(“ins uc ions”, “op imise”)
14: gua d ←gua d_n⊲New gua d pe iod
15: else i slope_cond hen
16: send(“ins uc ions”, “ e ain”)
17: gua d ←gua d_n⊲New gua d pe iod
ha hype pa ame e op imisa ion will p o ide he bes pos-
sible hype pa ame e s, bu can be cos ly p ocedu e, whe eas
e aining on an upda ed da ase is a cheape p ocess. We
desc ibe Algo i hm 1 ollowing i s illus a i e execu ion ex-
ample o ma i ime si ua ional awa eness p esen ed in Fig-
u e 6. The Obse e con inuously consumes
MCC
sco es
om Wayeb and e ains he
𝑘
mos ecen
MCC
sco es o
e alua e he pe o mance end. In he example o Figu e 6,
Wayeb begins wi h a PST, e e ed o as PST
𝑤0
, c ea ed using
con igu a ion
𝑐𝑤0
. The Obse e eco ds he MCC Sco e a
𝑤0
, howe e a his poin no decision is made since ewe
han
𝑘=
3sco es ha e been collec ed. Once he Obse e
has a leas
𝑘
sco es, i compu es he i s deg ee polynomial
𝑧𝑖(𝑥)=𝑎𝑖𝑥+𝑏𝑖
(a end line) so ha
𝑎𝑖
and
𝑏𝑖
minimise
14
Run-Time Adap a ion o Complex E en Fo ecas ing DEBS ’25, June 10–13, 2025, Go henbu g, Sweden
𝑤0𝑤1𝑤2𝑤3𝑤4𝑤5𝑤6
0.4
0.6
0.8
𝛼𝑤2≃ −0.04𝛼𝑤4≃ −0.05
gua d gua d
Weeks
MCC
Wayeb
op
end end
Figu e 6: Execu ion example o he Obse e . ‘op ’ and
‘ ’ s and o ‘op imisa ion’ and ‘ e aining’ espec-
i ely. Dashed lines co espond o he end lines as-
socia ed wi h he Obse e ’s ins uc ions a
𝑤2
and
𝑤4
,
and black lines co espond o gua d pe iods.
he squa ed e o
𝐸=Í𝑗=𝑘
𝑗=0𝑧𝑖(𝑥𝑗) −𝑦𝑗2
o
𝑥𝑗=𝑗
and
𝑦𝑗=sco e𝑖−𝑘+𝑗
, whe e
𝑖
is an inc easing in ege deno ing he
ID o he cu en sco e (lines 9, 10). I he slope (
𝑎𝑖
) o
𝑧𝑖(𝑥)
is
nega i e, indica ing dec ease in pe o mance, and less han
a
max_slope ∈R−
pa ame e (line 11) hen a ‘ e ain’ in-
s uc ion is p oduced (lines 15-17). In he example, by week
𝑤2
, he Obse e has
MCC
sco es o
𝑤0,𝑤1,𝑤2
. Using hese
poin s, he Obse e compu es he end line
𝑧𝑤2
wi h a slope
𝛼𝑤2=−
0
.
04 which is s eepe han
max_slope =−
0
.
02. To
emedy his beha iou , he Obse e issues a e ain ins uc-
ion. As a esul , a new PST, e e ed o as PST
𝑤2
, is c ea ed
using he same con igu a ion as PST
𝑤0
, i.e.,
𝑐𝑤0
. This oc-
cu s because e aining upda es he PST wi hou modi ying
Wayeb’s hype pa ame e s.
In ui i ely, o ecas ing pe o mance de e io a ion, demon-
s a ed by
𝑎𝑖<max_slope
, sho ly a e a new PST deploy-
men , indica es ha he new PST ailed and hype pa ame e
op imisa ion should hus be pe o med. To his end, we place
each newly deployed PST in a gua d pe iod (lines 14,17). A
gua d pe iod s a s a e a PST is deployed, and ends a e
gua d_n
pe o mance epo s. I he pe o mance o a PST
unde a gua d pe iod de e io a es (
𝑎𝑖<max_slope
) hen a
hype pa ame e op imisa ion ins uc ion is p oduced (lines
12,13). I on he o he hand,
𝑎𝑖<max_slope
is sa is ied a -
e
gua d_n
epo s, hen a ‘ e ain’ ins uc ion is p oduced
o which a new “gua d” pe iod begins. In he example o
Figu e 6, a gua d pe iod begins a week
𝑤2
and will las
o
gua d_n=
4 epo s, i.e., un il
𝑤5
. While PST
𝑤2
shows
imp o emen a
𝑤3
, a
𝑤4
pe o mance d ops again. The
pe o mance d op is also con i med by he slope o -0.05
compu ed by he Obse e using he
MCC
sco es om
𝑤2
o
𝑤4
. Since he slope
𝛼𝑤4
is again below
max_slope
, bu
his ime a gua d pe iod is ac i e, he Obse e issues a hy-
pe pa ame e op imisa ion ins uc ion ins ead o e aining.
Consequen ly, a new PST
𝑤4
is p oduced h ough hype pa-
ame e op imisa ion, esul ing in an upda ed con igu a ion
𝑐𝑤4
, and a new gua d pe iod s a ing a
𝑤4
. Finally, o a oid
pi alls whe eby he sco e d ops suddenly e y low, we em-
ploy an addi ional condi ion: i he sco e o a epo is lowe
han a h eshold
min_sco e
(line 6) hen he Obse e asks
di ec ly o ‘op imisa ion’ and omi s a ‘ e ain’ ins uc ion.
Wayeb. The CEF pa o
RTCEF
( op o Figu e 5) con ains
Wayeb. In addi ion o eading imes amped simple e en s
om he inpu s eam and p oducing an ou pu s eam o CE
o ecas s, Wayeb p oduces a s eam CEF o ecas ing pe o -
mance epo s, equally dis anced by
epo ing_dis ance
, and
con inuously moni o s he ‘Models’ opic, which con ains
upda ed PSTs. When a new PST is made a ailable in he Mod-
els opic, Wayeb eplaces i s PST wi h he la es a ailable
e sion. Recall ha , o p oduce a CE o ecas , Wayeb will
u ilise bo h he au oma on co esponding o he symbolic
egula exp ession de ining a CE and he PST (see Sec ion 2).
The au oma on e ains in o ma ion abou he cu en s a e
(
𝑞
) and he nex s a es ha can lead o an accep ing un, while
he PST is used o p oducing he nex symbol p obabili ies
and he e o e he wai ing- ime dis ibu ion o s a e
𝑞
(
𝑊𝑞
).
Below, we show Wayeb PST upda e is “lossless” i.e., upon
PST eplacemen , any un can con inue om i s cu en s a e
and p oduce o ecas s using he new PST.
P oposi ion 1. Gi en a s eam
𝑆={𝜎0, 𝜎1, ..., 𝜎𝑘}
whe e
𝜎𝑖
a e symbols, a SRE
𝑅
, i s co esponding au oma on
𝐴𝑅
, and
a PST
𝑇
wi h o de
𝑚∈ [𝑚𝑙,𝑚𝑢]
, he eplacemen o
𝑇
wi h
a
𝑇′
o o de
𝑚′∈ [𝑚𝑙,𝑚𝑢]
is lossless a any posi ion
𝑖
o
he s eam
𝑆
i he las
𝑚𝑢
symbols om he
𝜎𝑖
a e a ailable.
P oo .
We p o e P oposi ion 1 by con adic ion. Gi en
𝑆
,
𝑅
,
𝐴𝑅
and
𝑇
wi h o de
𝑚∈ [𝑚𝑙,𝑚𝑢]
, assume ha
𝑇
is
eplaced wi h a PST
𝑇′
wi h o de
𝑚′
a a posi ion
𝑖
. Now,
assume ha he e exis s a un ha canno con inue om i s
cu en s a e
𝑞
. This is no possible as he SRE
𝑅
emains
he same and he e o e he au oma on
𝐴𝑅
is also he same,
consequen ly he un can con inue om
𝑞
. Nex , we assume
ha he e exis s a un wi h cu en s a e
𝑞
o which he
nex symbol p obabili ies and he co esponding wai ing-
ime dis ibu ion canno be compu ed a posi ion
𝑖
unde
𝑇′
. Recall, ha o an au oma on un a posi ion
𝑗
and a
cu en s a e
𝑞
, he nex symbol p obabili y (and
𝑊𝑞
) can
be compu ed using he PST
𝑇
and
𝑆[𝑗−𝑚+1,𝑗 ]
, deno ing he
subse o
𝑆
con aining he symbols
{𝜎𝑗−𝑚+1, ..., 𝜎𝑗}
. Since,
𝑆[𝑖−𝑚𝑢+1,𝑖]
is a ailable, again he nex symbol p obabili ies
as well as he wai ing- ime dis ibu ion o any s a e
𝑞
can
be compu ed wi h 𝑇′as 𝑆[𝑖−𝑚′+1,𝑖]⊆𝑆[𝑖−𝑚𝑢+1,𝑖].□
P oposi ion 1 s a es ha upda ing a PST
𝑇
wi h a new
𝑇′
can be lossless i : i s , he o de
𝑚
o any new PST lies wi hin
he same ange
[𝑚𝑙,𝑚𝑢]
; and, second, he las
𝑚
symbols
up o he momen o he eplacemen a e a ailable.
RTCEF
ensu es bo h condi ions a e sa is ied. Conside , o example,
15
DEBS ’25, June 10–13, 2025, Go henbu g, Sweden Pi sikalis e al.
𝜖
(0.6,0.4)
𝑎
(0.7,0.3)
𝑎𝑎
(0.9,0.1)
𝑏𝑎
(0.6,0.4)
𝑏
(0.5,0,5)
(a) PST 𝑇wi h 𝑚=2.
𝜖
(0.6,0.4)
𝑎
(0.6,0.4)
𝑎𝑎
(0.9,0.1)
𝑏𝑎
(0.7,0.3)
𝑎𝑏𝑎
(0.8,0.2)
𝑏𝑏𝑎
(0.2,0.8)
𝑏
(0.5,0,5)
(b) PST 𝑇′wi h 𝑚′=3.
Figu e 7: PST
𝑇
wi h
𝑚=
2and upda ed PST
𝑇′
wi h
𝑚=
3, o
𝑅
:
=(𝑠𝑝𝑒𝑒𝑑 >
10
)·(𝑠𝑝𝑒𝑒𝑑 >
10
)
and he
symbols 𝑎=‘(𝑠𝑝𝑒𝑒𝑑 >10)’ and 𝑏=‘¬(𝑠𝑝𝑒𝑒𝑑 >10)’.
he egula exp ession
𝑅
:
=(𝑠𝑝𝑒𝑒𝑑 >
10
) · (𝑠𝑝𝑒𝑒𝑑 >
10
)
,
p esen ed ea lie in Sec ion 2 as well as i s co esponding au-
oma on illus a ed Figu e 1. A PST
𝑇
wi h o de
𝑚=
2, along
wi h a e ised PST
𝑇′
wi h o de
𝑚′=
3, and
𝑚′<𝑚𝑢
, o
𝑅
a e illus a ed in Figu es 7a and 7b espec i ely. He e, ‘
𝑎
’ co -
esponds o he symbol ‘
(speed >10)
’, while ‘
𝑏
’ co esponds
o he symbol ‘
¬(speed >10)
’. Assume ha CEF begins wi h
PST
𝑇
and p ocesses an inpu s eam
𝑆={𝑏, 𝑎, 𝑏, 𝑎}
. A e
consuming
𝑆
, he cu en s a e o he au oma on o Figu e 1
is 1, while he p obabili y o comple ion in one s ep, i.e., e-
cei ing ano he
𝑎
, is 0
.
6(see he
𝑏𝑎
node in 7a). A his poin ,
i we choose o eplace
𝑇
wi h
𝑇′
, o a lossless ansi ion
we need a mos he las 3symbols om
𝑆
— he o de o
𝑇′
is 3. Since hese symbols a e a ailable and he cu en s a e
is 1, he new p obabili y o comple ion in one s ep a e con-
suming
𝑆
, and by conside ing
𝑇′
, is 0
.
8(see he
𝑎𝑏𝑎
node
in Figu e 7b). No ably, PST eplacemen , can be execu ed in
linea ime wi h espec o he numbe o au oma a uns and
in p ac ice happens in negligible ime.
Collec o . T aining da ase s e ol e o e ime. The e o e,
he da a collec ion pa o
RTCEF
(le o Figu e 5) includes
he Collec o se ice, a da a p ocessing module o ganising
and s o ing subse s o he inpu s eam ha may be used o
e aining o hype pa ame e op imisa ion. The Collec o
se ice consumes he inpu s eam (see ‘Da a collec ion’ in
Figu e 5), in pa allel o Wayeb, and s o es subse s o i in
ime bucke s o ixed
bucke _size
. The Collec o ga he s da a
in a sliding window manne , emi ing a new da ase e sion,
con aining
d _size
bucke s, o he ‘Da ase s’ opic as soon as
he las bucke in he ange is ull. Old bucke s ha no longe
se e a pu pose o aining, a e dele ed o space economy.
Con olle . The Con olle se ice, based on he ins uc ions
o he Obse e , ini ialises hype pa ame e op imisa ion p o-
cedu es, du ing which i also se es as he Bayesian op imise ,
o e aining p ocedu es, whe e i supplies Wayeb con igu a-
ions. When op imisa ion is equi ed, he Con olle ini ia es
he ollowing h ee phases.
Ini ialisa ion phase: The Con olle se s up he Bayesian
op imise . Simila o [
10
], we euse mic o-benchma ks om
p e ious uns. Using he
e ain_ ac ion ∈ [
0
,
1
]
pa ame e ,
we uni o mly keep
⌊ e ain_ ac ion ∗all_samples⌋
obse a-
ions om he las BO un, whe e
all_samples
is he o al
numbe o mic o-benchma ks. This speeds up op imisa ion
while p ese ing use ul in o ma ion om p e ious uns.
S ep phase: The Con olle issues ‘ ain & es ’ commands
along wi h he hype pa ame e s sugges ed by he acquisi ion
unc ion—in ou case he acquisi ion unc ion is a combina-
ion o lowe con idence bound, expec ed imp o emen , and
p obabili y o imp o emen . A e each ‘ ain & es ’ com-
mand, he Con olle awai s he co esponding pe o mance
epo i.e., he alue o he
MCC(c)
objec i e unc ion. Upon
ecei ing he pe o mance epo , he op imise is upda ed
wi h he new sample and he hype pa ame e s o he nex
s ep a e sugges ed. The s ep phase ends when all mic o-
benchma ks a e comple ed o i con e gence is achie ed.
Finalisa ion phase: Once op imisa ion concludes and he
bes hype pa ame e s a e acqui ed, he Con olle sends a
inalisa ion message con aining he ID o he bes PST. Addi-
ionally, he Con olle upda es he p e iously bes hype pa-
ame e s wi h he newly acqui ed ones, ensu ing a ailabili y
o he la e o subsequen ‘ e ain’ ins uc ions.
Model Fac o y. Simila o
o CEF
, he p ima y unc ion o
he Model Fac o y se ice is o ain, es and send up- o-da e
PSTs o Wayeb. To do his, i will assemble and use he la es
da ase e sion p oduced by he Collec o . Upon ecei ing
a ‘ ain’ command, he Model Fac o y ains a PST on he
la es da ase and sha es his new PST e sion wi h Wayeb.
Fo PST p oduc ion h ough hype pa ame e op imisa ion,
upon ecei ing an ‘ini ialisa ion’ message, he Model Fac o y
‘locks’ he mos ecen assembled da ase so ha he same
da ase is used h oughou he op imisa ion p ocedu e. Nex ,
du ing he ‘s ep’ phase, he Model Fac o y ains, sa es and
es s candida e PSTs on he locked da ase and epo s
MCC
sco es o he Con olle . Finally, when he BO ‘ inalisa ion’
message is ecei ed, he Model Fac o y sends he bes pe -
o ming PST o Wayeb. I is only a his poin , ha Wayeb
will s op momen a ily o PST eplacemen .
5 Expe imen al E alua ion
We e alua e ou amewo k on wo eal-wo ld use-cases.
Fi s , in ma i ime si ua ional awa eness, ma i ime CEs o
in e es a e o ecas o e eal essel posi ion s eams. Sec-
ond, in c edi ca d aud managemen , audulen ac i i y
is o ecas o e syn he ic ansac ion da a. We desc ibe ou
expe imen al se up and hen we p esen ou indings.
5.1 Expe imen al Se up
5.1.1 Da ase s & pa e ns. We p esen he da ase s we em-
ploy and he pa e ns we use o o ecas ing CEs o in e es .
16
Run-Time Adap a ion o Complex E en Fo ecas ing DEBS ’25, June 10–13, 2025, Go henbu g, Sweden
Ma i ime si ua ional awa eness. We use a eal-wo ld,
publicly a ailable, ma i ime da ase con aining 18M spa io-
empo al posi ional AIS (Au oma ic Iden i ica ion Sys em)
messages ansmi ed be ween Oc obe 1s 2016 and 31s
Ma ch 2016 (6 mon hs), om 5K essels sailing in he A -
lan ic Ocean a ound he po o B es , F ance [
29
]. AIS allows
he ansmission o in o ma ion such as he cu en speed,
heading and coo dina es o essels, as well as, ancilla y s a ic
in o ma ion such as des ina ion and ship ype. We e alua e
RTCEF
on a ma i ime pa e n, which exp esses he a i al
o a essel a he main po o B es [
32
]. This pa e n is
de i ed a e discussions wi h domain expe s om a la ge,
Eu opean ma i ime se ice p o ide [27, 28]:
𝑅po :=(¬InPo (B es ))∗· (¬InPo (B es )) ·
(¬InPo (B es )) · (InPo (B es )) (2)
InPo (B es )
is ue when a essel is wi hin 5 km om he
po o B es . Recall ha ‘
¬
’, ‘
∗
’ and ‘
·
’ co espond o nega-
ion, i e a ion (Kleene s a ) and sequence espec i ely (see
Sec ion 2). Consequen ly,
𝑅po
is sa is ied i a sequence o
a leas h ee e en s occu . A leas wo equi e he essel
o be away om he po — hus limi ing alse posi i es om
noisy en ances—, while he las deno es ha he essel has
en e ed he po . This CE is impo an o po managemen
and logis ics easons. We also pe o m expe imen s o a CE
named 𝑅 ish de ined as ollows:
𝑅 ish :=(¬InA ea(Fishing))∗· (¬InA ea(Fishing)) ·
(¬InA ea(Fishing)) ·
(InA ea(Fishing) ∧ ¬SpeedRange(Fishing))∗·
(InA ea(Fishing) ∧ SpeedRange(Fishing))
(3)
InA ea(Fishing)
is ue when a essel is wi hin a ishing a ea,
while
speedRange
is a p edica e sa is ied when he essel has
ishing speed [
28
]. The e o e,
𝑅 ish
is sa is ied when ini ially
a essel is ou side a ishing a ea, hen he essel en e s he
ishing a ea and; a some poin while i is wi hin he ish-
ing a ea, i has ishing speed. Moni o ing (illegal) ishing is
impo an o en i onmen al and sus ainabili y easons.
To c oss alida e ou app oach, we c ea e 6 da ase s
MD𝑖
,
𝑖∈ [0,5]by shi ing he s a ing mon h in a cyclic manne :
MD𝑖=

𝑗=5
𝑗=0mon h(𝑗+𝑖)mod 6
whe e
∥
deno es he ope a ion o conca ena ing wo
da ase s, and
mon hk
co esponds o mon h
𝑘
o he o ig-
inal da ase .
C edi ca d aud managemen . We use a syn he ic da ase
p o ided by Feedzai
2
con aining 1M c edi ca d ansac ion
e en s aking place o e a pe iod o 82 weeks. Each e en
con ains, among o he s, he ca d ID, he amoun and ime
o he ansac ion. We e alua e
RTCEF
on a pa e n ep e-
sen ing a audulen beha iou as a sequence o consecu i e
inc easing ansac ions. Again, his pa e n was de e mined
2h ps:// eedzai.com
a e discussions wi h domain expe s om a la ge Eu opean
c edi ca d managemen se ice p o ide [3]:
𝑅ca ds :=(amDi >0)·(amDi >0)·(amDi >0)·
(amDi >0)·(amDi >0)·(amDi >0)·
(amDi >0)
(4)
We en ich e en s o he inpu s eam wi h an addi ional a -
ibu e
amDi
which is equal o he di e ence be ween he
p e ious ansac ion and he cu en one. The e o e,
𝑅ca ds
is sa is ied when 8 consecu i e ansac ions happen wi h
inc easing amoun s. In o de o simula e e ol ing aud,
we modi y he inancial da ase by changing andomly e -
e y 4 o 8 weeks he ange o he highly co ela ed ea u e
amoun Di
. Simila o he ma i ime da ase , o alida ing
ou esul s, we c ea e 21 da ase s
FD𝑖,𝑖 ∈ [
0
,
20
]
by shi ing
4 weeks he s a o each da ase in a cyclic manne .
5.1.2 Ini ialisa ion. We pe o m o line hype pa ame e op-
imisa ion wi h
o CEF
on he i s ou weeks o each
da ase
FD/MD𝑖
and use he esul ing PST, hype pa ame-
e s and mic o-benchma k samples o ini ialising
RTCEF
. To
showcase he bene i o
RTCEF
, we also pe o m CEF wi h
s a ic PSTs yielded by
o CEF
(see Sec ion 4.1): i.e., o each
FD𝑖
/
MD𝑖
we adop he s a iona i y assump ion and pe o m
CEF using he co esponding ini ial PST o each da ase .
In wha ollows, he expe imen s ha u ilise he un- ime
adap a ion amewo k a e labelled wi h ‘
RTCEF
’ while expe -
imen s ha a e pe o med only wi h o line op imised s a ic
PSTs models a e labelled wi h ‘
o CEF
’. Bo h
o CEF
and
RTCEF
inges he inpu s eam wi h he maximum speed o
Ka ka.
o CEF
and
RTCEF
a e implemen ed in Py hon 3.9.18,
while he Ka ka e sion was 3.5.2. Messages a e o ma ed
in JSON, and se ialised/dese ialised using Apache AVRO o -
ma . Fo BO, we use he sciki -op imize lib a y 0.9.0. The
expe imen s a e conduc ed on a se e unning Debian 12
wi h an AMD EPYC 7543 32-Co e P ocesso and 400G o
RAM. Each se ice o
RTCEF
uns on i s own dedica ed co e.
Ou amewo k is open-sou ce and ou expe imen s a e e-
p oducible.
5.2 Expe imen al Resul s
Figu es 8 and 10 show
MCC
o e ime o
𝑅po
and
𝑅ca ds
(see De ini ions
(2)
and
(4)
espec i ely), along wi h he sco e
imp o emen s when using RTCEF as opposed o o CEF o
he ma i ime
MD0/2/3/5
and inancial
FD0/1/8/17
da ase s e-
spec i ely. Resul s conce ning
MD0
and
FD0
— he da ase s
in hei o iginal o de —show ha
o CEF
demons a es, in
bo h cases, poo pe o mance and signi ican luc ua ions in
MCC
sco es o e ime.
RTCEF
, on he o he hand, imp o es
sco es and educes luc ua ions in bo h cases.
Ma i ime si ua ional awa eness. Fo
MD0
— he ma i ime
da ase in i s o iginal o de —
RTCEF
d amma ically imp o es
17