<<

Valuation Local Computation Induced Valuation Algebras Optimization as Inference Problem

An Introduction to Valuation Algebras

Marc Pouly

[email protected] Department of Informatics University of Fribourg, Switzerland

Leukerbad Meeting

January 2007

Marc Pouly An Introduction to Valuation Algebras 1/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Outline

1 Valuation Algebras Unifying Knowledge Representation Systems Valuation Algebras

2 Local Computation

3 Semiring Induced Valuation Algebras

4 Optimization as Inference Problem

Marc Pouly An Introduction to Valuation Algebras 2/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Knowledge Representation Systems

There are many ways to represent knowledge and information.

Bayesian Possibility Belief Credal Networks Potentials Functions Sets

Indicator Boolean Constraint Relations Functions Functions Systems

Equality Gaussian Logics Systems Potentials ...

Traditionally, every research field has its own community. People rarely look beyond their own nose ...

Marc Pouly An Introduction to Valuation Algebras 3/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Knowledge Representation Systems

There are many ways to represent knowledge and information.

Bayesian Possibility Belief Credal Networks Potentials Functions Sets

Indicator Boolean Constraint Relations Functions Functions Systems

Equality Gaussian Logics Systems Potentials ...

Traditionally, every research field has its own community. People rarely look beyond their own nose ...

Marc Pouly An Introduction to Valuation Algebras 3/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Requirements for a unifying Theory

Is there a unifying theory for all these formalisms ?

Informal requirements to such a theory:

Knowledge exists in pieces ! valuations.

Knowledge refers to questions ! domain. Pieces of knowledge can be combined.

Knowledge can be focused (marginalized).

Marc Pouly An Introduction to Valuation Algebras 4/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Requirements for a unifying Theory

Is there a unifying theory for all these formalisms ?

Informal requirements to such a theory:

Knowledge exists in pieces ! valuations.

Knowledge refers to questions ! domain. Pieces of knowledge can be combined.

Knowledge can be focused (marginalized).

Marc Pouly An Introduction to Valuation Algebras 4/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Operations on Valuations

Knowledge always refers to a domain: 1 Labeling: Φ D; φ d(φ) → "→

Pieces of knowledge can be combined: 2 Combination: Φ Φ Φ; (φ, ψ) φ ψ × → "→ ⊗

Knowledge can be focused: 3 Marginalization: Φ D Φ; (φ, x) φ x × → "→ ↓

Marginalization ”can” be replaced by: X d(φ) X 3 Variable Elimination: φ− = φ↓ −{ }.

Marc Pouly An Introduction to Valuation Algebras 5/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Operations on Valuations

Knowledge always refers to a domain: 1 Labeling: Φ D; φ d(φ) → "→

Pieces of knowledge can be combined: 2 Combination: Φ Φ Φ; (φ, ψ) φ ψ × → "→ ⊗

Knowledge can be focused: 3 Marginalization: Φ D Φ; (φ, x) φ x × → "→ ↓

Marginalization ”can” be replaced by: X d(φ) X 3 Variable Elimination: φ− = φ↓ −{ }.

Marc Pouly An Introduction to Valuation Algebras 5/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Case Study I: Probability Potentials

Burglary A B B 0 0 0.8 φ = 0 0.9 ψ = 0 1 0.1 1 0.1 1 0 0.2 Alarm 1 1 0.9

Combination = Multiplication Marginalization = Addition

A B 0 0 0.72 A φ ψ = 0 1 0.01 (φ ψ) A = 0 0.73 ⊗ ⊗ ↓{ } 1 0 0.18 1 0.27 1 1 0.09

Marc Pouly An Introduction to Valuation Algebras 6/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Case Study I: Probability Potentials

Burglary A B B 0 0 0.8 φ = 0 0.9 ψ = 0 1 0.1 1 0.1 1 0 0.2 Alarm 1 1 0.9

Combination = Multiplication Marginalization = Addition

