MilesCranmer Profile Banner
Miles Cranmer Profile
Miles Cranmer

@MilesCranmer

Followers
13K
Following
5K
Statuses
3K

Assistant Prof @Cambridge_Uni, works on AI for the physical sciences. Previously: Flatiron, DeepMind, Princeton, McGill.

Cambridge, UK
Joined September 2011
Don't wanna be here? Send us removal request.
@MilesCranmer
Miles Cranmer
1 year
I'm super excited to share a new initiative I am a part of! Announcing: Polymathic AI πŸŽ‰ We are developing foundation models for scientific *data*, such that they can leverage shared concepts across disciplines. 1/6
Tweet media one
19
217
1K
@MilesCranmer
Miles Cranmer
6 days
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.
Tweet media one
0
0
13
@MilesCranmer
Miles Cranmer
6 days
@EdwardRaffML Syntax alternative – I tried to make it less verbose What do you think?
Tweet media one
1
0
0
@MilesCranmer
Miles Cranmer
7 days
@renegadesilicon @cursor_ai Yeah the API limits on Claude are definitely a big annoyance. In the end I ended up caving and decided to triple my cursor subscription
0
0
1
@MilesCranmer
Miles Cranmer
7 days
Note that when comparing LLMs for one-shot website generation, Sonnet still beats everything, even DeepSeek R1. (I think this leaderboard has the cleanest signal of any benchmark because the average user is much better at judging a rendered website than judging code)
Tweet media one
0
0
2
@MilesCranmer
Miles Cranmer
10 days
Exciting news – Cambridge is hiring an Assistant/Associate Professor in Data-Driven Radio Astro. Join us!
Tweet media one
0
1
9
@MilesCranmer
Miles Cranmer
18 days
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.
3
0
21
@MilesCranmer
Miles Cranmer
21 days
- print statements ❌ - debugger ❌ - rebuilding rust's entire ownership system in julia because one thread race made you lose it βœ…
4
5
55
@MilesCranmer
Miles Cranmer
25 days
RT @ESAGaia: So long and thanks for all the fish! I just observed my last star this morning... #GaiaDPAC and @esa Gaia teams will do their…
0
186
0
@MilesCranmer
Miles Cranmer
25 days
@NMcGreivy Completely agree! (Maybe not science in general, but AI for science, definitely)
0
0
1
@MilesCranmer
Miles Cranmer
25 days
@NMcGreivy Yes but DeepMind was not formed for protein folding. My intent is more to point out that this style of science β€” searching broadly for established challenges that a new tool would be useful for β€” is an often undervalued approach.
1
0
2
@MilesCranmer
Miles Cranmer
27 days
[You Are Here] ↓ Agent ↓ LLM ↓ High-level language ↓ Low-level language ↓ Assembly ↓ Machine code "AI will replace programmers!" No – each level up this abstraction stack is still programming. AI won't eliminate coding; it's just another evolution in how we express specifications in more efficient ways.
4
5
55
@MilesCranmer
Miles Cranmer
28 days
Reminds me of chess engines: adding humans-in-the-loop actually worsens their performance compared to engine alone. Any human input results in worse performance. Though whether it's true for general problems remains to be seen.
1
0
6
@MilesCranmer
Miles Cranmer
1 month
I love how you can just feed the entire documentation for a language or a package to Cursor. Then I can just do @ {package} and it can read the docs via semantic search. Super slick.
4
0
23
@MilesCranmer
Miles Cranmer
1 month
@PatrickKidger pictured – me dodging the expert nerd snipe 😜 Maybe one day though. It would of course be quite nice to pass pure-Python loss functions...
Tweet media one
0
0
7
@MilesCranmer
Miles Cranmer
1 month
@PatrickKidger I think the first part should already be possible with `warm_start=True` and `niterations=1` and repeated calls to fit. The second part sounds out-of-scope - I think the ROI on a Python-to-Julia converter is low. Maybe with sympy (?) but it would greatly limit the flexibility
1
0
2
@MilesCranmer
Miles Cranmer
1 month
I think "interleaving" depends on implementation here. If you just want something like {expression(X)} + {neural_net(X)} as your forward model, then the gradients can just be concatenated (one w.r.t. expression constants, and one w.r.t, neural net). Or you could just compute the gradients of each piece in separate steps as I'm not sure it would matter much. For anything else, I think the best approach is to let PyTorch/JAX do all of the AD and simply write up a custom autograd function[1] for the expression valuation that calls DynamicExpression.jl's hand-rolled gradient function via juliacall (which itself is pretty battle tested, as it's one of the primary tools we use in PySR/SymbolicRegression.jl!). But need to verify that passing Tensor/DeviceArray to DynamicExpression.jl is ok (passing numpy arrays to it seems to work... gotta love multiple dispatch). Note that the Julia-formatted string is not notation but rather actual code that is evaluated via juliacall. The function object is passed to SymbolicRegression.jl. I don't do any parsing of that string myself or even use a Julia macro – the user provides an arbitrary Julia function. If wanting to use PyTorch/JAX autograd for all of this, the user would need to write a regular PyTorch/JAX function instead – which I guess would even be better? It might just work! The hard part would be Python's GIL which would cause a massive hit in performance. This makes me curious if torch.compile or jax.jit can compile C++ symbols that could be routed to Julia, sidestepping the GIL completely? Darn GIL!! [1] When I say custom autograd I am just thinking these directly: and juliacall lets you pass Python arrays directly to Julia functions, so in principle you might (??) not even need to convert the array because of multiple dispatch
1
0
0
@MilesCranmer
Miles Cranmer
1 month
RT @MilesCranmer: 🚨 FINAL REMINDER 🚨: Multiple Postdoc and PhD positions in our AI + Physics cluster in DAMTP, Cambridge! Deadlines: - Pos…
0
11
0