Port Graphs, Rules and Strategies for Dynamic Data Analytics Hlne - - PowerPoint PPT Presentation

port graphs rules and strategies
SMART_READER_LITE
LIVE PREVIEW

Port Graphs, Rules and Strategies for Dynamic Data Analytics Hlne - - PowerPoint PPT Presentation

Port Graphs, Rules and Strategies for Dynamic Data Analytics Hlne KIRCHNER Warsaw, July 2015 Hlne KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 1 / 53 Introduction In a world of connected data and objects


slide-1
SLIDE 1

Port Graphs, Rules and Strategies

for Dynamic Data Analytics Hélène KIRCHNER Warsaw, July 2015

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 1 / 53

slide-2
SLIDE 2

Introduction

In a world of connected data and objects

Social Networking Websites Biological Network: Protein Interaction Research Collaboration Network Product Recommendation Network via Emails

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 2 / 53

slide-3
SLIDE 3

Introduction

Context

Systems that are distributed and connected in networks massive and heterogeneous dynamic (interactions, evolutions,....) Two domains examples: biological systems : protein interaction social networks : propagation analysis (spread of innovations, rumors, or diseases,...) Porgy, an interactive visual environment for port graph transformation.

Collaboration between Bordeaux (France) and King’s College London (UK)

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 3 / 53

slide-4
SLIDE 4

Introduction

Biochemical Network

Regulation of cell proliferation, transformation and survival

A biochemical network composed of different types of molecules at different concentrations who interact to maintain a regulation mechanism. Wetlab experiments suggest: 1) the overall process is controlled through only four chemical reactions 2) the regulation works if there are alternating short periods of time where the concentration of a specific molecule called A increases, and

  • thers where it remains constant.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 4 / 53

slide-5
SLIDE 5

Introduction

Model design and validation

Formalisation of the different kinds of molecules Formalisation of rules and in-silico simulation Plot of the evolution of the concentration of A molecules: expected staircase shape

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 5 / 53

slide-6
SLIDE 6

Introduction

Social Network

Propagation analysis

Study propagation mechanism in social networks: Global phenomenon resulting from sequences of local events Different metrics used to measure the propagation evolution:

  • bjectives reached by the propagation may be speed, covering,...

Different propagation mathematical models exist. How to compare them? Experiment:

Propagation (disease, rumor) initiated with a starting set (seed). Two models (probabilistic cascade, linear threshold) of propagation from the same set

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 6 / 53

slide-7
SLIDE 7

Introduction White for the untouched nodes - Flashy green for the active nodes- Dark green for the visited nodes- Red for the inactive nodes

Probabilis)c ¡cascade ¡model ¡simula)on ¡ Linear ¡threshold ¡model ¡simula)on ¡

2 Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 7 / 53

slide-8
SLIDE 8

Introduction 3

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 8 / 53

slide-9
SLIDE 9

Introduction 4

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 9 / 53

slide-10
SLIDE 10

Introduction 5

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 10 / 53

slide-11
SLIDE 11

Introduction 6

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 11 / 53

slide-12
SLIDE 12

Introduction 7

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 12 / 53

slide-13
SLIDE 13

Introduction 8

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 13 / 53

slide-14
SLIDE 14

Introduction Final situation 9

Linear ¡threshold ¡model ¡simula0on ¡ Probabilis0c ¡cascade ¡model ¡simula0on ¡

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 14 / 53

slide-15
SLIDE 15

Introduction

Social Network: Analytic Visualization

An experimental approach: Run the model and observe how works the propagation and how the

  • bjective is reached.

Build the network Design the propagation rules

◮ Rules describe situations where an entity can influence its

neighbours

Simulate propagation with different mathematical models Compare the execution traces of these models, according to a chosen metrics Change parameters (ex: threshold level) and run again

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 15 / 53

slide-16
SLIDE 16

Introduction Porgy Interface [ValletKPM-GaM2015] Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 16 / 53

slide-17
SLIDE 17

Introduction

Challenges for modelisation

Big networks : need for abstraction, patterns focusing on points of interests, views Dynamic Evolution : simple transformations applying in parallel and triggered by events/time controlled versus autonomous behaviour Uncertainty : probabilistic / stochastic issues Conflicts : detection - overlapping rules,... resolution - precedence, choices, i.e. strategic issues Memory and Backtracking : history, traces

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 17 / 53

slide-18
SLIDE 18

Introduction

In this talk

Concepts needed: Graphs to represent networks of data or objects Rules to deal with concurrent local transformations Strategies to express control versus autonomy Located graphs and rules; scope defining strategies to focus on points of interests Strategy language and strategic programs and research topics.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 18 / 53

