Weakly Markov Categories and Weakly Affine Monads

Authors Tobias Fritz, Fabio Gadducci , Paolo Perrone , Davide Trotta

Thumbnail PDF


  • Filesize: 0.7 MB
  • 17 pages

Document Identifiers

Author Details

Tobias Fritz
  • Department of Mathematics, Universität Innsbruck, Austria
Fabio Gadducci
  • Department of Computer Science, University of Pisa, Italy
Paolo Perrone
  • Department of Computer Science, University of Oxford, UK
Davide Trotta
  • Department of Computer Science, University of Pisa, Italy

Cite AsGet BibTex

Tobias Fritz, Fabio Gadducci, Paolo Perrone, and Davide Trotta. Weakly Markov Categories and Weakly Affine Monads. In 10th Conference on Algebra and Coalgebra in Computer Science (CALCO 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 270, pp. 16:1-16:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


Introduced in the 1990s in the context of the algebraic approach to graph rewriting, gs-monoidal categories are symmetric monoidal categories where each object is equipped with the structure of a commutative comonoid. They arise for example as Kleisli categories of commutative monads on cartesian categories, and as such they provide a general framework for effectful computation. Recently proposed in the context of categorical probability, Markov categories are gs-monoidal categories where the monoidal unit is also terminal, and they arise for example as Kleisli categories of commutative affine monads, where affine means that the monad preserves the monoidal unit. The aim of this paper is to study a new condition on the gs-monoidal structure, resulting in the concept of weakly Markov categories, which is intermediate between gs-monoidal categories and Markov ones. In a weakly Markov category, the morphisms to the monoidal unit are not necessarily unique, but form a group. As we show, these categories exhibit a rich theory of conditional independence for morphisms, generalising the known theory for Markov categories. We also introduce the corresponding notion for commutative monads, which we call weakly affine, and for which we give two equivalent characterisations. The paper argues that these monads are relevant to the study of categorical probability. A case at hand is the monad of finite non-zero measures, which is weakly affine but not affine. Such structures allow to investigate probability without normalisation within an elegant categorical framework.

Subject Classification

ACM Subject Classification
  • Theory of computation → Models of computation
  • String diagrams
  • gs-monoidal and Markov categories
  • categorical probability
  • affine monads


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Nikolai N. Chentsov. The categories of mathematical statistics. Doklady Akademii Nauk SSSR, 164(3):511-514, 1965. Google Scholar
  2. Kenta Cho and Bart Jacobs. Disintegration and Bayesian inversion via string diagrams. Mathematical Structures in Computer Science, 29(7):938-971, 2019. Google Scholar
  3. Bob Coecke, Bill Edwards, and Robert W. Spekkens. Phase groups and the origin of non-locality for qubits. In Bob Coecke, Prakash Panangaden, and Peter Selinger, editors, QPL@MFPS 2009, volume 270 of ENTCS, pages 15-36. Elsevier, 2009. Google Scholar
  4. Andrea Corradini and Fabio Gadducci. A 2-categorical presentation of term graph rewriting. In Eugenio Moggi and Giuseppe Rosolini, editors, CTCS 1997, volume 1290 of LNCS, pages 87-105. Springer, 1997. Google Scholar
  5. Andrea Corradini and Fabio Gadducci. An algebraic presentation of term graphs, via gs-monoidal categories. Applied Categorical Structures, 7(4):299-331, 1999. Google Scholar
  6. Andrea Corradini and Fabio Gadducci. Rewriting on cyclic structures: equivalence between the operational and the categorical description. RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications, 33(4-5):467-493, 1999. Google Scholar
  7. Andrea Corradini and Fabio Gadducci. A functorial semantics for multi-algebras and partial algebras, with applications to syntax. Theoretical Computer Science, 286(2):293-322, 2002. Google Scholar
  8. Dion Coumans and Bart Jacobs. Scalars, monads, and categories. In Chris Heunen, Mehrnoosh Sadrzadeh, and Edward Grefenstette, editors, Quantum Physics and Linguistics - A Compositional, Diagrammatic Discourse, pages 184-216. Oxford University Press, 2013. Google Scholar
  9. Thomas Fox. Coalgebras and cartesian categories. Communications in Algebra, 4(7):665-667, 1976. Google Scholar
  10. Tobias Fritz. A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics. Advances in Mathematics, 370:107239, 2020. Google Scholar
  11. Tobias Fritz, Fabio Gadducci, Davide Trotta, and Andrea Corradini. Lax completeness for gs-monoidal categories. CoRR, abs/2205.06892, 2022. Google Scholar
  12. Tobias Fritz, Tomáš Gonda, Nicholas G. Houghton-Larsen, Paolo Perrone, and Dario Stein. Dilations and information flow axioms in categorical probability. CoRR, abs/2211.02507, 2022. Google Scholar
  13. Tobias Fritz, Tomáš Gonda, Paolo Perrone, and Eigil F. Rischel. Representable Markov categories and comparison of statistical experiments in categorical probability. CoRR, abs/2010.07416, 2020. Google Scholar
  14. Tobias Fritz, Tomáš Gonda, and Paolo Perrone. de Finetti’s theorem in categorical probability. Journal of Stochastic Analysis, 2(4):6:1-6:26, 2021. Google Scholar
  15. Tobias Fritz and Andreas Klingler. The d-separation criterion in categorical probability. Journal of Machine Learning Research, 24(46):1-49, 2023. Google Scholar
  16. Tobias Fritz and Wendong Liang. Free gs-monoidal categories and free Markov categories. Applied Categorical Structures, 31(2):21:1-21:31, 2023. Google Scholar
  17. Tobias Fritz and Eigil F. Rischel. Infinite products and zero-one laws in categorical probability. Compositionality, 2(3), 2020. Google Scholar
  18. Michèle Giry. A categorical approach to probability theory. In Bernhard Banaschewski, editor, Categorical Aspects of Topology and Analysis, volume 915 of LNM, pages 68-85. Springer, 1982. Google Scholar
  19. Bart Jacobs. Semantics of weakening and contraction. Annals of Pure and Applied Logic, 69(1):73-106, 1994. Google Scholar
  20. Bart Jacobs. Affine monads and side-effect-freeness. In Ichiro Hasuo, editor, CMCS 2016, volume 9608 of LNCS, pages 53-72. Springer, 2016. Google Scholar
  21. Bart Jacobs. Multinomial and hypergeometric distributions in Markov categories. In Ana Sokolova, editor, MFPS XXXVII, volume 351 of ENTCS, pages 98-115, 2021. Google Scholar
  22. Claire Jones and Gordon D. Plotkin. A probabilistic powerdomain of evaluations. In LICS 1989, pages 186-195. IEEE Computer Society, 1989. Google Scholar
  23. Anders Kock. Bilinearity and cartesian closed monads. Mathematica Scandinavica, 29(2):161-174, 1971. Google Scholar
  24. Anders Kock. Commutative monads as a theory of distributions. Theory and Applications of Categories, 26:97-131, 2012. Google Scholar
  25. Francis W. Lawvere. The category of probabilistic mappings. Unpublished notes, 1962. Google Scholar
  26. Sean Moss and Paolo Perrone. A category-theoretic proof of the ergodic decomposition theorem. Ergodic Theory and Dynamical Systems, 2023. To appear, available at URL: https://arxiv.org/abs/2207.07353.
  27. Paolo Perrone. Markov categories and entropy. CoRR, abs/2212.11719, 2022. Google Scholar
  28. Peter Selinger. A survey of graphical languages for monoidal categories. In Bob Coecke, editor, New Structures for Physics, volume 813 of LNP, pages 289-355. Springer, 2011. Google Scholar
  29. Tadeusz Świrszcz. Monadic functors and convexity. Bulletin de l'Académie Polonaise des Science, Série des Sciences Mathématiques, Astronomiques et Physiques, XXII(1):39-42, 1974. Google Scholar