Top Banner
Ontology-based integrated socio- ecosystem simulation Gary Polhill
48
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Ontology-based integrated socio-

ecosystem simulationGary Polhill

Page 2: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 3: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 4: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Agent-Based Modelling

Complex Systems TheoryEconomics

Classical theoriesdon’t always work

Individuals andinteractions matter

Explore theorymore formally

Exploit socialtheory in CS

Social Science Distributed AI

Page 5: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

What is an Agent?• Various answers...

– Purposive, goal seeking, intelligent, autonomous, program (software agents, AO design)• Stricter sense of encapsulation than OO• Interaction using a language (e.g. KQML)

– Anything in a program representing an individual in the real world (object, OO design)• Emphasis on representation within the program

rather than within the network• Interaction using method or function calls

– Grid cell (Cellular Automata)• Disaggregated spatial representation• Doesn’t represent a specific thing in the real world!

Page 6: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Complex Systems• There are no authoritative

definitions of Complex Systems, though many draw on the work of John Holland

• Holland (1991) describes a complex system thus:– Consists of a network of

interacting agents– Exhibits a dynamic aggregate

behaviour emerging from agents’ activities

– Aggregate behaviour can be described without a detailed knowledge of agents’ behaviour

• A complex adaptive system then has two further properties:– Agents act in an environment

that feeds back a consequent ‘value’ to them

• fitness, payoff, utility– Agents behave so as to

increase this value over time

• Arthur, Durlauf and Lane (1997) draw on Holland’s term ‘adaptive nonlinear network’ to describe properties of economic systems that are challenging to mathematical modelling– Dispersed interaction– No global controller of

interactions– Multiple, partially interacting

layers of structure– Continual adaptation– Perpetual novelty– Out-of-equilibrium dynamics

• Other terms– Self-organisation, self-

organised criticality

Page 7: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Statistical signatures of CAS

• Leptokurtosis– Fat tailed distributions

(relative to normal)• Extreme events more likely

• Heteroskedasticity– Variance is not constant

across observations• Power law distributions

– Interesting because they are scale-free

• Bad news for those who think complexity is a scale issue…

– Variance, skewness and kurtosis are infinite

• i.e. they increase rather than converge with increasing sample size

– For some power law distributions, even the mean can be infinite

Page 8: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

ABM and Complex Systems

• Heterogeneity of agents cannot be ignored…– It does not ‘average out’– Differences do not ‘cancel’

• …because aggregate structure ‘emerges’ from interactions– Predictions of aggregate

structure impossible, intractable or meaningless without knowledge of underlying behaviour

• Indeed, particularly in human social systems, individuals are conscious of and respond to aggregate structure

£

t

£

?

Page 9: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Economics and ABM• The ABM community exist on a spectrum in their

attitude towards economics:– “Economics, as developed over the past half-

century and more, is not useful for the analysis and support of formal policy; it should simply be ignored by serious social scientists” [Moss, 1999]

– ABM as a branch of computational economics allowing the study of non-rational agents [Axtell, 2000]

• Most, however, would see ABM as distinct from neoclassical economics in:– Emphasising the importance of agent heterogeneity– Emphasising the significance of agent interactions– Emphasising heuristic, cognitively plausible or

boundedly rational modes of human decision making– Less concern with equilibria

Page 10: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Farm decisions aren’t all economic

• The Guardian, UK, Tuesday 24 April 2007In 1995, producers got 24.5p a litre for their milk; the average today is 18p a litre, which represents a loss of more than 3p on every litre. Kemble Farms has been getting 19p a litre.…The irony for Colin Rank, one of the family that owns Kemble Farms, is that his cows drink water from a Cotswold spring that he could bottle and sell for 80p a litre. “We're giving it to cows and devaluing it by turning it into milk. Like all dairy farmers we could pack up tomorrow and do something better with our capital, but we do it because we have an emotional investment in the land and the animals. And we know there's a market for our product, if only the market worked.”

[Felicity Lawrence]

Page 11: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

DAI and ABM• Properties of agents [Gilbert & Troitzsch,

1999]– Knowledge & belief– Inference– Social models– Knowledge representation– Goals– Planning– Language– Emotions

• Intentional agents [Wooldridge & Jennings, 1995]– “An agent is a system that is most conveniently

described by the intentional stance”– Direct inheritance from AI thinking

The Intentional Stance[Dennett]

Something is intelligent if its behaviour is “most conveniently” described in terms of beliefs, desires and intentions

Page 12: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Contrasting approaches in ABM

• KISS: Keep It Simple, Stupid– Preference for simple models, often very simple