A B 0 0 0.72 A φ ψ = 0 1 0.01 (φ ψ) A = 0 0.73 ⊗ ⊗ ↓{ } 1 0 0.18 1 0.27 1 1 0.09

Marc Pouly An Introduction to Valuation Algebras 6/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Case Study II: Relations

Player Club Goals Player Nationality Ronaldinho Barcelona 7 Ronaldinho Brazil φ = Eto’o Barcelona 5 ψ = Eto’o Cameroon Henry Arsenal 5 Henry France Pires Arsenal 2 Pires France Combination = Natural Join

Player Club Goals Nationality Ronaldinho Barcelona 7 Brazil φ ψ = Eto’o Barcelona 5 Cameroon ⊗ Henry Arsenal 5 France Pires Arsenal 2 France

Marginalization = Projection

Goals Nationality Goals, Nationality 7 Brazil (φ ψ)↓{ } = 5 Cameroon ⊗ 5 France 2 France

Marc Pouly An Introduction to Valuation Algebras 7/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Case Study II: Relations

Player Club Goals Player Nationality Ronaldinho Barcelona 7 Ronaldinho Brazil φ = Eto’o Barcelona 5 ψ = Eto’o Cameroon Henry Arsenal 5 Henry France Pires Arsenal 2 Pires France Combination = Natural Join

Player Club Goals Nationality Ronaldinho Barcelona 7 Brazil φ ψ = Eto’o Barcelona 5 Cameroon ⊗ Henry Arsenal 5 France Pires Arsenal 2 France

Marginalization = Projection

Goals Nationality Goals, Nationality 7 Brazil (φ ψ)↓{ } = 5 Cameroon ⊗ 5 France 2 France

Marc Pouly An Introduction to Valuation Algebras 7/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem of a Valuation

1 Commutative Semigroup: is associative & commutative. ⊗ 2 Labeling: d(φ ψ) = d(φ) d(ψ). ⊗ ∪ 3 Marginalization: x d(φ↓ ) = x.

4 Transitivity: y x x For x y d(φ): (φ↓ )↓ = φ↓ . ⊆ ⊆ 5 Combination: (simplified) d(φ) d(φ) d(ψ) (φ ψ)↓ = φ ψ↓ ∩ . ⊗ ⊗ 6 Domain: d(φ) φ↓ = φ.

Marc Pouly An Introduction to Valuation Algebras 8/ 39 Valuation Algebras Local Computation Unifying Knowledge Representation Systems Semiring Induced Valuation Algebras Valuation Algebras Optimization as Inference Problem Valuation Algebra Instances

Linear Predicate Manifolds Logic Indicator Semiring Functions Propositional Boolean Relations Algebras Logic Functions

Distance Functions Valuation Algebras

Gaussian Gaussian Belief Credal Hints Potentials Probability Functions Sets Potentials

Possibility Constraint Potentials Systems

Marc Pouly An Introduction to Valuation Algebras 9/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Outline

1 Valuation Algebras

2 Local Computation The Inference Problem Local Computation A first Summary

3 Semiring Induced Valuation Algebras

4 Optimization as Inference Problem

Marc Pouly An Introduction to Valuation Algebras 10/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Inference Problem

Query answering is the objective of knowledge processing.

Task: Given a set of valuations and a query x, compute

x (φ φ . . . φn)↓ 1 ⊗ 2 ⊗ ⊗

Query answering is a very natural process:

1 We combine all available knowledge.

2 The result is focused on the domain of interest.

Marc Pouly An Introduction to Valuation Algebras 11/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Inference Problems in Practice

Probability Potentials: Compute marginal from joint probability distribution. ! Bayesian Network Evaluation

Relations: Database query answering.

Distance Functions: Shortest distance finding over multiple maps.

Propositional Logic: If x = : Satisfiability Problem. ∅

Marc Pouly An Introduction to Valuation Algebras 12/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Inference Problems in Practice

Probability Potentials: Compute marginal from joint probability distribution. ! Bayesian Network Evaluation

