@dpiponi@mathstodon.xyz cover

Disclaimer:
👽 My opinions are not my own. They're beamed to me by aliens

Current life:
🎮 Epic Games

Previous lives:
🍩 PhD in Riemann theta functions
🧬 Glaxo Group Research
💥 Mass Illusion, Esc, ILM
🎈 Google X, Verily, Google

Likes:
🚴 I like to bike
🏃 I like to run
🎛️ my musical tastes lie towards the electronic end of the spectrum
🚀 I like Andor and The Mandalorian
📈 I have an OEIS entry https://oeis.org/A387361

This profile is from a federated server and may be incomplete. View on remote instance

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I just remembered a programming technique from the days when I had access to a Commodore Pet.

I wanted a graph plotting program to allow users to type in a function and plot it. I could have written an expression parser. But far easier was to print out a line of code for the function and a RUN command (or similar), place the cursor in the right place, put a carriage return or two into the keyboard buffer, and stop the program. IIRC the Pet literally read input from the frame buffer (which allowed you to edit code by cursoring into the output of LIST) so this would update your program and continue.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lritter Oooh...nice. I need to somehow figure out how to get the benefits of a wide screen in that form factor and then I'll be happy.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

"Autoregressive" seems like a very fancy word for "doing stuff in some order".

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lritter Eg. in generative AI you could generate the entire image as one global diffusion process, or you could generate a pixel at a time with later ones depending on what came before. The latter is autoregressive.

(There's an argument the former is too, but that's a distraction...)

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lritter I think I do too

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Catching up on the last few years of generative ML.

(Pixelwise) average a bunch of pictures of dogs and you get something so blurry it probably doesn't look like a dog. But take lots of random paths from cats to dogs, take the vectors along those paths, average them out to define a vector field in the ambient space, and integrate to get paths, and now you have paths that go from cats to dogs without blur. It's bizarre that something so simple is incredibly powerful.

(It's even weirder than that because this method is sort of self-sacrificing. You can use it to generate pairs that can be used to train a conventional neural net to convert cats to dogs without blur. You don't need to mention the paths or vectors after that.)

(Caveat: I haven't tested specifically on the problem of converting cats to dogs, that's just an illustrative example, but I'm 99% sure it'd work fine.)

https://arxiv.org/abs/2210.02747

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I remember mentioning this book [1] on Twitter or G+, maybe 10 years ago. I found it used somewhere. I think I was soliciting recommendations for books like it by which I meant short readable self-contained accounts of some subject, not necessarily completely rigorous, with exercises and solutions.

Anyway, 10 years later I realise this was a really good book to read. I think it gave me the beginnings of good intuition about SDEs [2] and I couldn't have guessed then how useful that would be today.

[1] "An Introduction to Stochastic Processes in Physics" by Don S Lemons
[2] SDE = Stochastic Differential Equation

@dpiponi@mathstodon.xyz avatar dpiponi , to random

A recent popular work of sci-fi got me wondering if a biological radio is possible. As cells are basically nano-factories I expect the answer is yes. But what are the most plausible designs for a biological radio receiver and transmitter?

@dpiponi@mathstodon.xyz avatar dpiponi , to random

If I was applying for a PhD today I think the topic I'd pick would be related to random matrices. The content of this paper illustrates why in the most readable summary I've come across:

https://www.imaginary.org/sites/default/files/snapshots/snapshots-2018-002.pdf

It (bizarrely!) connects the subject I did study (Riemann surfaces) with physics and random matrices and to keep the CS part of my brain happy there's a recursion scheme. It also hints at why I think String Theory is still an important subject despite me never having "believed" in it.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

It makes me happy that there are people in the world who, when I idly wonder about something, have already done the research.

The iridescence you see sometimes see in meat, especially bacon, is likely caused by alternating muscle layers acting as a photonic crystal.

This is different to a more obvious interference related hypothesis that it's just striation on the surface acting a bit like a diffraction grating.

https://academic.oup.com/ijfst/article/56/1/250/7806371

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Living in a country where if you ask for a cup of tea in a restaurant they'll bring you a cup of lukewarm water and expect you to dunk a teabag in it I shouldn't be too surprised that I can't buy a decent electric kettle. This time I decided to get an expensive one rather than a cheap one that takes forever to boil and falls apart after a year. Well it seems well made, but produces hot water that tastes of plastic and silicone sealant. Why is this so hard?

