Whe rule-based models eed to cout Pierre Boutillier, Ioaa Cristescu To cite this versio: Pierre Boutillier, Ioaa Cristescu. Whe rule-based models eed to cout. [Research Reort] Harvard Medical School. 2017. HAL Id: hal-01572177 htts://hal.archives-ouvertes.fr/hal-01572177 Submitted o 4 Aug 2017 HAL is a multi-disciliary oe access archive for the deosit ad dissemiatio of scietific research documets, whether they are ublished or ot. The documets may come from teachig ad research istitutios i Frace or abroad, or from ublic or rivate research ceters. L archive ouverte luridisciliaire HAL, est destiée au déôt et à la diffusio de documets scietifiques de iveau recherche, ubliés ou o, émaat des établissemets d eseigemet et de recherche fraçais ou étragers, des laboratoires ublics ou rivés.
SASB 2017 Whe rule-based models eed to cout Pierre Boutillier 1 Ioaa Cristescu 2 Fotaa Lab Harvard Medical School Bosto, USA Abstract Rule-based modelers dislike direct eumeratio of cases whe more efficiet meas of eumeratio are available. We reset a extesio of the Kaa laguage which attaches to agets a otio of level. We detail two ecodigs that are more cocise tha the former ractice. Rule-based laguages are a well-established framework for modelig roteirotei iteractios. Kaa [2,1] is a rule-based laguage relyig o site-grahs. The odes of sitegrahs are called agets. Agets iteract by bidig/ubidig through sites. Sites are bidig resources, each site is art of at most oe edge. A model i Kaa cosists of a set of grah rewrite rules with rates. A rule describes a otetial iteractio give a cotext. Rates rereset robability to fire. I a biological cotext, it is ofte the case that a otio of iteral state (such as active, methilated,... ) is required i order to describe ossible iteractios. I Kaa, sites are equied with iteral states, facilitatig the modelig efforts of the user. However, as show i the followig sectios a more systematic ecodig of iteral states is ossible. Aother commo ractice is to attach a level to agets ad make a iteractio sesitive o the level of its articiatig agets. We roose here a laguage extesio to store, test ad chage levels exlicitly. Moreover, we reset a ecodig of levels that iduce a liear (i umber of levels) blow u of the umber of rules. This is i cotrast to revious ecodigs, which iduce a exoetial blow u i the umber of rules. 1 Email: Pierre Boutillier@hms.harvard.edu 2 Email: Ioaa Cristescu@hms.harvard.edu This aer is electroically ublished i Electroic Notes i Theoretical Comuter Sciece URL: www.elsevier.com/locate/etcs
1 Whe eumeratio is ecessary The followig motivatig examle [4] demostrates a tyical roblem i which levels are ecessary: KaiC roteis have 6 ideedet hoshorylatio sites. (De)hoshorylatio of every site is ideedet. The more sites are hoshorylated, the bigger the robability that KaiC bids KaiA is. A tyical way to deal with this examle cosist i exlicitly ecodig rules for the iteral states of the sites of iterest. However, doig so iduces a exoetial blow-u i the umber of rules (i the umber of levels). The BNGL [3] laguage itroduces a otio of idistiguishable sites. i.e. oe ca defie a aget with sites that all have the same ame. Cosequetly, a sigle rule to secify that k sites (out of ) are hoshorylated is eough. Moreover, the umber of secies is also reduced. Still, there are exoetially may ways to go from oe level to aother ad eumeratio is ecessary to faithfully resect the dyamics of the system. We ow show that addig a sytactic layer to Kaa that offers suort for coutig will avoid the exlosio i the umber of rules. 2 Ecodig couters I Kaa, agets are tyed ad their sigature is give. I the extesio we are resetig, couters are art of a aget s sigature ad the uer boud of the couter has to be secified. Exteded rules ca test couter values ( equals ad bigger tha ). They ca also modify their value (icrease, decrease or assig a ew value). Lastly, levels ca be used i the rates of the rules. We ow reset two ossible ways of ecodig couters. 2.1 Uary umbers We defie a ew aget tye with 2 sites ad. A chais of k + 1 agets deotes a couter with value k. Agets equied with couters are ecoded as agets with a extra site for each couter, which is used to bid to a chai A c of agets. For examle, i the figure o the right, a aget A has a couter c set to 1 3. Testig whether a couter is equal to k cosists i checkig whether there is a chai of k + 1 agets. A greater tha k test checks whether there is a chai k + 1 agets, where the site of the last aget does ot matter. 3 Reresetig level 0 by a chai of legth 1 meas that we do ot have to make a secial case for it i the rules! 2
A couter is icremeted by addig agets betwee the aget ad its chai. The rule deicted o the right icremets c of A by oe. Removig the begiig of the chai decreases the level. A c It is imortat to stress that couter modificatios are ideedet of its value as the ecodig oly maiulates the begiig of a chai. I our ecodig, a rule whose rate deeds o levels is exaded ito several rules, oe for each level. This oeratio imoses the user-defied uer boud o the levels. Creatio of agets with levels also creates the ecessary chai of to rereset the levels. Deletio is more roblematic: the chai of is discoected from the deleted aget, but ot deleted. A ossible solutio is to collect free chais of by usig a rule that says that agets with their sites free are deleted at ifiite seed. 2.2 Ruler A secod ecodig allows tests smaller tha i additio of equal ad greater tha, but is also more verbose ad icreases the size of states. As before, couters are ecoded as a chai of agets. I this ecodig however, a aget has 3 sites: ad to form chais but also a, which is where the other agets bid. Every aget with a a couter bouded by has attached a chai of A c (always). The value of the couter is give by which aget it is boud to o site a. For a examle, i the figure o the right, a aget A has a couter c set to 1. Sice site ad are distict, a directio ca be attached to the chai of. The level is 0 if the aget is boud to the bottom of the chai, ad it is if it is boud to the to. Icremetig/decremetig the levels are imlemeted by slidig o the chai. Testig whether a level is equal or greater tha k cosists of isectig the chai of below the coectio to the aget. Whereas isectig the legth of the chai above the coectio to the aget eables to test if the level is smaller tha a value k. 3 Coclusios While fairly trivial, ecodig couters i the Kaa simulator has greatly simlified some of the models writte by the Kaa team. However, it comes with two drawbacks. First, there is a comutatioal cost (maily i term of memory maagemet) to sythetize ad degrade agets. Secodly, the simulator works with a lai Kaa model. There is a imlemetatio cost to go back from the lai Kaa model to the user-writte model, which is ecessary whe givig feedback to the 3
user (for examle, dumig the curret state of the system). As a result, we la to imlemet a ative treatmet of the couters i the Kaa simulator. Aother directio for future work is the static detectio of overflow for couters. Curretly, the maximal level of the couter has to be declared by the user. Nevertheless, this meas the rules have to be writte such that they ca ever icrease a level beyod the defied boudary. The level of the couter ca be checked by static aalysis usig iterval comutatio, but for the meatime we have simly added watchdogs that dyamically raise the alarm if the site of a level becomes free, or if a chai of that is too log aears. Refereces [1] Pierre Boutillier, Jérôme Feret, ad Jea Krivie. Kaa ad KaSim develomet age. htt://kaalaguage.org. [2] Vicet Daos, Jérôme Feret, Walter Fotaa, Russell Harmer, ad Jea Krivie. Rule-based modellig, symmetries, refiemets. I Formal Methods i Systems Biology, First Iteratioal Worksho, FMSB 2008, Cambridge, UK, Jue 4-5, 2008. Proceedigs, ages 103 122, 2008. [3] James R. Faeder, Michael L. Bliov, ad William S. Hlavacek. Rule-Based Modelig of Biochemical Systems with BioNetGe, ages 113 167. Humaa Press, Totowa, NJ, 2009. [4] Susa S Golde. Itegratig the circadia oscillator ito the life of the cyaobacterial cell. I Cold Srig Harbor symosia o quatitative biology, volume 72, ages 331 338. Cold Srig Harbor Laboratory Press, 2007. 4