Relations: Database query answering.

Distance Functions: Shortest distance finding over multiple maps.

Propositional Logic: If x = : Satisfiability Problem. ∅

Marc Pouly An Introduction to Valuation Algebras 12/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Inference Problems in Practice

Probability Potentials: Compute marginal from joint probability distribution. ! Bayesian Network Evaluation

Relations: Database query answering.

Distance Functions: Shortest distance finding over multiple maps.

Propositional Logic: If x = : Satisfiability Problem. ∅

Marc Pouly An Introduction to Valuation Algebras 12/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Inference Problems in Practice

Probability Potentials: Compute marginal from joint probability distribution. ! Bayesian Network Evaluation

Relations: Database query answering.

Distance Functions: Shortest distance finding over multiple maps.

Propositional Logic: If x = : Satisfiability Problem. ∅

Marc Pouly An Introduction to Valuation Algebras 12/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Complexity Concerns

Example d(φ ) = A, B, D , d(φ ) = B, C , d(φ ) = C , x = A, C 1 { } 2 { } 3 { } { }

Naive Algorithm: Compute φ = φ φ φ . 1 ⊗ 2 ⊗ 3 A,C Compute φ↓{ }. Problem: d(φ) = A, B, C, D { } Operation complexity tends to increase exponentially with the domain size.

Marc Pouly An Introduction to Valuation Algebras 13/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Complexity Concerns

Example d(φ ) = A, B, D , d(φ ) = B, C , d(φ ) = C , x = A, C 1 { } 2 { } 3 { } { }

Naive Algorithm: Compute φ = φ φ φ . 1 ⊗ 2 ⊗ 3 A,C Compute φ↓{ }. Problem: d(φ) = A, B, C, D { }

Operation complexity tends to increase Warning! exponentially with the domain size.

Marc Pouly An Introduction to Valuation Algebras 13/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Alternative Factorizations

A better way to compute follows from the Combination :

Improved Algorithm: A,B A,C Compute φ↓{ } φ ↓{ } φ 1 ⊗ 2 ⊗ 3 ! " The largest domains that occur are of size 3 ! factor size !

Question: How can we find such factorizations ? Answers: Join trees deliver valid factorizations.

Marc Pouly An Introduction to Valuation Algebras 14/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Alternative Factorizations

A better way to compute follows from the Combination Axiom:

Improved Algorithm: A,B A,C Compute φ↓{ } φ ↓{ } φ 1 ⊗ 2 ⊗ 3 ! " The largest domains that occur are of size 3 ! factor size !

Question: How can we find such factorizations ? Answers: Join trees deliver valid factorizations.

Marc Pouly An Introduction to Valuation Algebras 14/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Join Trees

Definition (Join Tree) A join tree is a tree whose nodes contain a domain such that if the same variable is contained in two different nodes, then this variable is contained in all nodes on the path between them.

AB EC AB EC

AC ABC BD BC AC ABC BCD BC

CD CD

Marc Pouly An Introduction to Valuation Algebras 15/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Covering Join Trees

We are looking for a Covering Join Tree: A node that covers the query x is chosen as root. The domain of every factor φi corresponds to some node.

AC x

C ABC

φ3

ABD BC

φ1 φ2

d(φ ) = A, B, D , d(φ ) = B, C , d(φ ) = C , x = A, C 1 { } 2 { } 3 { } { }

Marc Pouly An Introduction to Valuation Algebras 16/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm

On this join tree, the inference problem can be solved by a simple message-passing scheme, called collect algorithm.

1 Nodes wait until they received a message from all parents.

2 Incoming messages are combined to the node content.

3 Nodes compute messages by marginalizing their content to the intersection of their domain and their child’s domain.

Leaves can send messages directly. The algorithm stops when the root node is reached.

Nodes act as virtual processors ! distributed algorithm.

Marc Pouly An Introduction to Valuation Algebras 17/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm

On this join tree, the inference problem can be solved by a simple message-passing scheme, called collect algorithm.