(Yes, I could go old school and use a clay pot on open fire like my ancestors did but I'd like modern and convenient.)

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@steve @pkhuong I was admiring a friend's instant hot water tap the other day. I will definitely consider that next time we remodel. It did seem like it was actually hot enough for tea - but this was in the UK where there might be different expectations to the US.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

A common strategy when implementing arrays that grow at the end is to allocate space for N bytes initially and then when more space is required resize to a block of size AN for some A, typically in the range (1, 2], and then keep reallocating as needed scaling up by A each time.

Let's say A=2. How much memory do we expect to actually occupy?

A good guess might be to say that typically at any moment in time we expect to be half way through the new region so that on average 3/4 of the array is used.

But Benford's law tells us that numbers (for some ill-defined class of number that probably includes array sizes) follow an improper distribution with the property that whatever base you pick, the mantissa M has a cumulative distribution given by log(M).

More precisely, if X is the size of a random array and S is the smallest power of 2 at least X, then we expect P(X/S < z) = 1+log_2(z). Integrating we find

E[X/S] = 1/(2 log(2)) = 0.72...

slightly less than 3/4, but maybe close enough we don't need to worry about it.

https://en.wikipedia.org/wiki/Benford%27s_law

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I couldn't get through Wandering Earth. Meanwhile here's how you actually move the Earth:

https://arxiv.org/abs/astro-ph/0102126

"In this paper, we have investigated the feasibility of gradually moving the Earth to a larger orbital radius in order to escape from the increasing radiative flux from the Sun. Our initial analysis shows that the general problem of long-term planetary engineering is almost alarmingly feasible using technologies that are currently under serious discussion. The eventual implementation of such a program, which is moderately beyond current technical capabilities, would profoundly extend the time over which our biosphere remains viable."

Or as Archimedes said: “Give me a firm place to stand and a lever and I can move the Earth.”

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I really like Theorem 1 in this paper:

https://arxiv.org/abs/1106.1465

A well known way to compute the determinant of an n x n matrix (aij) is this:

Write 1, 2, ..., n in a row.
Write 1, 2, ..., n in a row below.

Now join each number in the first row to a number in the second with a line.

Each such diagram represents a term like a12a21a33 where we have one factor for each line and the indices are the beginning and end of the line. Sum all of these terms weighted by -1 if the number of intersections of the lines is 1 The total is the determinant. I've sketched the result for a 3 x 3 matrix.

I'm not sure it needs a proof as this is practically one of the standard definitions. But see
https://mathoverflow.net/a/417941/1233

for how the number of intersections arises.

The thing that's new to me is that if you allow not just lines joining top and bottom, but also "cups" and "caps" that double back to the row where they started, you get another method to compute determinants. This time you write the matrix as A+B with symmetric A and antisymmetric B and where the diagonal and above elements of A are aij and the diagonal and above elements of B are bij. The determinant, as a function of (aij, i <= j) and (bij, i <= j) is given in a similar way where we now consider lines to represent aij and cups and caps to represent bij. I have again supplied a sketch but see the paper for details.

There's also a version for matrices written as A+iB.

Sorry: in the diagram I use A=(aij) + (bij) but in the text above it's A=(aij) and B=(bij).

image/jpeg

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lisyarus Definitely! The motivation behind this is to get a way to compute Pfaffians efficiently. You can think of determinants being sort of bosonic and Pfaffians as fermionic and this theorem helps build a bridge between the two.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Prepare to have your mind blown

ALT
@dpiponi@mathstodon.xyz avatar dpiponi , to random

Hardly a week seems to go by without someone claiming that they have for the first time achieved true definitely verifiable without a doubt "quantum advantage". Often it's the same people making the same claim each time.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Now I've looked it up on Wikipedia I'm embarrassed by the atrociousness of my pronunciation of Ithell Colquhoun when I bought a ticket for the exhibition of her work at the Tate Britain the other day: /ˈaɪθəl kəˈhuːn/

ALT
@dpiponi@mathstodon.xyz avatar dpiponi , to random

Sitting in a coffee bar in Cambridge it seems like a good moment to push out a first rough version of my probabilistic DSL that's good enough to answer actual questions on the RPG stack exchange.

https://github.com/dpiponi/dice-nine

I know it can do this because I pulled down 50 examples from the stack exchange and used them as my tests - this being the version that finally runs all 50 successfully.

https://colab.research.google.com/drive/1sOh3Ie_uD2RXVKGoFZ3MZwXN-t9_5KCQ?usp=sharing

There's not a lot that's original about the code but it performs well compared to similar tools (eg. anydice) despite being 100% Python.

One thing that may be of interest - using Python generators allows you to support a degree of laziness which is really powerful. If you want exact computations for discrete distributions you need to be able to explore the entire probability space which means you want to "materialise" the smallest amount of state you can get away with. For example, lazy_sum(1000 @ d(6)) sums the rolls of 1000 dice but 1000 @ d(6) is a lazy sequence and so only ever materialises one die roll at a time and in the worst case it has thousands of states to manage rather than 6^1000.

Also fun was using Wang's rational reconstruction algorithm to implement fast parallel (in the sense of numpy) high precision rational arithmetic without having to leave Python. (Bit rough around the edges, currently the onus is on the user to detect overflows.)

https://en.wikipedia.org/wiki/Rational_reconstruction_(mathematics)

@dpiponi@mathstodon.xyz avatar dpiponi , to random

View from local shopping mall

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@demofox There are Cold War era bunkers around here that really look Doom. Just dawned on me why this reminds me of Doom so much: despite the curve every surface is horizontal or vertical.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@SnoopJ @demofox There's also a BFG

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I find it weird how many physical processes look like extremely unlikely events drawn from some probability distribution. Most of thermodynamics looks like this - the Boltzmann law is what you get if you assume particles have energies drawn from a wide flat probability distribution conditioned on the sums of energies being very low.

Suppose you have a particle doing a random walk on the integers with a 50/50 chance of going left or right at each step. After 100 steps it's very unlikely to have moved 75 steps to the right. Nonetheless, we can still ask about its likely trajectory conditioned on it ending up 75 steps to the right. The first plot is really a stack of 101 plots. Row T of pixels represents the conditional distribution at time T given that the particle walked from 0 at time 0 to 75 at time 100. As you might expect, we get a cloud that expands to maximum uncertainty at the midpoint - and of course the checkerboard pattern due to parity. The key thing is we get a cloud around a straight line...

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

In the second image I have the same thing except I've changed the rules for the random walk so the steps are likely smaller if the position is right of a certain threshold point. There's a clear change of velocity at the threshold.

If a system is in an unlikely state and is made of many subparts then in some sense the unlikeliness gets shared out between the parts. In fact, I'd say this is one of the core ideas of thermodynamics. Temperature is a measure of this unlikeliness and the idea of systems being at the same temperature when in equilibrium is a formal expression of this sharing.

For the second walk the steps on the right of the threshold have a smaller variance so sharing out unlikeliness equally means that the steps on the left of the threshold are larger. If this were a 2D random walk we'd have a form of Fermat's principle. And if we worked on a Riemannian manifold and took steps of fixed metric size we'd have geodesic paths. More generally you can actually write down a kind of Lagrangian for extreme paths so it looks a bit like conventional classical physics [1].

BTW @keenancrane has an application of this for finding geodesics on 3D models that IIRC was published at SIGGRAPH.

[1] https://arxiv.org/abs/1802.07666
[2] https://www.cs.cmu.edu/~kmcrane/

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lisyarus @keenancrane It sort of is. You can replace probabilities here with quantum amplitudes but I'm not sure how to interpret it. It reminds me of the proof that despite wave functions we expect to see straight line tracks in cloud chambers.

@regehr@mastodon.social avatar regehr , to random

30 mil buys you a sauna and a hobbit hole, but it doesn't buy you good taste

https://www.zillow.com/homedetails/13322-N-Grove-Dr-Alpine-UT-84004/2071451490_zpid/

dpiponi ,
@dpiponi@mathstodon.xyz avatar

@regehr Wondering about that bed to bathroom ratio.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

If you say artoo, as an abbreviation for R2D2, which do you say?

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@castano I didn't know about that one. I like it!

@dpiponi@mathstodon.xyz avatar dpiponi , to random

My wife, who works in the local libraries, brought this book home one day. Not my usual type of reading material but if you live in the SF Bay Area I think it's a must-read. Seems like all the stereotypes you might have about Marin County were well established 50 years ago. They're all true of course.

Very funny. Made me feel self-conscious for wearing Birkenstock slippers. (Medical reasons...)

https://en.wikipedia.org/wiki/The_Serial

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Technician comes to repair dishwasher. Brings wrong parts. Says AI orders parts. Between Republicans and AI I've never before felt so completely surrounded by ignorance and stupidity.

@mattblaze@federate.social avatar mattblaze , to Photography

"Bowl For Health", Treasure Island, San Francisco, CA, 2007.

All the pixels, shoe rental not included, at https://www.flickr.com/photos/mattblaze/2123765265

ALT
dpiponi ,
@dpiponi@mathstodon.xyz avatar

@mattblaze Slightly creepy having these next to a well trodden path there.

dpiponi ,
@dpiponi@mathstodon.xyz avatar

@mattblaze I worked for a few years on the Alameda (ex-)naval base with much the same situation and it was beginning to get disturbing how many people I worked with fell to cancer. But it's tricky to find background rates to compare with to see if this is typical.

dpiponi ,
@dpiponi@mathstodon.xyz avatar

@mattblaze The only reason I don't have a Geiger counter is that I couldn't decide which model to get from the wide array on offer :)

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Back in Oakland having a PhD makes you overeducated and unsuitable for jury duty but that’s not working here in Marin. I’ve a feeling I’m actually going to be doing jury duty for real this time.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I love deleting stuff. Photos that are near duplicates, albums I no longer listen to, blocks of code replaced by a much shorter abstraction, junk email, receipts from ancient purchases, ancient apps.

