Showing posts with label LLM. Show all posts
Showing posts with label LLM. Show all posts

Friday, October 10, 2025

On the Impact of AI/LLMs in Mathematics and the Role of Embeddings

 For a view on LLMs from the point of view of Mathematical research watch Alex Kontorovich's recent talk at Harvard CMSA, The Shape of Math to Come [2].

If you want to skip the beginning I may suggest jumping to min 33 [1]. But he does make a reference to earlier slides when describing what speedup he's looking for when it comes to using LLMs to generate new mathematical results.

Tl;dr: He envisions a future of math hinging on two components: first formalization in a language like Lean or similar (Agda, Coq,...) and second an AI component atop of the former. In this case he only has in mind a generative one, namely an LLM (compare this to Lecunn's Dino talk [3]). At min33 he starts conveying the main idea of where he wants to get: what  matters is the idea we want to express, not its formalization, except that we need a system or process ensuring the latter actually conveys the former correctly. Even if an LLM system like AlphaProof could generate new mathematical results (papers) that are 99% of the cases fully correct and true, it is not useful for advancing Mathematics because of that probabilistic nature of its correctness. But LLMs could help in the initial step of translating ideas into Lean and then finding a proof, which, by the typed nature of Lean, if it "compiles", it is correct. Therein could lie the real speed up in Mathematical research, where researches would be able to spend more time in shaping their ideas, instead of having to dedicate quite a significant effort in proofreading their own derivations.

I wonder if one could not draw a direct analogy between the role of that formalization step in Lean and the universal underlying representation, in AI parlance, embedding step. In the following text I will be using interchangeably embedding, representation, description and up to some extend formalization too.

Here, formalization is meant as a graded concept: the same math result expressed in Lean would be 100% formalized, while in Natural language in would be anywhere between 0% and say 1% -the point being it's upper bounded. 

In this sense is that I would say describing some objects as vectors using an array of integers is in itself a formalization level, at the same time as an embedding. But you could be describing your vectors in a synthetic way, as geometrical objects -the arrows. Or you might be able to dispense altogether of the idea of vectors and describe your problem in a purely diagrammatic way. Mind you, all these descriptions belong to a well formalized area of Mathematics (Linear Algebra, Synthetic Geometry or say Clifford Algebra or Geometric Algebra, and (many) diagrammatic descriptions can be put within Category Theory. 

Each description/representation of your world will have different computational advantages. Hence, using different formal math tools (say from different math fields) could make a huge improvement in the results or usefulness of any given ML/AI tool. Maybe these AI tools have each different representations (descriptions, embeddings, formalizations) where their use is optimal. 

So,  while say the area of Reinforced Learning (RL) is currently stuck, that could change if we find a better description suitable for it. The same would apply in a practical problem you may be stuck trying to use some ML/DL tool to solve it, but changing your world description may lead you efficiently to its solution. 

The latter is in fact a "universal" trick not only in Math or Physics: change the way you look at things and they could go from being a roadblock to boosting you forward.


Anyway, it's highly possible that all this is but an incoherent rambling under the influence of a little bug I'm currently evicting. 


Note: In Kontorovich video, image and sound are out of sync by far; however, sound and subtitles are in sync.

[1] min33: https://youtu.be/xIG1RI44Nog?t=2002[2] full: https://www.youtube.com/watch?v=xIG1RI44Nog

[3] Lecunn's talk on Dino3: https://www.youtube.com/watch?v=yUmDRxV0krg 


PS: Talking about different descriptions, Youtube just fed to me this other recent video on "Towards a Geometric Theory of Deap Learning" by Govind Menon. Maybe worth having a closer look another time.


PS2: The Internet gods pointed me to another video that would perfectly match as a second part of Kontorovich's one: "Where is mathematics going (September 24, 2025)" by Kevin Buzzard, sponsored by the Simons foundation.

Monday, October 6, 2025

On "The Bitter Lesson" by Richard Sutton

Just found an interview with Richard Sutton referencing his "Bitter Lesson" post from 2019. See link at the bottom.

He claims to be making two points. I think his first one is a useful view for considering what AI topic might be more fruitful in the long run. Here long run is meant as on a personal level, not on a long run of Science. Read further along.


The successful approaches would be based fundamentally only on "search" and "learning". These are what often are critized as "simple brute-force approaches". 


This approach has been the one leading to the current wide-spread adoption and surprising effectiveness of RL -exemplified by solutions like AlphaGo, AlphaZero-, DeepLearning and LLMs.


And this success should be contrasted to the comparatively failed attempts at implementing techniques bearing what our own understanding of how we solve the same tasks or how we learn is.


In summary, trying to come up with techniques based on our previous world models fared way worse than techniques based on simple, general brute-force methods.


As he mentions in that interview, these claims are meant but as a reflection of what has or not worked out in the past 70 or so years. He makes no claim this will be the case in the future.


His second claim consists of his very last paragraph. However, I'm not certain if his point here isn't just a rephrasing of the previous one. 


Neither am I convinced he is consistent: One might argue that what he thinks of "search & learning " are but idealizations, i.e., models of methods created  by our minds. In particular, I think that what he considers as "learning" is simply RL, reinforced learning. 


But this method is nothing but human knowledge that we would be putting into the AI, which is the approach he seems to be arguing against in this second point.


His only argument around this seems to be that he considers these two processes as simple enough for serving as guiding principles. They do fit with the view of his first point though.


References

* https://en.wikipedia.org/wiki/Richard_S._Sutton 

* http://www.incompleteideas.net/IncIdeas/BitterLesson.html


Saturday, April 19, 2025

On the foolishness of NL programming

 The title of this post is but that of an article by the late E.W. Dijkstra that is still fully valid in these days of frantic work on LLMs:

The virtue of formal texts is that their manipulations, in order to be legitimate, need to satisfy only a few simple rules; they are, when you come to think of it, an amazingly effective tool for ruling out all sorts of nonsense that, when we use our native tongues, are almost impossible to avoid.

Instead of regarding the obligation to use formal symbols as a burden, we should regard the convenience of using them as a privilege: thanks to them, school children can learn to do what in earlier days only genius could achieve. When all is said and told, the "naturalness" with which we use our native tongues boils down to the ease with which we can use them for making statements the nonsense of which is not obvious.

You can access it here.


Wednesday, October 9, 2024

Nobel Prize in Physics & Chemistry 2024 (Part I)

I will elaborate my thoughts in a later post. For now, this is meant as a stub addressing some misunderstanding of the relevance, or lack of, of "AI" (but not LLMs!) in these respective fields.

Let's start with the Nobel award for chemistry.

AlphaFold won the CASP competition in 2018 & 2020. The thing is that's a recurrent competition in Computational Biology seeking new methods/models for determining protein structure. These may have multiple applications, e.g, in protein design, where you want to optimize an amino acid sequence starting with a given structure. If I remember correctly, David Baker was the first in coming up with a new design and successfully synthesizing it -can't find the reference right now.

Biology not having a Nobel prize on its own makes it a candidate for either the Chemistry or Medicine categories. As I'm sure you know, Structural biology, as a part of biochemistry, is like "usual" chemistry but on steroids.

All this makes the award in chemistry meaningful to me: They all made important contributions to the field of Structural Biology.

It's hard to say the same of any impact of Hopfield, or even less Hinton, on Physics though. It's specially insidious in the case of the latter.

Let's now switch to the Nobel award for Physics that went to Hopfield and Hinton.

Hopfield, with his Associative Memory model, and McCulloc & Pitts, with their perceptron model, can be consider among the forefathers of Neural Networks (NN), in the shadow of Martin Minsky; Hinton made those NN "deep", and in doing so he ignited the "AI" fever of nowadays.

Hinton played first with a model similar to that of Hopfield, both of these based on what's called the Ising model in Physics. This was initially invented as a simple model of a ferromagnet. Let's see what how it works.

A ferromagnet is a material that behaves as a magnet on its own, after having it exposed to an external magnetic field. Kind of, "you charge it" and it becomes a magnet. It can "discharge" as well, again in the presence of an external magnetic field. Remember, the earth is a magnet, so expect some progressive discharge with time.

The transition from "normal" (non-magnetic) to magnetic state, or vice-versa, is the prototypical example of what in physics is called a second-order phase transition (PT). These are a special case of very "smooth" (in a precise mathematical sense) transitions. Many materials and systems, having nothing to do with magnetism, may exhibit such a PT. So the magnetism of the Ising model is, in principle, just a distracting, anecdotical feature. The ice-liquid transition of water is NOT an example of 2nd order phase transition, but a "less smooth" one, boringly called 1st order PT.

It turns out that in these 2nd-order phase transitions all the microscopic details of the different materials and systems become completely irrelevant for describing the overall features of the transition. There are differences on the exact value of when the PT happens, or how effectively it extends over the whole sample, etc. But, you can say that they all behave the same way if you "shift the graphs results" compensating for those numerical differences. To put an analogy, both alcohol and water evaporate at different temperatures, but both two transitions are first-order PT. You can perfectly overlap their graph results if you rescale them appropriately based on those numerical differences. Think of all instances of the character "s" in the previous sentence. They all are located at different positions along the sentence. However, you'd say "it's the same "s"' because you can "rescale" (translate) their position so as to overlap them perfectly. The rescaling you may do for second-order PT is different than that for first-order PT. This is a type of symmetry difference that puts those two types of transitions apart.

OK, so we have a ferromagnet that gets (de)magnetized in the presence of a magnetic field. Can we model this transition so as to convey those "universal features" of it? The Ising model is the first and simplest of models doing just that. This models the ferromagnet as a collection of "spins" that can be in only two positions, up or dow. Think of them as microscopic magnets having their "north" either up or down. When all spins are randomly up and down, the material shows no magnetization. But if all were pointing in the same direction, the piece of macroscopic sample you are holding in your hands would behave as a magnet.

Incidentally, Physics has a systematic procedure for removing all microscopic details of a fine-grained model. In doing so we obtain what's called an effective Hamiltonian (aka, model), e.g., capturing only some basic, coarse-grained features of the system. Clearly, any such model, by its simpler nature, may describe other systems of a completely different nature say like a physical system, a geometric problem or a combinatorial one. The Ising model can be described as such an effective "model".

As we often do in Physics, we describe the state of a system as that of minimum energy. That is, finding the properties of the system entails solving an optimization problem using a given model. For high temperatures all spins point randomly and the minimum energy of the Isign model gives exactly that, i.e., no magnetization. But fir low enough temperatures the minimum-energy solution of the Ising model shows practically all spins pointing along the same direction, i.e., spontaneous magnetization.

There you go, we used an optimization technique (mathematics) on a model (mathematics too, but with inspiration in Physics) with the goal of describing a phase transition (physical phenomenon).

Say you improve the optimization technique, f.i. by making it 10x faster, or tweak the model so as to describe a different material, but keep the goal of describing the PT. Clearly, you would still be making a contribution to physics.

Use the same technique and model but aim at storing and retrieving an image...and you are NOT making a direct contribution to the understanding of physical phenomena. You would be contributing to... you guessed it, Machine Learnig.

Emphasis in "direct" in that last paragraph. If you want to argue that all our knoledge is connected or that our reality might be digital, that's a whole different discussion that you are a free to pursue.

Let's recapitulate. The fact that you can use methods and models initially developed for Physics to study problems in domains far away from it may be surprising and lead you to think there is some substance to the award. But, as you can infer now from the previous discussion on the Ising model, on one hand, that's a feature of Physics and its language, Mathematics. On the other hand, that fact leads to a, currently still a philosophical, question of what is the ultimate object of study of Physics.  Landauer's principle directly connecting Physics and information (erasure) opens the door to interesting speculations, as it makes information a "traditional" physical observable that can be measured in principle.

So, no, I don't think Hopfield, and specially not Hinton, deserve the Nobel prize in Physics.

Note added in proof: If the Nobel committee just wanted to "sell" us something I can understand. That's what I did in assigning labels to this post.

https://www.nobelprize.org/prizes/physics/2024/advanced-information/