1 Nodes wait until they received a message from all parents.

2 Incoming messages are combined to the node content.

3 Nodes compute messages by marginalizing their content to the intersection of their domain and their child’s domain.

Leaves can send messages directly. The algorithm stops when the root node is reached.

Nodes act as virtual processors ! distributed algorithm.

Marc Pouly An Introduction to Valuation Algebras 17/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm

On this join tree, the inference problem can be solved by a simple message-passing scheme, called collect algorithm.

1 Nodes wait until they received a message from all parents.

2 Incoming messages are combined to the node content.

3 Nodes compute messages by marginalizing their content to the intersection of their domain and their child’s domain.

Leaves can send messages directly. The algorithm stops when the root node is reached.

Nodes act as virtual processors ! distributed algorithm.

Marc Pouly An Introduction to Valuation Algebras 17/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Example

AC

C ABC ↓{B,C} φ3 φ2

ABD BC

φ1 φ2

Leaves can send their message directly.

Marc Pouly An Introduction to Valuation Algebras 18/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Example

↓{C} AC φ3

C ABC ↓{A,B} ↓{B,C} φ1 ⊗ φ2 φ3

ABD BC

φ1 φ2

Incoming messages are combined to the node content.

Marc Pouly An Introduction to Valuation Algebras 18/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Example

↓{C} ↓{A,B} ↓{B,C} ↓{A,C} AC φ3 ⊗ (φ1 ⊗ φ2 )

C ↓{A,B} ↓{B,C} ABC φ1 ⊗ φ2 φ3

ABD BC

φ1 φ2

The algorithm terminates when the root node is reached.

Marc Pouly An Introduction to Valuation Algebras 18/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Example

At the end of the collect algorithm, the root node contains

C A,B B,C A,C φ↓{ } φ↓{ } φ↓{ } ↓{ } . 3 ⊗ 1 ⊗ 2 ! "

d(φ) Because φ↓ = φ, this simplifies to

A,B A,C φ φ↓{ } φ ↓{ } . 3 ⊗ 1 ⊗ 2 ! "

Marc Pouly An Introduction to Valuation Algebras 19/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Result

Theorem At the end of the collect algorithm, the root node contains

x (φ . . . φn)↓ . 1 ⊗ ⊗

Hence:

A,C A,B ↓{ } A,C φ φ↓{ } φ = (φ φ φ )↓{ } . 3 ⊗ 1 ⊗ 2 1 ⊗ 2 ⊗ 3 ! "

Marc Pouly An Introduction to Valuation Algebras 20/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Result

Theorem At the end of the collect algorithm, the root node contains

x (φ . . . φn)↓ . 1 ⊗ ⊗

Hence:

A,C A,B ↓{ } A,C φ φ↓{ } φ = (φ φ φ )↓{ } . 3 ⊗ 1 ⊗ 2 1 ⊗ 2 ⊗ 3 ! "

Marc Pouly An Introduction to Valuation Algebras 20/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Complexity

A join tree is a graphical representation of a factorization.

All computations take place within join tree nodes.

No factor will ever be larger than the largest tree node. This measure is called the width of the join tree.

The smaller the width, the more efficient are the computations.

Unfortunately, finding the join tree with minimum width is NP-complete. But we have very good heuristics !

Query answering is parameterized polynomial.

Marc Pouly An Introduction to Valuation Algebras 21/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Complexity

A join tree is a graphical representation of a factorization.

All computations take place within join tree nodes.

No factor will ever be larger than the largest tree node. This measure is called the width of the join tree.

The smaller the width, the more efficient are the computations.

Unfortunately, finding the join tree with minimum width is NP-complete. But we have very good heuristics !

Query answering is parameterized polynomial.

Marc Pouly An Introduction to Valuation Algebras 21/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Collect Algorithm: Complexity

A join tree is a graphical representation of a factorization.

All computations take place within join tree nodes.

No factor will ever be larger than the largest tree node. This measure is called the width of the join tree.