agents– Main idea is to explore the minimum conditions

needed for some aggregate phenomenon to occur– Criticise more complex models for being difficult

to study– Occam’s razor often applied…

• KIDS [Edmonds and Moss, 2004]:Keep It Descriptive, Stupid

– Logically, things are not true purely because they are simple

– Models should be as complex as needed to adequately describe phenomena

– Emphasis is on the evidence

Page 13: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Computer Science• ABM needs computer science for:

– Pseudo random number generation– Scheduling– User interface– Statistical analysis– Handling floating-point arithmetic– Parallel processing– Managing multiple runs– Data structures and algorithms for improving performance– Best practice

• Version control, documentation

• Hence development and widespread use of libraries and modelling environments– Swarm, MASON, RePast, NetLOGO

• Some do start from scratch– This is not recommended practice!

Page 14: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 15: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Coupling models• Various approaches to coupling

[Antle et al. 2001]– Loose coupling

• Swap variables– Close coupling

• Swap variables• Share subprocesses

– Fully integrated• Coupled models

– Submodels dictate spatial and temporal scales

– Clashes of underlying assumptions

– Multiple sources of the same data

– Overlap in functionality– Hacking code to make it work

interferes with functionality– BUT: cheap!

• Integrated is better– BUT: expensive!

loosely coupled model

submodel 1

submodel 2 submodel 3

Integrated model

closely coupled model

submodel 1

submodel 2 submodel 3

Page 16: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Two examples• FEARLUS

– Framework for Evaluation and Assessment of Regional Land Use Scenarios

• [Gotts & Polhill, 2003; Polhill & Gotts, 2001]– Agent based model of land use change– Mostly studied innovation and imitation

• CAMEL– Spatially explicit hydrochemical model– With FEARLUS: impacts of land use decisions on

phosphorus pollution• SPOMM

– Species metacommunity model– With FEARLUS: impacts of land use decisions on

biodiversity

Page 17: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

FEARLUS

Estimated Yield

Land Uses

Land use selection

Calculation of returns

Land sales & updating

YearlyYearlyCycleCycle

Approving/ Disapproving

Estimated Social Acceptability

£

Climate

Market

Land

use

Biophysical

properties

Reward

Social Neighbourhood

AfterBefore

Income

Yield P runoff

Page 18: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

CAMEL

CHANNELAQUIFER

Labile P

Active Mineral P

Stable Mineral P

Rapid Sorption

Slow Sorption

Labile P

Active Mineral P

Stable Mineral P

Rapid Sorption

Slow Sorption

SOIL Active Organic P Stable Organic P(Humus)

Labile P

Stable Mineral P Active Mineral P

Excretion + Manure

Plant Residue

Decomposition

Imm

obilisation

Rapid Sorption

Slow Sorption

Mineralisation

Uptake

Fertiliser

Models Phosphorus transformation processes and flow of water in a catchment

Page 19: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

A Challenge

Crop model

Climate(daily)

Evapotranspiration rate

Climate(yearly)

Yield at harvest

CAMEL

FEARLUSLU map

P runoff

Crop model

Clash of scale...

...& model

Page 20: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

More successful coupling

FEARLUS

SPOMM

Land Use selection

Update climate

Crop

YieldGovernment

response

Harvest

Approval/Disapproval

Learning

Exchange of Land

Bankruptcies

Updatehabitats

Colonisation

Extinction

Update economy

Loose CouplingClose Coupling

Page 21: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Preliminary results• SPOMM

– 10 species (1 competitor), 2 habitats (5 spp each)– High/low dispersal rate– Fast/slow competition

• FEARLUS– Case Based Reasoning for decision making in agents– Policy based on reward (or compensation) for

biodiversity• Number of species on each field (>= 5, >=1)• Amount of reward per field (1000, 10000)

– Economic return based on• Yield per unit area (0-100)• Price per unit yield (0-100)

– 8 Land Uses with varying degrees of habitat availability

Page 22: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Species (Low disp, Slow comp)

S

F+S

Reward 1000 for >= 5sppReward 10000 for >= 1sppPolicy

Page 23: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Land Use (Low disp, Slow comp)

F

F+S(10k;1)

Page 24: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Coupling can work…

• Coupling models can work if:– Good match of spatial and temporal scales– Similar level of abstraction in

representation– No overlap in functionality– Consistent and coherent coupled ontology

• How could we know when coupling is OK?– Or at least detect that it is not OK for some

reason

Page 25: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 26: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Issues with ABM: 1• ‘Ad hocery’

