564 research outputs found
Shapely monads and analytic functors
In this paper, we give precise mathematical form to the idea of a structure
whose data and axioms are faithfully represented by a graphical calculus; some
prominent examples are operads, polycategories, properads, and PROPs. Building
on the established presentation of such structures as algebras for monads on
presheaf categories, we describe a characteristic property of the associated
monads---the shapeliness of the title---which says that "any two operations of
the same shape agree". An important part of this work is the study of analytic
functors between presheaf categories, which are a common generalisation of
Joyal's analytic endofunctors on sets and of the parametric right adjoint
functors on presheaf categories introduced by Diers and studied by
Carboni--Johnstone, Leinster and Weber. Our shapely monads will be found among
the analytic endofunctors, and may be characterised as the submonads of a
universal analytic monad with "exactly one operation of each shape". In fact,
shapeliness also gives a way to define the data and axioms of a structure
directly from its graphical calculus, by generating a free shapely monad on the
basic operations of the calculus. In this paper we do this for some of the
examples listed above; in future work, we intend to do so for graphical calculi
such as Milner's bigraphs, Lafont's interaction nets, or Girard's
multiplicative proof nets, thereby obtaining canonical notions of denotational
model
A Categorical Approach to DIBI Models
The logic of Dependence and Independence Bunched Implications (DIBI) is a
logic to reason about conditional independence (CI); for instance, DIBI
formulas can characterise CI in probability distributions and relational
databases, using the probabilistic and relational DIBI models, respectively.
Despite the similarity of the probabilistic and relational models, a uniform,
more abstract account remains unsolved. The laborious case-by-case verification
of the frame conditions required for constructing new models also calls for
such a treatment. In this paper, we develop an abstract framework for
systematically constructing DIBI models, using category theory as the unifying
mathematical language. In particular, we use string diagrams -- a graphical
presentation of monoidal categories -- to give a uniform definition of the
parallel composition and subkernel relation in DIBI models. Our approach not
only generalises known models, but also yields new models of interest and
reduces properties of DIBI models to structures in the underlying categories.
Furthermore, our categorical framework enables a logical notion of CI, in terms
of the satisfaction of specific DIBI formulas. We compare it with string
diagrammatic approaches to CI and show that it is an extension of string
diagrammatic CI under reasonable conditions.Comment: 33 page
Preservation of Equations by Monoidal Monads
If a monad T is monoidal, then operations on a set X can be lifted canonically to operations on TX. In this paper we study structural properties under which T preserves equations between those operations. It has already been shown that any monoidal monad preserves linear equations; affine monads preserve drop equations (where some variable appears only on one side, such as x? y = y) and relevant monads preserve dup equations (where some variable is duplicated, such as x ? x = x). We start the paper by showing a converse: if the monad at hand preserves a drop equation, then it must be affine. From this, we show that the problem whether a given (drop) equation is preserved is undecidable. A converse for relevance turns out to be more subtle: preservation of certain dup equations implies a weaker notion which we call n-relevance. Finally, we identify a subclass of equations such that their preservation is equivalent to relevance
Recommended from our members
Formally justified and modular Bayesian inference for probabilistic programs
Probabilistic modelling offers a simple and coherent framework to describe the
real world in the face of uncertainty. Furthermore, by applying Bayes' rule
it is possible to use probabilistic models to make inferences about the state of
the world from partial observations. While traditionally probabilistic models
were constructed on paper, more recently the approach of probabilistic
programming enables users to write the models in executable languages resembling
computer programs and to freely mix them with deterministic code.
It has long been recognised that the semantics of programming languages is
complicated and the intuitive understanding that programmers have is often
inaccurate, resulting in difficult to understand bugs and unexpected program
behaviours. Programming languages are therefore studied in a rigorous way using
formal languages with mathematically defined semantics. Traditionally formal
semantics of probabilistic programs are defined using exact inference results,
but in practice exact Bayesian inference is not tractable and approximate
methods are used instead, posing a question of how the results of these
algorithms relate to the exact results. Correctness of such approximate methods
is usually argued somewhat less rigorously, without reference to a formal
semantics.
In this dissertation we formally develop denotational semantics for
probabilistic programs that correspond to popular sampling algorithms often used
in practice. The semantics is defined for an expressive typed lambda calculus
with higher-order functions and inductive types, extended with probabilistic
effects for sampling and conditioning, allowing continuous distributions and
unbounded likelihoods. It makes crucial use of the recently developed formalism
of quasi-Borel spaces to bring all these elements together. We provide semantics
corresponding to several variants of Markov chain Monte Carlo and Sequential
Monte Carlo methods and formally prove a notion of correctness for these
algorithms in the context of probabilistic programming.
We also show that the semantic construction can be directly mapped to an
implementation using established functional programming abstractions called
monad transformers. We develop a compact Haskell library for probabilistic
programming closely corresponding to the semantic construction, giving users a
high level of assurance in the correctness of the implementation. We also
demonstrate on a collection of benchmarks that the library offers performance
competitive with existing systems of similar scope.
An important property of our construction, both the semantics and the
implementation, is the high degree of modularity it offers. All the inference
algorithms are constructed by combining small building blocks in a setup where
the type system ensures correctness of compositions. We show that with basic
building blocks corresponding to vanilla Metropolis-Hastings and Sequential
Monte Carlo we can implement more advanced algorithms known in the literature,
such as Resample-Move Sequential Monte Carlo, Particle Marginal
Metropolis-Hastings, and Sequential Monte Carlo squared. These implementations
are very concise, reducing the effort required to produce them and the scope for
bugs. On top of that, our modular construction enables in some cases
deterministic testing of randomised inference algorithms, further increasing
reliability of the implementation.Engineering and Physical Sciences Research Council, Cambridge Trust, Cambridge-Tuebingen programm
- …