Bruno Gavranović
bgavran.bsky.social
Bruno Gavranović
@bgavran.bsky.social
I'm building neural networks that generate provably correct code, and the software infrastructure for training them.

Recently experimenting with TensorType: https://github.com/bgavran/TensorType

www.brunogavranovic.com
I'm quite proud of how far I've been able to get with TensorType: https://github.com/bgavran/TensorType

What started out as a casual "I wonder if I can implement type-safe tensors" question has now evolved into a fully-fledged library
GitHub - bgavran/TensorType: Framework for type-safe pure functional and non-cubical tensor processing, written in Idris 2
Framework for type-safe pure functional and non-cubical tensor processing, written in Idris 2 - bgavran/TensorType
github.com
February 2, 2026 at 8:34 PM
Reposted by Bruno Gavranović
Come and visit me at the poster session at #QIP26 today! :)))
January 27, 2026 at 9:09 AM
If you're interested in some of the design choices behind TensorType, have a look at the great blog post that @Andrev just posted:

types.pl/@Andrev/1159...

TLDR; Tensors in NumPy are secretly built out of the composition product of containers
Andre Videla (@Andrev@types.pl)
Glaive has a new blog post aimed at curious engineers https://glaive-research.org/2026/01/21/Generalised-tensors.html
types.pl
January 22, 2026 at 9:41 PM
Reposted by Bruno Gavranović
Dear USAans, ICE will not let you complete an electoral process which might result in a government that might hold them to account. If you want your democracy back, you have to get rid of them *first*. Abolish ICE, you say? How, I ask?
January 20, 2026 at 9:08 PM
Reposted by Bruno Gavranović
On the drive home I was idly thinking about what changes I'd make, if I could, to our system of governance after this administration is - ideally - gone.

I suppose in no particular order, here is a list of what I'd do, sorted by the mechanism for doing it.
January 14, 2026 at 2:13 AM
If you've been curious what I've been up to, the recently published report from GLAIVE reveals a part of it:

https://glaive-research.org/2025/12/08/q4-report.html
Q4 2025 report
Glaive Research Report Q4 2025
glaive-research.org
December 8, 2025 at 8:29 PM
Different products of containers, with examples on the List container:

List ⊗ List -> rectangular array

List ∘ List -> ragged array

List × List -> two lists

List + List -> a boolean value and a list
November 17, 2025 at 7:36 PM
Reposted by Bruno Gavranović
Remember kids, theoretical physicists have irreparably ruined public trust in science by saying they *hope* we *could* find BSM evidence at the LHC, but Elon gets to predict his products will "do the sci-fi" and be wrong 100 times per year for profit but he's just giving them hope
The brave renegade truth teller: "the people must be made to believe obvious lies to pacify them"
November 17, 2025 at 12:21 PM
Had an absolutely fantastic time in Scotland. It's been great seeing a lot of friendly faces, and making exciting research progress with Glaive
November 15, 2025 at 10:36 AM
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