The smaller the width, the more efficient are the computations.

Unfortunately, finding the join tree with minimum width is NP-complete. But we have very good heuristics !

Query answering is parameterized polynomial.

Marc Pouly An Introduction to Valuation Algebras 21/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Local Computation: Outlook

Message passing schemes on join trees are called local computation algorithms.

The collect algorithm answers only a single query. The Shenoy-Shafer architecture is an extension that allows to compute multiple queries simultaneously.

Together with combination & marginalization, some valuation algebra instances provide a division operator. This can be exploited to improve efficiency and leads to further local computation algorithms: Lauritzen-Spiegelhalter Architecture HUGIN Architecture Idempotent Architecture

Marc Pouly An Introduction to Valuation Algebras 22/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem Local Computation: Outlook

Message passing schemes on join trees are called local computation algorithms.

The collect algorithm answers only a single query. The Shenoy-Shafer architecture is an extension that allows to compute multiple queries simultaneously.

Together with combination & marginalization, some valuation algebra instances provide a division operator. This can be exploited to improve efficiency and leads to further local computation algorithms: Lauritzen-Spiegelhalter Architecture HUGIN Architecture Idempotent Architecture

Marc Pouly An Introduction to Valuation Algebras 22/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem A first Summary

A valuation algebra is a framework that abstracts different knowledge representation formalisms.

It allows to define generic inference algorithms, i.e. algorithms that do not depend on a certain representation of input data.

Every community ”re-invented” & ”re-invents” these algorithms uncomprehending that they all do the same ...

Marc Pouly An Introduction to Valuation Algebras 23/ 39 Valuation Algebras The Inference Problem Local Computation Local Computation Semiring Induced Valuation Algebras A first Summary Optimization as Inference Problem NENOK - A generic Software Framework for LC

diuf.unifr.ch/tcs/nenok

Marc Pouly An Introduction to Valuation Algebras 24/ 39 Valuation Algebras Local Computation Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Outline

1 Valuation Algebras

2 Local Computation

3 Semiring Induced Valuation Algebras Semirings Semiring Induced Valuation Algebras

4 Optimization as Inference Problem

Marc Pouly An Introduction to Valuation Algebras 25/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Introduction

How can we find new valuation algebra instances ? 1 Verify the axioms for a given formalism. 2 Generic Constructions

We will learn next, how a valuation algebra instance can be derived from any semiring.

Marc Pouly An Introduction to Valuation Algebras 26/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semirings

Algebraic structure with two operations + and over a set A. × + and are associative & commutative × distributes over +: a (b + c) = (a b) + (a c) × × × × A + × 1 Arithmetic Semiring 1 0, 0 + ≥ ∪ { } · 2 , max min 2 Bottleneck Semiring ∪ {−∞ ∞} 3 = 0, 1 3 Boolean Semiring { } ∨ ∧ 4 ( ) P S ∪ ∩ 4 Powerset Lattice 5 0, min + ∪ { ∞} 5 Tropical Semiring max + ∪ {−∞} 6 0, 1 r 0, 1 max min 6 Boolean Functions { } → { } 7 lcm gcd 7 Distributive Lattice

Marc Pouly An Introduction to Valuation Algebras 27/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semirings

Algebraic structure with two operations + and over a set A. × + and are associative & commutative × distributes over +: a (b + c) = (a b) + (a c) × × × × A + × 1 Arithmetic Semiring 1 0, 0 + ≥ ∪ { } · 2 , max min 2 Bottleneck Semiring ∪ {−∞ ∞} 3 = 0, 1 3 Boolean Semiring { } ∨ ∧ 4 ( ) P S ∪ ∩ 4 Powerset Lattice 5 0, min + ∪ { ∞} 5 Tropical Semiring max + ∪ {−∞} 6 0, 1 r 0, 1 max min 6 Boolean Functions { } → { } 7 lcm gcd 7 Distributive Lattice

Marc Pouly An Introduction to Valuation Algebras 27/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Notation & Conventions