– Programming languages give you too much freedom!

• Use of libraries or standard development platforms– Lack of standards for documentation and

communication of ABMs• ODD [Grimm et al., 2006]

• Repeatability– Lack of standards can mean ABM results are

difficult to replicate, though this is being addressed• Model-2-Model workshops• Forum of JASSS• Various papers replicating others work

– [Edmonds & Hales 2003; Janssen, 2007; Galan & Izquierdo, 2005]

– Replication usually requires interaction with the original developers

Page 27: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Issues with ABM: 2• Validation

– How do you know the model is any good? Why should you ‘believe’ in it?

• Belief is really in your assumptions…

– Conceptual models may not be empirically verifiable

– Validation may not be meaningful in open worlds• [Oreskes et al., 1994]

– Participatory ABMs may be ‘stakeholder validated’

– Growing literature on validation of ABMs

• Falsifiability– When will you reject a model?

• Is a new version a different model?

Assumptionsyou thinkyou made

Assumptionsyou actually

made

Page 28: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Issues with ABM: 3• Model structure

– Models can be sensitive to seemingly arbitrary decisions

• Scheduling• Spatial structure• Decision-making algorithms

• Data– Large amounts of data are needed to specify the

initial conditions and exogenous time series• Not always available

– Confidentiality issue• Data from individual households should not be

identifiable• Need to work with ‘stylised’ scenarios

– Similar statistical properties, but hypothetical landscape

• Prediction(?)– Outcomes of models better understood as

‘plausible narratives’ based on assumptions

Page 29: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 30: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Ontologies

• Not to be confused with Ontology [Philosophy]– The theory of what exists

• An ontology is [CS] (Gruber, 1993)…– “A formal

• Machine readable

– explicit specification• All relevant concepts and constraints are explicitly defined

– of a shared• Consensual knowledge accepted by a group [debatable]

– conceptualisation”• An abstract model of a real-world phenomenon

Page 31: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

OWL Ontologies• OWL: Web Ontology Language

– Concepts/Classes• Primitive• Defined

– Properties• Datatype• Object• Annotation (metadata)

– Restrictions– Individuals

• Founded on Description Logics• Can be used with automated

reasoning services– e.g. FaCT++, Tsarkov & Horrocks– Uses:

• Concept satisfiability• Instance checking• Concept equivalence/subsumption• Ontology consistency

HumanDog

A

hasParent(Human)

asterix

dogmatixAnimal

AhasParent(Dog)

hasMother

hasParent

hasFather

nLegs

description

Page 32: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 33: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Various uses• Describing the structure of a simulation

– What concepts are represented by objects in a simulation

– What properties they have• Describing the state of a simulation

– What individuals are in a simulation– How they relate to each other

• Describing work with a simulation– Experiments [Pignotti et al., various]

• Describing data used by a simulation• Describing links with other related work• Describing the modelling approach• …

Page 34: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Ontology generation from code

• Two options for ontology generation from code:– Use a separate parser to translate from OO programming language to

OWL– Use the OO language’s ‘reflection’ capability to generate OWL code

without parsing• Reflection allows access from within the program to information about classes,

instance variables and methods

• Ontology generation using reflection (naïve, trivial prototype mapping)– OO classes OWL classes– OO inheritance OWL subclass– OO instance variables (primitive datatypes) OWL datatype properties– OO instance variables (objects) OWL object properties

• OWL (object & datatype) properties are not ‘encapsulated’ within OWL classes, so care is needed here

– OO instances OWL individuals– Some restrictions can also be defined from knowledge of OO paradigm

• OO classes are disjoint (multiple inheritance aside, an instance of one class cannot be an instance of another). OWL classes are not unless specifically declared to be such

• OO ivars that are declared to be instances of another specific class (e.g. Human x as opposed to anonymous type such as Object x (or in Obj-C id x)) can be restricted in OWL to belong to the corresponding OWL class

Page 35: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Ontology generation from code

public class Animal { int nLegs; Animal mother; Animal father; String description; boolean hasParent(Animal a) { return (a == mother || a == father); }}public class Human extends Animal { Human mother; Human father;}public class Dog extends Animal { Dog mother; Dog father;} Dog dogmatix; Human asterix;

HumanDog

A

hasParent(Human)

asterix

dogmatixAnimal

AhasParent(Dog)

hasMother

hasParent

hasFather

nLegs

description

Page 36: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Demonstration• Trivial reflection-based ontology generation

implemented in FEARLUS (Obj-C Swarm)– Obj-C doesn’t officially have a ‘Reflection’ package as does