In some ways it's more of a distillation process, deleting something often raises the average quality of what's left.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lisyarus Deleting code is the most satisfying.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

I phoned customer service for my phone provider. Impressed with how human the AI sounds. It asks my name. And then makes some joke about pepperoni. Not as bad as praising Hitler but that's still a pretty bad customer service faux pas.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@lritter I'd love to see the prompt

@dpiponi@mathstodon.xyz avatar dpiponi , to random

If I ever take up a life of crime I'm gonna buy a load of crime scene evidence markers and leave them around my crime scenes to mess with the detectives.

https://arrowheadforensics.com/products/photo-documentation/evidence-marking-cones-and-tents.html

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

And when I become a Bond villain I think this will be my lair:

https://www.zillow.com/homedetails/2900-Buena-Vista-Way-Berkeley-CA-94708/24839827_zpid/

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Before visiting Norway I didn't realise how into weird sculpture Norwegians are. Not just the Vigeland stuff. Sculpture lurking everywhere.

Having just reread Use of Weapons I "enjoyed" the chair.

A gray stone sculpture of a pile of maybe a dozen interlocked naked bodies.
A chair carved into a tree stump with a widely spreading network of creepy roots on a foggy day in a forest.
A wooden sculpture of a two headed seated person sitting on a stool. One head has a shock of yellow hair and wears a shocked expression. The other, looking away. looks like it has a beak. In a foggy forest.