We consider only variables X with finite frame ΩX . For a set of variables s:

Ωs = ΩX . X s #∈

The elements x Ωs are called configurations. ∈ By convention: Ω = . ∅ {.} x t denotes the projection of x to t s. ↓ ⊆ In particular: x = . ↓∅ . t s t x = (x↓ , x↓ − )

Marc Pouly An Introduction to Valuation Algebras 28/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Notation & Conventions

We consider only variables X with finite frame ΩX . For a set of variables s:

Ωs = ΩX . X s #∈

The elements x Ωs are called configurations. ∈ By convention: Ω = . ∅ {.} x t denotes the projection of x to t s. ↓ ⊆ In particular: x = . ↓∅ . t s t x = (x↓ , x↓ − )

Marc Pouly An Introduction to Valuation Algebras 28/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem -Valuations A An -valuation φ with domain s is a that associates a A value from a semiring A with each configuration x Ωs, ∈

φ : Ωs A. →

Example: Tropical Semiring with max for addition and + for multiplication over . ∪ {−∞}

Ω A,B φ(x) a { b} 4 φ = a b 3 a b 8 a b 5

Marc Pouly An Introduction to Valuation Algebras 29/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem -Valuations A An -valuation φ with domain s is a function that associates a A value from a semiring A with each configuration x Ωs, ∈

φ : Ωs A. →

Example: Tropical Semiring with max for addition and + for multiplication over . ∪ {−∞}

Ω A,B φ(x) a { b} 4 φ = a b 3 a b 8 a b 5

Marc Pouly An Introduction to Valuation Algebras 29/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Operations for -Valuations A

1 Combination: for φ, ψ Φ, x Ωd(φ) d(ψ) ∈ ∈ ∪ d(φ) d(ψ) φ ψ(x) = φ(x↓ ) ψ(x↓ ). ⊗ ×

Ω φ ψ(x) A,B,C ⊗ a { b }c 5 Ω A,B φ(x) Ω B,C ψ(x) a b c 10 a { }b 4 b { }c 1 a b c 5 a b 3 b c 6 = a b c 3 ⊗ a b 8 b c 2 a b c 9 a b 5 b c 0 a b c 14 a b c 7 a b c 5

Marc Pouly An Introduction to Valuation Algebras 30/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Operations for -Valuations A

2 Variable Elimination: for φ Φ, Y d(φ), x Ωt Y ∈ ∈ ∈ −{ } Y φ− (x) = φ(x, y) + φ(x, y).

C Ω φ ψ(x) − A,B,C ⊗ a { b }c 5 a b c 10 Ω (φ ψ) C (x) A,B ⊗ − a b c 5 a { }b 10 a b c 3 = a b 5 a b c 9 a b 14 a b c 14 a b 7 a b c 7 a b c 5

Marc Pouly An Introduction to Valuation Algebras 31/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semiring Induced Valuation Algebras

Theorem -Valuations satisfy the axioms of a Valuation Algebra. A

Marc Pouly An Introduction to Valuation Algebras 32/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semiring Induced Valuation Algebras

Theorem -Valuations satisfy the axioms of a Valuation Algebra. A

Every Semiring induces a Valuation Algebra !

Arithmetic Semiring , +, Probability Potentials. / ·0 !

Ω A,B φ(x) a { }b 0.1 φ = a b 0.7 a b 0.9 a b 0.3

Marc Pouly An Introduction to Valuation Algebras 32/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semiring Induced Valuation Algebras

Theorem -Valuations satisfy the axioms of a Valuation Algebra. A

Every Semiring induces a Valuation Algebra !

Arithmetic Semiring , +, Probability Potentials. / ·0 ! Boolean Semiring 0, 1 , max, min Indicator Functions. /{ } 0 !

Ω X,Y φ(x) 0 { }0 1 X Y 0 1 1 ¬ ∨ ! 1 0 0 1 1 1