Java, but much the same functionality can be achieved using the Obj-C API and underlying C datastructures

• Three kinds of ontology:– ‘Framework’ ontology

• Description of all the classes available in FEARLUS that may or may not be used in a particular model

– ‘Model’ ontology• Description of the classes used by the instances in a particular

model

– ‘Model state’ ontology• ‘Imports’ the model ontology, and further provides descriptions

of all the instances in a model at a certain time period

• OWL visualisation tools available in Protégé can be used to view these ontologies

Page 37: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Class hierarchy

Page 38: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Model structure• Classes and links between them through object properties

Page 39: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Exploring instances• Protégé GUI, instance browser

Page 40: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Relationships among instances• Network of social

approval (A) among land managers at a certain time in a FEARLUS model– Visualised using

OntoViz (and an edited ontology to shorten nomenclature!)

Page 41: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Evaluation• Useful, but…• Major issue pertains to differing semantics between

OWL and OO– Primarily affects mapping of inheritance

• OO inheritance ≠ OWL subclass• Much debate on this in CS literature of late 80s, early 90s

– Cook, Hill & Canning (1990): Inheritance is not subtyping– LaLonde & Pugh (1991): Subclassing ≠ subtyping ≠ is-a

• OWL may therefore have something to add to the description of ABMs that is not captured in formalisms based on OO such as UML

– Differences between ivars and properties• Other issues in distinguishing between ‘ontologically

significant’ classes (e.g. Land Managers) and algorithmically convenient classes (e.g. Hash Tables)

• Some of these issues could be resolved using coding conventions– Imposing constraints on the way we program ABMs could in

any case be an advantage

Page 42: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 43: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Ontological coupling

• Can we couple a model ‘ontologically’?– Represent the state at

time T with an OWL ontology

– Modular independent actions change that state• All variables they use

must be in the ontology

• Reasoning software can check consistency of integrated ontology

ontologically coupled model

ontology

Page 44: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Actions• Actions are modular algorithmic components that change the

state of a simulation– Actions are performed by an assigned individual in the state

ontology– Actions need to assume certain information about those

individuals exists– owl:equivalentClass and owl:equivalentProperty could be used to

link vocabularies• Could use ontologies to describe these too

– e.g. workflows– But result would not be much clearer than code

• Just replaced Obj-C/Java with OWL descriptions of it– Engine implementing the model is hidden

• Better to use ontologies to record metadata about Actions– What theories are they based on?– Where have the algorithms come from?– What other choices of Action perform similar tasks?

• Ontologies/workflows could be used to describe schedule

Page 45: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Advantages• Coupling

– Can perform some checks that a proposed coupling of Actions provides a coherent model

– Can also check changes to the state as they are made• Are Actions trying to make different changes to the same variable?

– Links to an upper level ontology could be exploited to make further consistency checks

• Transparency– Model structure exists independently (as an OWL ontology) from

the code implementing it– It can be visualised using ontology tools

• Not necessary to understand OWL or a programming language– Provenance of Actions makes it clearer where the model has come

from– Replication should be easier

• Less ad hocery– ‘Standard’ libraries of Actions could be developed, with metadata

about their origins– Easier to swap and explore algorithmic variants to check

sensitivity

Page 46: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Issues…• Open World Assumption

– Tricky for some actions—e.g. total yield for a farmer: perhaps there are other fields not mentioned

– May need to assume closed world for the purposes of the model

• Unique Name Assumption– Convenient in programming– Can workaround with many owl:differentFrom assertions

• However…– Reasoner will not declare as inconsistent something that is

consistent• Closed world allows us to make more inferences than open

world

• So…– Will not be able to say proposed coupling is definitely OK– But there will be inconsistencies and other issues it can

detect– Definite NO, but not a definite YES

Page 47: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Outline• Introduction to Agent-Based Modelling• Agent-Based Modelling in Socio-

Ecosystems• Issues in Agent-Based Modelling• Introduction to Ontologies• Ontologies in Agent-Based Modelling• Towards an Architecture• Conclusion

Page 48: Ontology-based integrated socio-ecosystem simulation Gary Polhill.

Conclusion• Agent based modelling allows explicit

representation of individuals and their interactions– Coupling models and code reuse is challenging– Transparency and replicability of models are issues

• OWL ontologies can be used to describe the ‘state’ of a model independently of its implementation– Allows association with context of the model

• Models can be built in a more modular fashion to enable– OWL ontology representation of state– More transparent and replicable model– Easier to couple models and ensure consistency

• Issues with different semantics in OO and OWL need to be handled carefully