Bruno Gavranović
bgavran.bsky.social
Bruno Gavranović
@bgavran.bsky.social
Categorical Deep Learning.
London ---🚅---> Glasgow
November 10, 2025 at 11:59 AM
Containers and quotient containers can be interpreted as choices of a category S with some constraints on it, and a functor S -> Set.

For an ordinary container, S has to be a discrete category, i.e. a set.
November 2, 2025 at 10:40 PM
Para construction for double categories

https://arxiv.org/abs/2510.26465
October 31, 2025 at 11:28 AM
Stumbled upon the paper "Sorting with Bialgebras and Distributive Laws" ( https://www.cs.ox.ac.uk/people/nicolas.wu/papers/Sorting.pdf )

which introdued me to the idea that certain sorting algorithms can be considered 'duals' of others:
September 18, 2025 at 2:22 PM
I have been thinking about fixpoints of containers recently, and noticed that there seems to be a close correspondence between fixpoints of extensions of containers \mu(Ext(C)) and iterated compositions I + C + C o C + C o C o C ...

Has this been formally established somewhere?
September 16, 2025 at 11:34 AM
Interestingly, this is still a question I do not have a good answer for, and a question that I didn't see tackled by the deep learning community at all.
September 8, 2025 at 6:47 PM
Reposted by Bruno Gavranović
Unbelievable!
Today, San Diego witnessed a government-sanctioned kidnapping. ICE stormed Buona Forchetta in military gear ripping workers away, then unleashing tear gas and smoke on the terrified community. Full on police state, fascism now used on American citizens. Stay aware.
#OnYourSide
May 31, 2025 at 4:04 AM
Stumbled upon a peculiar paper:

Aggregating time-series and image data:
functors and double functors

https://arxiv.org/abs/2504.05274
May 19, 2025 at 3:33 PM
I've always wanted someone to write a type-safe framework for tensor manipulation that
a) fully leverages first-class types, and
b) is ergonomic

Maybe that someone has to be me; I wrote a proof-of-concept in Idris and used it to implement transformers:
github.com/bgavran/Type...
GitHub - bgavran/TypeSafe_Tensors: Framework for type-safe pure functional tensor processing, supporting non-cubical tensors
Framework for type-safe pure functional tensor processing, supporting non-cubical tensors - bgavran/TypeSafe_Tensors
github.com
May 7, 2025 at 11:07 AM
London --🚄--> Edinburgh
April 6, 2025 at 4:54 PM
Stumbled upon an Idris implementation of type-safe tensor computation (alongside many other things)

https://github.com/joelberkeley/spidr/tree/master
GitHub - joelberkeley/spidr: Accelerated machine learning with dependent types
Accelerated machine learning with dependent types. Contribute to joelberkeley/spidr development by creating an account on GitHub.
github.com
March 25, 2025 at 8:44 PM
Spotted at EPFL
March 19, 2025 at 4:02 PM
I've been playing with provably correct list sorting ( https://gist.github.com/bgavran/e6ef899a86223d32e25adde4ce884a64 ), and internalising a very unintuitive fact: there exists a *type of sorted lists*.

It's something I would have never came up with myself. Hence makes me wonder, what *else* is
March 5, 2025 at 10:29 PM
Reposted by Bruno Gavranović
After a multi-year collaboration with Martin Biehl, @mattecapu.bsky.social and @nathanielvirgo.bsky.social, I’m stoked to share the first of (hopefully) many outputs:
“A Bayesian Interpretation of the Internal Model Principle”
arxiv.org/abs/2503.00511.

1/
March 5, 2025 at 2:31 AM
March 3, 2025 at 10:54 PM
I never thought about the underlying implementation of typed holes in languages like Idris/Agda before.

Are they just implemented as a nullary constructor of an inductive type?

```
data Expr : Type where
Num : Nat -> Expr
Add : Expr -> Expr -> Expr
Hole : Expr
```
March 3, 2025 at 9:12 PM
Reading about linters, and I ran into a lovely example of what they keep you from doing:

(from the International obfuscated C code contest https://github.com/ioccc-src/winner/blob/master/2011/goren/goren.c )
February 26, 2025 at 2:25 PM
Fun fact I just learned: gunpowder was created by alchemists as a byproduct of trying to create the elixir of life.

https://en.wikipedia.org/wiki/Gunpowder
February 23, 2025 at 5:42 PM
Discovered a gem of a paper, which merges two things I am very excited about: DeepRL + (dependently) type-directed program search.

Highly recommended read.

https://arxiv.org/abs/2407.00695
February 21, 2025 at 5:18 PM
Reposted by Bruno Gavranović
I'm writing a new blog series on practical implementation of substructural type systems, in Idris!

The first blog post will look at substructural polymorphism and why it's *hard*, harder than people assume on first glance!

zanzix.github.io/posts/5-subs...
Compiler Engineering for Substructural Languages I: The Problem with Polymorphism
Can a correct-by-construction implementation of a substructural language be extended to a polymorphic lambda calculus?
zanzix.github.io
February 17, 2025 at 2:13 PM
Reposted by Bruno Gavranović
What separates life from death? Mary Shelley once wrote: "To understand life, we first need to understand death". In this movie, we see how a single-celled organism dies. The same matter in both pictures. It is not the same state or the same integrated complexity. youtube.com/watch?v=4bj6...
February 12, 2025 at 5:34 PM
I'm hoping starting to post more both on Bluesky and Mathstodon.
Is there a good client for crossposting I ought to use? (as opposed to what I'm doing now, which is pasting the same message twice)
February 8, 2025 at 9:30 PM
An Invitation to Neuroalgebraic Geometry

https://arxiv.org/abs/2501.18915
February 8, 2025 at 9:25 PM