Marc Pouly An Introduction to Valuation Algebras 32/ 39 Valuation Algebras Local Computation Semirings Semiring Induced Valuation Algebras Semiring Induced Valuation Algebras Optimization as Inference Problem Semiring Induced Valuation Algebras

Theorem -Valuations satisfy the axioms of a Valuation Algebra. A

Every Semiring induces a Valuation Algebra !

Arithmetic Semiring , +, Probability Potentials. / ·0 ! Boolean Semiring 0, 1 , max, min Indicator Functions. /{ } 0 ! Lattice , lcm, gcd ? / 0 !

Ω A,B φ(x) a { }b 17 φ = a b 38 a b 6 a b 93

Marc Pouly An Introduction to Valuation Algebras 32/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Outline

1 Valuation Algebras

2 Local Computation

3 Semiring Induced Valuation Algebras

4 Optimization as Inference Problem Semirings & Order Optimization Problems Dynamic Programming Conclusion

Marc Pouly An Introduction to Valuation Algebras 33/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Idempotent Semirings

A semiring is called idempotent, if a + a = a for all a A. ∈ A + a + a = a × 1 0, 0 + no ≥ ∪ { } · 2 , max min yes ∪ {−∞ ∞} 3 = 0, 1 yes { } ∨ ∧ 4 ( ) yes P S ∪ ∩ 5 0, min + yes ∪ { ∞} max + yes ∪ {−∞}

Marc Pouly An Introduction to Valuation Algebras 34/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Ordered Semirings

Idempotent semirings allow to define a relation a b if and only if a + b = b. ≤A Theorem is a monotonic partial order. ≤A

0 a a + b = sup a, b ≤A ≤A { }

If is total: ≤A 0 a a + b = max a, b ≤A ≤A { }

Marc Pouly An Introduction to Valuation Algebras 35/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Ordered Semirings

Idempotent semirings allow to define a relation a b if and only if a + b = b. ≤A Theorem is a monotonic partial order. ≤A

0 a a + b = sup a, b ≤A ≤A { }

If is total: ≤A 0 a a + b = max a, b ≤A ≤A { }

Marc Pouly An Introduction to Valuation Algebras 35/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Ordered Semirings

Idempotent semirings allow to define a relation a b if and only if a + b = b. ≤A Theorem is a monotonic partial order. ≤A

0 a a + b = sup a, b ≤A ≤A { }

If is total: ≤A 0 a a + b = max a, b ≤A ≤A { }

Marc Pouly An Introduction to Valuation Algebras 35/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Optimization as Inference Problem

x x The Inference Problem: φ = (φ φ φn)↓ ↓ 1 ⊗ 2 ⊗ · · · ⊗ In a totally ordered semiring with idempotent +:

Y φ− (x) = φ(x, y) + φ(x, y) = max φ(x, y), φ(x, y) { }

t φ↓ (x) = φ(x, y) = max φ(x, y), y Ωs t { ∈ − } y Ωs t ∈$− and in particular for x = : ∅

φ ( ) = max φ(x), x Ωs ↓∅ . { ∈ }

Marc Pouly An Introduction to Valuation Algebras 36/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Optimization as Inference Problem

x x The Inference Problem: φ = (φ φ φn)↓ ↓ 1 ⊗ 2 ⊗ · · · ⊗ In a totally ordered semiring with idempotent +:

Y φ− (x) = φ(x, y) + φ(x, y) = max φ(x, y), φ(x, y) { }

t φ↓ (x) = φ(x, y) = max φ(x, y), y Ωs t { ∈ − } y Ωs t ∈$− and in particular for x = : ∅

φ ( ) = max φ(x), x Ωs ↓∅ . { ∈ }

Marc Pouly An Introduction to Valuation Algebras 36/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Optimization as Inference Problem

x x The Inference Problem: φ = (φ φ φn)↓ ↓ 1 ⊗ 2 ⊗ · · · ⊗ In a totally ordered semiring with idempotent +:

Y φ− (x) = φ(x, y) + φ(x, y) = max φ(x, y), φ(x, y) { }