slide-19
SLIDE 19

Port Graphs

Graphs and Port Graphs

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 19 / 53

slide-20
SLIDE 20

Port Graphs

Graph Data Bases

Graph Data Bases (opposed to relational data bases) have gained wide interest:

  • Facebook social graph maps the interconnections between users,
  • Google knowledge graph describes the semantic links between

people, places and objects,

  • Twitter graph database software, FlockDB, represents the links

between its members.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 20 / 53

slide-21
SLIDE 21

Port Graphs

Graph Data Bases

Graph Data Bases (opposed to relational data bases) have gained wide interest:

  • Facebook social graph maps the interconnections between users,
  • Google knowledge graph describes the semantic links between

people, places and objects,

  • Twitter graph database software, FlockDB, represents the links

between its members. In 2010, the Twitter FlockDB cluster stores 13+ billion edges and sustains peak traffic of 20,000 writes per second and 100,000 reads per second.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 20 / 53

slide-22
SLIDE 22

Port Graphs

Challenges in Graph Data Bases

Graph data used in different domains:

Social Networks analysis Protein Interaction analysis Supply chain management Recommendation Systems Web of data Fraud detection in financial systems

... But yet various challenges: No standardized graph model : Un/directed graph, Plain/structured

property graph, Mixed/Hyper/Multi graph

No standardized graph query language Scalability is an issue : difficult to split them up into parts and distribute them across numerous machines

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 21 / 53

slide-23
SLIDE 23

Port Graphs

Port graphs

Inspired by protein-protein interactions [IbanescuBK03], [AndreiK07],

κ-calculus [DanosL04], BioNetGen [BlinovYFH05]

Port graphs are graphs with multiple edges and loops, where: nodes have explicit connection points, called ports. the edges attach to ports of nodes. nodes, edges and ports are labeled by a set of properties, i.e. pairs (attribute,value). Actually equivalent to usual labeled graphs, but with more structure.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 22 / 53

slide-24
SLIDE 24

Port Graphs

Port graphs: examples

Figure: Some examples of port graphs

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 23 / 53

slide-25
SLIDE 25

Port Graphs

Compare to labelled property graphs

Figure: Neo4j Technical Introduction. http://dist.neo4j.org/neo-technology-introduction.pdf

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 24 / 53

slide-26
SLIDE 26

Port Graphs

Biochemical network: AKAP model

6 Chemical species occurring in the AKAP model: scaffold protein AKAP; nucleotide cAMP; protein PKA; enzyme PDE8A1 with one phosphorylation site; protein Raf-1 with one site for phosphorylation; signal protein A.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 25 / 53

slide-27
SLIDE 27

Rules

Rules

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 26 / 53

slide-28
SLIDE 28

Rules

Rules - Example: AKAP model

Four chemical reactions: (r1) cAMP activates PKA through binding; (r2) active PKA phosphorylates PDE and Raf on the same scaffold and becomes inactive; (r3) phosphorylated PDE degrades free cAMP and becomes unphosphorylated as well as Raf at which point Raf sends an activation signal A; (r4) unphosphorylated PDE degrades free cAMP

AKAP PKA PDE8 Raf-1 cAMP

  • AKAP

PKA PDE8 Raf-1 cAMP

r1

  • AKAP

PKA PDE8 Raf-1 cAMP

  • AKAP

PKA PDE8 Raf-1 cAMP

r2

  • +

+ AKAP PKA PDE8 Raf-1 cAMP AKAP PKA PDE8 Raf-1

r3

  • +

+ SA PDE8 cAMP

r4

  • PDE8
  • Hélène KIRCHNER

(Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 27 / 53

slide-29
SLIDE 29

Rules

A general concept of rewriting

The syntactic structure Words, Terms, Propositions, Logic formulas, Dags, Graphs, Structured Objects, Segments . . . The pattern : rule Expressed with ⇒, variables, left-hand side, right-hand side, condition or constraint The application mode match to select a redex (possibly modulo some axioms, constraints,...) instantiate variables replace

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 28 / 53

slide-30
SLIDE 30

Rules

Port Graph Rewriting

G rewrites to G′ using the rule ℓ : L ⇒ R if there is a morphism g : L → G g identifies a subgraph H that is equal to L except at positions where L has variables and (with appropriate rewiring) G[ H ] = G[ g(L) ] and G’ = G[ g(R) ] This rewriting step is denoted G →g

L⇒R G′

The choices: position(s), rule, matching substitution(s). Rewriting may be concurrent, probabilistic, constraint...

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 29 / 53

slide-31
SLIDE 31

Rules

Logical foundations

Rewriting Logic due to J. Meseguer [TCS92] Rewriting logic (RL) is a natural model of computation and an expressive semantic framework for concurrency, parallelism, communication, and interaction. http://wrla2012.lcc.uma.es/ Rewriting Calculus Introduced in 1998 by H. Cirstea and C. Kirchner The rho-calculus has been introduced as a general means to uniformly integrate rewriting and lambda calculus. http://rho.loria.fr/index.html

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 30 / 53

slide-32
SLIDE 32

Rules

The Abstract Biochemical Calculus

Initiated in Oana Andrei’s Phd in 2007

A rewriting calculus that models an autonomous system as a biochemical program : collections of molecules (objects and rewrite rules) higher-order rewrite rules over molecules (that may introduce new rewrite rules in the behaviour of the system) strategies for modelling the system’s evolution A visual representation via port graphs and an implementation is provided by the Porgy environment [AndreiFKMNP11].

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 31 / 53

slide-33
SLIDE 33

Rules

Rewriting challenges in graph data bases

Finding subgraph isomorphisms - NP hard problem Several algorithms (comparison in [Lee& all-VLDB2013]):

  • exact subgraph matching returning either one or all solutions
  • approximate subgraph matching.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 32 / 53

slide-34
SLIDE 34

Rules

Rewriting challenges in graph data bases

Finding subgraph isomorphisms - NP hard problem Several algorithms (comparison in [Lee& all-VLDB2013]):

  • exact subgraph matching returning either one or all solutions
  • approximate subgraph matching.

Probabilistic / stochastic issues- more and more useful to deal with uncertainties and stochastic models Different approaches :

  • stochastic simulation in biology: the κ language ([Danos&all])
  • probabilistic (real-time) rewrite theories defined and implemented

in Maude

  • probabilistic choice of rules to be fired in ρ-calculus

([Bournez&all])

  • a simplified version of probabilistic non-deterministic systems in

Porgy

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 32 / 53

slide-35
SLIDE 35

Strategies

Strategies

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 33 / 53

slide-36
SLIDE 36

Strategies

Derivation tree

Given a set of rewrite rules R, a derivation, or computation from G is a sequence of rewriting steps G →R G′ →R G” →R . . . The derivation tree of G, written DT(G, R), is a labeled tree

  • whose root is labeled by G,
  • its children are all the derivation trees DT(Gi, R) such that G →R Gi.

The edges of the derivation tree are labeled with the rewrite rule and the morphism used in the corresponding rewrite step. A derivation tree may be infinite, if there is an infinite reduction sequence out of G.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 34 / 53

slide-37
SLIDE 37

Strategies

A derivation tree

G1

1

G2

1 φ2

1

G2

2

. . . G0

φ1

  • φ2
  • φn
  • .

. . Gn

1 φn

1

. . .

φn

n−2 Gn

n−1 φn

n−1 Gn

n

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 35 / 53

slide-38
SLIDE 38

Strategies

A derivation tree

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 36 / 53

slide-39
SLIDE 39

Strategies

Strategies are needed

Rewrite rules describe local transformations By default, rules apply everywhere... What to do when only selected computations are of interest...? Strategies describe the control of rewrite rule application Strategies allow to Order rules Repeat rules Make choices

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 37 / 53

slide-40
SLIDE 40

Strategies

Strategy description

Different facets

A strategy is a set of proof terms in rewriting logic A strategy is a ρ-term in the ρ-calculus and an abstract molecule in the biochemical rewriting calculus A strategy is a (higher-order) function that can apply to other strategies [BKMR02]. A strategy is a subset of the set of all rewriting derivations [KKK08]. A strategy is a partial function that associates to a reduction-in-progress, the possible next steps in the reduction sequence in sequential path-building games [DoughertyWRS09]

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 38 / 53

slide-41
SLIDE 41

Strategies

Description of strategies - More answers...

In λ-calculus, a strategy is a map F from terms to terms such that t → F(t) (Barendregt [Bar84]). In abstract reduction systems (ARS), a strategy is a sub-ARS having the same set of normal forms (van Oostrom and de Vrijer

[Ter03]).

In program transformation, a strategy is a plan for achieving a complex transformation using a set of rules. (Visser [Vis05]). ...

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 39 / 53

slide-42
SLIDE 42

Strategies

Different classes of strategies

Consider a syntactic structure (graph) G to rewrite with R. A strategy is a subset of derivations from G. Strategic rewriting derivations are selected derivations. An extensional strategy selects a subset of the set of all derivations (finite or not). An intensional strategy is a partial function that associates to a reduction-in-progress, the possible next steps in the reduction sequence. A positional strategy chooses the positions in the syntactic structure where a rule or a set of rules can be applied either by traversing the syntactic structure, or by using annotations to select a set of positions.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 40 / 53

slide-43
SLIDE 43

Strategies

Graph rewriting strategies

Specific case of positions Where to apply a rule in a graph? Top-down or bottom-up traversals do not make sense. Need for a strategy language which includes operators to select rules and the positions where the rules are applied, and also to change the positions along the derivation.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 41 / 53

slide-44
SLIDE 44

Strategies

Graph rewriting strategies

PORGY solution (Porgy2011): A located graph GQ

P consists of a graph G, a subgraph P of G called

the position subgraph and a subgraph Q of G called the banned subgraph. Rewriting must take place fully or partially in P. No rewriting can happen fully or partially in Q.

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 42 / 53

slide-45
SLIDE 45

Strategies

Located graphs and rules

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 43 / 53

slide-46
SLIDE 46

Strategies

Strategy language

A strategy language gives syntactic means to describe strategies. Two main purposes: build derivation step and derivations

  • perationaly compute the next acceptable strategic steps.

Some strategy languages OBJ3, CafeOBJ, Maude http://maude.cs.uiuc.edu/ Elan http://elan.loria.fr/elan.html, Tom https://gforge.inria.fr/projects/tom/ ASF+SDF, Stratego, Strafunski http://strategoxt.org/Stratego/WebHome Porgy tulip.labri.fr/TulipDrupal/?q=porgy

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 44 / 53

slide-47
SLIDE 47

Strategies

Strategy language

Constructs

Primitives : rule, Identity, Failure (Non-)Determinism : all, one Composition : sequences of composable steps Selection of branches in the derivation tree (first, orelse, try) Conditional and tests Recursive strategies and iterations (repeat, while) Exploiting the structure of objects (traversals) Focusing (select or ban)

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 45 / 53

slide-48
SLIDE 48

Strategies

Strategy challenges

Strategies have been used in various domains. Which cross-fertization can we get between them ? A few ideas of useful properties: Automated deduction : Fairness (no crucial rule will be postponed forever) Functional and Logic Programming : Loop-freeness,... Game theory: connection with game theory strategies, strategies with memories,...

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 46 / 53

slide-49
SLIDE 49

Strategic program

Strategic Programming

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 47 / 53

slide-50
SLIDE 50

Strategic program

Strategic programming

A strategic rewrite program consists of a finite set of rewrite rules R, a strategy expression S (built from R using a strategy language L(R)) and a given structure G. Denoted [SR, G] , or simply [S, G] The strategy expression S is used to decide which rewrite steps should be performed on G. Operational semantics described by a transition relation on multisets of strategic programs (cf. [Porgy]).

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 48 / 53

slide-51
SLIDE 51

Strategic program

Strategic programming challenges

Confluence, termination of strategic programs Completeness w.r.t. normal forms: which (computable) strategies are guaranteed to find a normal form for any term whenever it exists? Rules with conditions or constraints:

  • operational termination (defined as the absence of infinite proof

trees), studied in [LucasMM2015] for conditional term rewriting (CTRS) systems, is different from the notion of termination (absence of infinite reduction sequences).

  • irreducible terms and normal forms are also different for CTRSs

[LucasM2014].

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 49 / 53

slide-52
SLIDE 52

Implementation

Porgy implementation

The Porgy environment features: Design port graphs and port rules and visualise them. Interactive application of a rule on a port graph. Creating and running a strategy. Exploration and analysis of a derivation tree.

◮ Tooltips (get information) ◮ Small multiples and animation (show the evolution of the graph) ◮ Histograms (to follow graph parameter over rewriting operations)

Lesson: visualization is important at the level of data and graphs, at the rule level, at the strategy level!

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 50 / 53

slide-53
SLIDE 53

Conclusion

Conclusion

Open questions and more challenges Add a strategy language on a rule environment Hierarchical modelling of data and processes : graphs, rules, strategies Visualization challenges : on all components Proving properties of strategies and strategic programs Verification : concurrent game structures, model checking,... Runtime verification Autonomic computing

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 51 / 53

slide-54
SLIDE 54

Conclusion

Conclusion

Topics at the intersection of formal specifications and models of complex systems programming with massive data proof search and deduction game theory and verification For Formal Structures for Computation and Deduction

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 52 / 53

slide-55
SLIDE 55

Conclusion

Thanks

The results presented here are based on joint works

  • n Elan and Tom from 1990 to 2008,

and on Porgy since 2008. Thanks to the Protheo team the Porgy team and colleagues from Maude for many inspiring discussions on these topics!

Hélène KIRCHNER (Inria) Port Graphs, Rules and Strategies Warsaw, July 2015 53 / 53