ALT
@dpiponi@mathstodon.xyz avatar dpiponi , to random

I have a terrible confession to make. I've been reading the Dragonlance novels. I have an even more terrible confession to make. I'm enjoying them.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@castano I would not be surprised if the Spanish version is better. I frequently felt like the authors weren't very good at using their own language! There's a section using the word "thee" that almost hurts to read. But the entertainment value is still high.

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Sitting on the sofa at home with some cold-like illness I'm fascinated by the moiré patterns through the insect screen on the windows.

About 7-8m away is some wood. About 3-4m away is a screen. The wood grain is too fine to perceive. The mesh in the screen is also too fine to perceive. But through the magic of aliasing I can see a low frequency version of the wood grain through the screen.

It's a form of heterodyning that makes a high frequency signal (wood grain) perceptible by multiplying by a local oscillator (screen) and filtering (my eyesight).

https://en.wikipedia.org/wiki/Heterodyne

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Oh wow! Are there really people who get any answers in the white areas?

@dpiponi@mathstodon.xyz avatar dpiponi , to random

Although everyone is into large models these days I like small models that you can understand.

I good example is the Bradley-Terry model of tournaments that I've mention before. If you have historical data on who beat whom in the past then you can build a model by assigning everyone a score s_i and say that the probability that i beats j is

f(s_i-s_j)

where f is the logistic function

f(x)=1/(1+exp(-x)).

The task is then to fit s_i to your historical data. This formula is almost the simplest thing you might make up using the toolkit of machine learning, but it turns out to be a maximum entropy model. (Weird how this happens more often than it should.)

The task of fitting the s_i has a long history and a popular method was developed by Zermelo (yes, that Zermelo) back in 1929.

Anyway, I noticed a very recent paper that does a simple algebraic rearrangement of the underlying mathematics and results in a much faster algorithm to find the globally optimal fit.

https://jmlr.org/papers/volume24/22-1086/22-1086.pdf

Tangential: I'm amused by the fact that this model of game playing was developed by Milton (Terry) and (Ralph) Bradley but has nothing to do with Milton Bradley.

dpiponi OP ,
@dpiponi@mathstodon.xyz avatar

@demofox @SnoopJ You mean it's actually literally true!

@mcc@mastodon.social avatar mcc , (edited ) to random

For three full years now I've been semi-daily posting a music recommendation in a big long thread, but it turns out 300-post threads kinda break Mastodon, so I have to restart the thread every so often.

This post is a placeholder. I normally make a YouTube playlist for the previous year to put at the top of the thread, but I've had an awful month and haven't finished that yet.

But if you want to see year three's posts, they're here: https://mastodon.social/@mcc/112356066616688565

And here's year four:

dpiponi ,
@dpiponi@mathstodon.xyz avatar

@mcc I was very late discovering that album, maybe 2015. I find it such a unique and special album. Everything from DJ Shadow since then seems, to my ears at least, just so ordinary.