Sign in

Miles Cranmer

@milescranmer.bsky.social
2.8K followers 285 following 109 posts

AI + Astro/Physics. Assistant Prof at Cambridge. astroautomata.com/

PostsRepliesMedia
Miles Cranmer @milescranmer.bsky.social · 28/09/2025
grep -A/-B might be the worst flags in all of Unix. Is A=after or above? Is B=before or below? Even the alphabetical order is backwards! (A comes *AFTER* B according to grep) I've given up and just use `grep -A {N} -B {N}` for everything
120
Miles Cranmer @milescranmer.bsky.social · 24/09/2025
Does anybody know the actual page limit for ICLR submissions? The author guidelines page contradicts itself:
130
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
Cambridge eventually decided it was a bit much, and, led by the mathematician G.H. Hardy (who, I should note, was Fourth Wrangler in his year...) reformed the system to make it less competitive. More history: www.maths.cam.ac.uk/about/history www.smithsonianmag.com/history/the-...
maths.cam.ac.uk
A History of Mathematics in Cambridge | About the Maths Faculty
About the Maths Faculty
010
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
It was, as you might expect, quite competitive. C.T. Simpson (Second Wrangler, 1842) apparently took a stimulant (ether) to endure 20-hour study sessions. And James Savage studied so hard he was found dead of apoplexy a few months after being named Senior Wrangler in 1859.
100
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
(Many famous names didn't make the list – J.J. Thomson famously sent his servant to ask who came second, only to learn it was himself.) Before 1909 reforms, the examination was a bit of a national spectacle, with substantial betting taking place on the outcome.
100
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
Philippa Fawcett came first in 1890, a full 13% above second place, but since women were not yet awarded degrees until 1948, she was given the title "above the Senior Wrangler." Today, the Maths HPC cluster is named after her.
100
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
Wikipedia has a list of all Senior Wranglers going back to 1748 (en.wikipedia.org/wiki/Senior_...). The list has some recognizable names in science – Herschel, Stokes, Rayleigh, Eddington, etc., along with some interesting ones, like Singapore PM Lee Hsien Loong!
en.wikipedia.org
Senior Wrangler - Wikipedia
100
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
When Maths became the first subject to institute written examinations, it kept the name. The top-ranked students are (still) named "Wranglers," and the top scorer overall is named the "Senior Wrangler," then the "Second Wrangler," and so on.
100
Miles Cranmer @milescranmer.bsky.social · 15/09/2025
Cambridge Maths calls the top student in a given year the "Senior Wrangler." Why? Apparently this originates in Medieval examinations called "disputations," where students would literally wrangle (argue) in Latin with designated opponents.
Historical depiction of an academic disputation
180
Miles Cranmer @milescranmer.bsky.social · 04/09/2025
PolymathicAI is recruiting two postdoctoral researchers to join our team at Cambridge, to work on building and understanding large-scale foundation models for science. Please share with potential candidates!
261
Miles Cranmer @milescranmer.bsky.social · 02/08/2025
Cannot wait for someone to wrap SAP Concur in an MCP It’s kind of crazy you still can’t generate expense reports from a folder of receipts!
040
Miles Cranmer @milescranmer.bsky.social · 15/07/2025
These ones are the XREAL One. I quite like them though haven't tried others to compare. These have no 3D, no bluetooth, no battery, you just plug it in your laptop as an external monitor on your face. Works brilliantly for this, its like a hovering external monitor for your laptop
120
Miles Cranmer @milescranmer.bsky.social · 15/07/2025
That makes sense! I've had a few people ask for this and am considering it. For now, though, you could implement this constraint manually with the following custom loss function: gist.github.com/MilesCranmer.... Pass it as a string to `loss_function_expression`. (Let me know if this doesn't work!)
010
Miles Cranmer @milescranmer.bsky.social · 15/07/2025
Really loving AR glasses for working while traveling. No squinting at my laptop + I can still enjoy the view! These just plug into my closed laptop as an external monitor. Means I'm actually productive on planes now because I'm not hurting my neck looking down the whole flight!
160
Miles Cranmer @milescranmer.bsky.social · 14/07/2025
By the way, just curious, is that `complexity_of_variables` supposed to be `complexity_of_constants`? I only ask because usually in the pysr forums people are looking to minimize the # of constants rather than # of variables
110
Miles Cranmer @milescranmer.bsky.social · 14/07/2025
This looks pretty good to me! Do try out parallelism=:multiprocessing and let me know if that helps. For whatever reason its better at getting better CPU utilization, though it takes longer to start up every time you launch a new search. (Likely small, but could try larger `population_size`)
110
Miles Cranmer @milescranmer.bsky.social · 14/07/2025
Tomorrow I get to give my favourite type of lecture to some new physics PhD students 😃
0140
Miles Cranmer @milescranmer.bsky.social · 13/07/2025
I haven’t done a detailed study myself but it would be cool to see! I can try to ask them what they settled on. Interesting! Do you remember what hyperparameters were used? It might be there weren’t enough populations to use all cores? (Also you could try parallelism=:multiprocessing)
120
Miles Cranmer @milescranmer.bsky.social · 08/07/2025
I am a HUGE fan of Mooncake.jl github.com/chalk-lab/Mooncake.jl, a new language-level autodiff for Julia. Most impressive is how uncompromising the devs are about correctness and reliability. It has some of the best software engineering practices I've seen in the entire ecosystem!
060
Miles Cranmer @milescranmer.bsky.social · 21/05/2025
Wow. Apparently some PySR users are building dedicated rigs for faster equation discovery!
270
Miles Cranmer @milescranmer.bsky.social · 15/05/2025
I just referred to the literal letter 'z' as 'redshift' 😵‍💫
030
Miles Cranmer @milescranmer.bsky.social · 02/05/2025
SymbolicRegression.jl v1.10.0 is out! It can now evolve expressions over arbitrary input types. The video below shows it reverse-engineering a string transformation from examples. Curious to see how people use this!
0120
Miles Cranmer @milescranmer.bsky.social · 11/04/2025
Just released BorrowChecker.jl — a macro library that brings Rust-style ownership and borrowing to Julia! github.com/MilesCranmer...
github.com
GitHub - MilesCranmer/BorrowChecker.jl: A borrow checker for Julia
A borrow checker for Julia. Contribute to MilesCranmer/BorrowChecker.jl development by creating an account on GitHub.
071
Miles Cranmer @milescranmer.bsky.social · 08/04/2025
You have no idea how long I’ve waited for this 😮‍💨
181
Miles Cranmer @milescranmer.bsky.social · 02/04/2025
We have just opened a fully-funded PhD position at Cambridge, supervised by me & Vasily Belokurov. Topic: AI + astronomical imaging (broadly defined). Deadline: April 16. Please share with anyone who may be interested! www.postgraduate.study.cam.ac.uk/courses/dire...
0164
Miles Cranmer @milescranmer.bsky.social · 25/03/2025
Very excited to share that my group in Cambridge is offering an “AI for Science” Encode fellowship on multiscale physics through Pillar VC & ARIA! Apply by April 30th: encode.pillar.vc/projects/mul...
0130
Miles Cranmer @milescranmer.bsky.social · 07/03/2025
Colab tends to update infrequently, so I would really really recommend adding a compatibility layer. I think 99% of users who try it out in colab will not be aware of that package constraint, so will end up using old Tidier.jl by mistake
150
Miles Cranmer @milescranmer.bsky.social · 06/03/2025
This might be the greatest bug report I’ve ever seen
1284
Miles Cranmer @milescranmer.bsky.social · 05/03/2025
Wow, Google Colab just added Julia support!!! 🎉
27113
Miles Cranmer @milescranmer.bsky.social · 26/02/2025
Why 'I don’t know' is the true test for AGI—it’s a strictly harder problem than text generation! This magnificent 62-page paper (arxiv.org/abs/2408.02357) formally proves AGI hallucinations are inevitable, with 50 pages (!!) of supplementary proofs.
0121
Miles Cranmer @milescranmer.bsky.social · 25/02/2025
Totally! Two ideas: 1. Evolve a hierarchy of expressions, using templates: ai.damtp.cam.ac.uk/pysr/example.... e.g., one expression for the latent, another for the observed (takes the latent as an input!) 2. Approximate an existing model using similar ideas to github.com/MilesCranmer...
ai.damtp.cam.ac.uk
Toy Examples with Code - PySR
110
Miles Cranmer @milescranmer.bsky.social · 25/02/2025
Symbolic regression update—new versions of PySR & SymbolicRegression.jl just released with improvements to mini-batching. Should work much better for large datasets!
180
Miles Cranmer @milescranmer.bsky.social · 24/02/2025
Having used it over the past week, I do think that ChatGPT deep research mode is worth the $200 price tag—something that, for me, o1-pro hadn’t justified. It’s not perfect, but for specific tasks, it is **extremely** useful.
020
Miles Cranmer @milescranmer.bsky.social · 16/02/2025
This usually ends up being due to floating point error, like how (0.1+0.2)-0.3 != 0.1+(0.2-0.3) (Though there may be some kind of convergence issues at play too. Maybe tuning is needed in the constant optimizer)
110
Miles Cranmer @milescranmer.bsky.social · 16/02/2025
Isn’t it a random number between -1000 and 1000, if I’m reading it right
100
Miles Cranmer @milescranmer.bsky.social · 15/02/2025
I think using absolute error instead of squared error would be better too, considering the massive scale of the output data. (can do this with elementwise_loss="(pred, targ) -> abs(pred - target)")
110
Miles Cranmer @milescranmer.bsky.social · 15/02/2025
Note: exp(-1000/-20) will be very large, so I would recommend using precision=64 for 64-bit calculations. With this change and many more iterations, I was able to get the result (after simplification). This type of problem has a very steep loss surface, so just need to run for longer.
110
Miles Cranmer @milescranmer.bsky.social · 15/02/2025
`f(x1)` can be an arbitrary expression, including having its own constants. So there are degenerate solutions for p1[1] here. Although I guess in principle it should prefer the simplest.
010
Miles Cranmer @milescranmer.bsky.social · 15/02/2025
Took me until today to figure out how to separate tracked/untracked files in VSCode. So much better!
1100
Miles Cranmer @milescranmer.bsky.social · 14/02/2025
I don't think one could compare constants this way, because it would be degenerate with the constants inside the expressions. (If I understand the question correctly?) Let me know if you try though, I'd be very eager to hear the results!
100
Miles Cranmer @milescranmer.bsky.social · 14/02/2025
Yes, that works. You can even do f(f(x))
110
Miles Cranmer @milescranmer.bsky.social · 14/02/2025
New feature! PySR v1.4 lets you define a template expression to optimize that both has learnable parameters AND learnable expressions:
192
Miles Cranmer @milescranmer.bsky.social · 12/02/2025
I love Cursor, but because it uses a slightly out-of-date VSCode, the extensions can have known vulnerabilities! I did some digging and noticed that the main Python extension has a *known* remote code execution vulnerability (CVE-2024-49050), and has had it for three months!
080
Miles Cranmer @milescranmer.bsky.social · 11/02/2025
I’ll be giving lectures on advanced ML techniques at this AI-for-HEP summer school in Lake Como, Italy, from July 14-18. Expect a deep dive into symbolic AI and beyond. Should be a great event! Students can apply here: buff.ly/3WTTE8J
1110
Miles Cranmer @milescranmer.bsky.social · 04/02/2025
Surprisingly many people have asked for this kind of constraint! Specifically: constraining different terms to only depend on a certain subset of features
030
Miles Cranmer @milescranmer.bsky.social · 04/02/2025
Interested in feedback on this syntax idea for predefined "template expressions" in SymbolicRegression.jl and PySR. Basically: what is an intuitive way to prescribe a fixed skeleton for a symbolic search? Ideally the syntax should be flexible and extensible too.
160
Miles Cranmer @milescranmer.bsky.social · 30/01/2025
Exciting news – Cambridge is hiring an Assistant/Associate Professor in Data-Driven Radio Astro. Join us!
030
Miles Cranmer @milescranmer.bsky.social · 22/01/2025
It's crazy how at one point I was worried whether I would like teaching. But now, with the new term starting tomorrow, I can't wait.
0170
Miles Cranmer @milescranmer.bsky.social · 19/01/2025
- print statements ❌ - debugger ❌ - rebuilding rust's entire ownership system in julia because one thread race made you lose it ✅ github.com/MilesCranmer/BorrowChecker.jl
github.com
GitHub - MilesCranmer/BorrowChecker.jl: A borrow checker for Julia
A borrow checker for Julia. Contribute to MilesCranmer/BorrowChecker.jl development by creating an account on GitHub.
2141
Miles Cranmer @milescranmer.bsky.social · 16/01/2025
And in the case of GDM they tend to look _very_ broadly for problems. Whereas I suppose the more traditional route is to work backwards from a problem (or small set of problems) and find a tool
050