Bruno Gavranović's Avatar

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

947 Followers  |  64 Following  |  118 Posts  |  Joined: 11.08.2023  |  1.7795

Latest posts by bgavran.bsky.social on Bluesky

The transition from “AI can’t do novel science” to “of course AI does novel science” will be like every other similar AI transition.

First the over-enthusiastic claims that are debunked, then smart people use AI to help them, then AI starts to do more of the work, then minor discoveries, & then…

14.02.2026 14:21 — 👍 102    🔁 12    💬 3    📌 2

there is a widespread belief among people with even a little technical and scientific savvy that Alchemy was a bunch of hooey, that they never published their experiments, that alchemists had to each discover on their own not to drink mercury, etc

but this is urban legend!

14.02.2026 00:20 — 👍 88    🔁 31    💬 1    📌 5
Post image

This is not what is happening at all.

The amount of misinformation on BlueSky about AI is insane, and it keeps promising that AI is all hype that is going away soon.

A really dangerous position that cedes all AI policy and decisions about how it will be used to others.

Also Futurism is clickbait

06.02.2026 21:15 — 👍 276    🔁 40    💬 20    📌 7
numpy.ndarray — NumPy v2.5.dev0 Manual

That's not what ndarrays are: they are homogeneous arrays of elements: numpy.org/devdocs/refe...

09.02.2026 13:19 — 👍 0    🔁 0    💬 1    📌 0

"it's impossible to reproduce ndarray in a type safe way." What part of it is impossible to reproduce?

09.02.2026 13:04 — 👍 0    🔁 0    💬 1    📌 0

This is a catch-22 problem: nobody is working on non-cubical tensors because they're slow, and they're slow because nobody is working on them.

One of the goals of TensorType is to try out machine learning with them. If something new works, that'll be good incentive to work on making it fast

08.02.2026 12:29 — 👍 1    🔁 1    💬 0    📌 0

Indeed, eventually the plan is to use mutable arrays, and either partially write a new, or leverage existing backends for fast tensor contractions.

The plan is to first make it correct, then make it fast

08.02.2026 12:26 — 👍 0    🔁 0    💬 2    📌 0

Even more, building things concretely ended up facilitating research: I now understand that a tensor is simply a composition of containers, and that this perspective is *enough* to get us everything that NumPy gives us.

It's just a matter of implementing it.

02.02.2026 20:35 — 👍 2    🔁 1    💬 0    📌 1
Preview
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

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

02.02.2026 20:34 — 👍 20    🔁 4    💬 3    📌 0
Post image

Come and visit me at the poster session at #QIP26 today! :)))

27.01.2026 09:09 — 👍 5    🔁 3    💬 0    📌 0
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

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

22.01.2026 21:41 — 👍 9    🔁 3    💬 0    📌 0

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?

20.01.2026 21:08 — 👍 3    🔁 1    💬 0    📌 0

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.

14.01.2026 02:13 — 👍 392    🔁 84    💬 24    📌 17
Q4 2025 report Glaive Research Report Q4 2025

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

08.12.2025 20:29 — 👍 3    🔁 0    💬 0    📌 0

And if I got it right,

∂List = List × List -> two lists

17.11.2025 19:36 — 👍 0    🔁 0    💬 0    📌 0

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

17.11.2025 19:36 — 👍 0    🔁 0    💬 1    📌 0

I should also say that C needs to be a decidable container, meaning that the domain/codomain of ∂ is likely muddled even further?

17.11.2025 17:06 — 👍 0    🔁 0    💬 0    📌 0

But surely there is a (largest) subcategory of Cont for which the derivative is well-defined. Is it known what that subcategory is?

17.11.2025 17:00 — 👍 0    🔁 0    💬 1    📌 0

This is because its action on morphisms cannot be defined for an arbitrary lens (to see this, take the unique lens I -> 1, where I is the unit of the tensor product of containers, and 1 is the terminal container. Then the set of lenses ∂I -> ∂1 is empty.)

17.11.2025 17:00 — 👍 0    🔁 0    💬 1    📌 0

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

17.11.2025 12:21 — 👍 25    🔁 5    💬 4    📌 0

Had an absolutely fantastic time in Scotland. It's been great seeing a lot of friendly faces, and making exciting research progress with Glaive

15.11.2025 10:36 — 👍 1    🔁 0    💬 0    📌 0

London ---🚅---> Glasgow

10.11.2025 11:59 — 👍 0    🔁 0    💬 0    📌 0

I do get a burst of inspiration every now and then. But these are few and far in-between.

03.11.2025 19:23 — 👍 2    🔁 0    💬 1    📌 0

Quite hoping it gets back - those have been good days, and I often think about how I wouldn't have become the mathematician and computer scientist I am today if it were not for those days

03.11.2025 19:22 — 👍 2    🔁 0    💬 1    📌 0

Is there a container interpretation in the case of an arbitrary category S?

02.11.2025 22:40 — 👍 0    🔁 0    💬 0    📌 0

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.

02.11.2025 22:40 — 👍 0    🔁 0    💬 1    📌 0
Post image

Para construction for double categories

https://arxiv.org/abs/2510.26465

31.10.2025 11:28 — 👍 2    🔁 0    💬 0    📌 0

This looks like it's a useful resource for thinking about this, though on the first glance it doesn't include anything about tree-shaped arrays, which I'd be very interested in

22.09.2025 20:49 — 👍 0    🔁 0    💬 0    📌 0

I'd been wondering myself about the foundations of the question of 'coordinate transformation' of the logical representation of multi-dimensional arrays or of general inductive types into a physical, 1d linear representation.

22.09.2025 20:49 — 👍 0    🔁 0    💬 1    📌 0
Preview
Categorical Foundations for CuTe Layouts In GPU programming, performance depends critically on how data is stored and accessed in memory. While the data we care about is typically multi-dimensional, the GPU’s memory is fundamentally one-d…

Stumbled upon this on HN:

"Categorical foundations for CuTe layouts"

https://research.colfax-intl.com/categorical-foundations-for-cute-layouts/

22.09.2025 20:48 — 👍 5    🔁 1    💬 1    📌 0

@bgavran is following 19 prominent accounts