t φ↓ (x) = φ(x, y) = max φ(x, y), y Ωs t { ∈ − } y Ωs t ∈$− and in particular for x = : ∅

φ ( ) = max φ(x), x Ωs ↓∅ . { ∈ }

Marc Pouly An Introduction to Valuation Algebras 36/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Solution Configurations

Ω A,B,C φ a { b }c 5 C a b c 10 Ω A,B φ− a b c 10 a { }b 10 Ω φ B,C A − Ω φ A,B,C a b c 3 a b 10 {a } 10 − ! ! ! ∅ 10 a b c 9 a b 9 a 9 $ a b c 5 a b 7 a b c 7 a b c 3

For φ Φs, we call x Ωs a solution configuration if φ(x) = φ ( ). ∈ ∈ ↓∅ .

c = x Ωs : φ(x) = φ↓∅( ) φ { ∈ . }

cφ is called solution configuration set, here

c = (a, b, c), (a, b, c) φ { }

Marc Pouly An Introduction to Valuation Algebras 37/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Solution Configurations

Ω A,B,C φ a { b }c 5 C a b c 10 Ω A,B φ− a b c 10 a { }b 10 Ω φ B,C A − Ω φ A,B,C a b c 3 a b 10 {a } 10 − ! ! ! ∅ 10 a b c 9 a b 9 a 9 $ a b c 5 a b 7 a b c 7 a b c 3

For φ Φs, we call x Ωs a solution configuration if φ(x) = φ ( ). ∈ ∈ ↓∅ .

c = x Ωs : φ(x) = φ↓∅( ) φ { ∈ . }

cφ is called solution configuration set, here

c = (a, b, c), (a, b, c) φ { }

Marc Pouly An Introduction to Valuation Algebras 37/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Dynamic Programming

Solution configurations can be computed by a slight modification of the collect algorithm.

Dynamic Programming is Local Computation ⇒

Some Applications: Semiring [0, 1], max, Most probable Explanation / ·0 ! Semiring [0, 1], min, Least probable Explanation / ·0 ! Semiring , min, + Max SAT / 0 !

Marc Pouly An Introduction to Valuation Algebras 38/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Dynamic Programming

Solution configurations can be computed by a slight modification of the collect algorithm.

Dynamic Programming is Local Computation ⇒

Some Applications: Semiring [0, 1], max, Most probable Explanation / ·0 ! Semiring [0, 1], min, Least probable Explanation / ·0 ! Semiring , min, + Max SAT / 0 !

Marc Pouly An Introduction to Valuation Algebras 38/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Conclusion

Valuation Algebras unify a large number of knowledge representation formalisms.

There are many applications in very different fields of research that turn out to be Local Computation algorithms.

Whenever a new formalism is proposed, verify the valuation algebra axioms and you get directly the needed algorithms to process this knowledge.

Ergo, this theory follows the principle: Learn once, apply everywhere !

Marc Pouly An Introduction to Valuation Algebras 39/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Conclusion

Valuation Algebras unify a large number of knowledge representation formalisms.

There are many applications in very different fields of research that turn out to be Local Computation algorithms.

Whenever a new formalism is proposed, verify the valuation algebra axioms and you get directly the needed algorithms to process this knowledge.

Ergo, this theory follows the principle: Learn once, apply everywhere !

Marc Pouly An Introduction to Valuation Algebras 39/ 39 Valuation Algebras Semirings & Order Local Computation Optimization Problems Semiring Induced Valuation Algebras Dynamic Programming Optimization as Inference Problem Conclusion Conclusion

Valuation Algebras unify a large number of knowledge representation formalisms.

There are many applications in very different fields of research that turn out to be Local Computation algorithms.

Whenever a new formalism is proposed, verify the valuation algebra axioms and you get directly the needed algorithms to process this knowledge.

Ergo, this theory follows the principle: Learn once, apply everywhere !

Marc Pouly An Introduction to Valuation Algebras 39/ 39