Latest / Agentic Conversations (formally mlops.community) / arrowspace: Vector Spaces and Graph Wiring
Transcript
- 0:00Because once you have data evaluation, you have
- 0:02classification, you have search, you have a new set of tools that
- 0:05you can, that you can implement with this, right?
- 0:09And that's what graph wiring is about.
- 0:12What do we do with this super nice, super new, cool tools
- 0:15provided by AP Plexity to actually supervise, manage,
- 0:21curate data sets for machine learning operations and large
- 0:25language model operation? You've been working on a lot
- 0:33over the last years. Can you break down for the
- 0:37listener what you've been sinking your teeth into?
- 0:41Yeah, absolutely. Very, very briefly.
- 0:44It's like I've been actually experimenting a lot with drugs
- 0:48since like March last year and I've run into some limitation of
- 0:55vector search. But then like as I am like while
- 1:00the rabbit old person, like probably a lot of developers and
- 1:04engineers around, I started to dig a little bit into the
- 1:08limitation of vector similarity in general.
- 1:12So that's how I've actually started this project and
- 1:17published this library called Aerospace that is an attempt to
- 1:21make vector search more accessible and more powerful in
- 1:24some sense, especially in the scope of text embeddings.
- 1:29So like vector space, but not just like vector space, but
- 1:34vector space with highly semantical connections.
- 1:41So text embeddings for language, but also like in general any
- 1:46kind of vector space that has an highly component of connectivity
- 1:51between the features in their beddings.
- 1:54And then yeah, I went, I went through with this and I started
- 1:56writing a few papers. Now I am at the 5th paper since
- 2:00October. I wrote two papers last year and
- 2:03three more now, especially the last one, I'm very like happy
- 2:07with that because I draw this connection between this way of
- 2:12doing vector search and what I call graph wiring.
- 2:16That is by basically the generic application of this particular
- 2:20vector search and the way of measuring information that the
- 2:24that is now like being proposed in January, that is called the
- 2:28epiplexity. That is basically a new way of
- 2:34looking into entropy and complexity.
- 2:39So like this, this, this, this, this journey brought me from
- 2:43like vector search, like trying to apply all these tools
- 2:48connected to racks to like some more like interesting, like more
- 2:51like higher level kind of concept.
- 2:53But also like I'm trying now to build a set of tools based based
- 2:58on these foundations. And I think they will be like
- 3:01very, very helpful for everybody doing language model operations,
- 3:07but also like engineer machine learning operations.
- 3:11OK, so first of all, amazing name with Epiplex Cities.
- 3:16Oh, it's not mine. It's it's a paper from from the
- 3:19University of New York and Carnegie Mellon.
- 3:22So they incredibly the, the I, I, I took the, the, all the
- 3:27theoretical part from them and I, I just wired in what I've
- 3:32been working on and the things just like aligned perfectly.
- 3:35So I think we were like on the same wave somehow.
- 3:38We were like, just like surfing in parallel at some point.
- 3:41And in January, my paper on, on like one of my moon shots called
- 3:46the topological Transformers. And this Epipex City paper just
- 3:49came out at almost at the same time.
- 3:51And I would say, oh, look, this is what I'm doing.
- 3:55And yeah, OK, I have a measure for it.
- 3:57Epipex City. Oh, that's great.
- 3:59So what was hard about vector search and what did you do to
- 4:03change it? Vector search has been developed
- 4:07in the ears as as a purely geometrical kind of operation.
- 4:13So you have like I dimensional vectors.
- 4:16You just compute the distance between these two vectors.
- 4:18You use your own like favorite distance metrics that can be
- 4:22cosine, L2 or any other kind of metrics and you got a score out
- 4:26of it, right? So these two vectors are are
- 4:28X&X&Z distant, right? They're like applying this to
- 4:36semantically dense. What I call semantically dense
- 4:40embeddings is that some of the information that then I
- 4:45demonstrated being part of the API Plexity framework basically
- 4:50get lost in the in the folding or in the like reduction of like
- 4:56the vector space into a geometrical space.
- 4:59There is some part of structural information that is encoded in
- 5:03my, in my, in my implementation, in my algorithm by the graph
- 5:09described by the relationship between the features.
- 5:12So you have column vectors, you, you compute the the connection
- 5:15between these column vectors in the vector space and you get
- 5:18this extra that I call topological spectral
- 5:21information. And yeah, it's I went through
- 5:26all these experiments and basically I found out in the end
- 5:29that is demonstrated in the in the last three paper I published
- 5:34that that I hope everybody, I mean, of some people is going to
- 5:39to double check. And so I can, I can get some
- 5:43very good feedback that basically some of some, some
- 5:46piece of information during the bedding process get lost or in
- 5:50like dimensionality reduction or in like, you know, in the way
- 5:54like the the bedding process works by basically computing
- 6:01only on the on the item space and totally forgetting the
- 6:04feature space of the of the data set.
- 6:08And that basically this can be fixed for geometric for for
- 6:13these like geometrical vectors for geometrical embeddings by
- 6:16increasing the number of dimension of the embeddings.
- 6:19So if I started from 300 and the four dimension embeddings.
- 6:23So it's like a usually like a kind of usual denoising out
- 6:27encoder. And I, I, I actually run my test
- 6:31comparing search using like cosine search on this limited
- 6:36space embeddings and outer space, my library in the same
- 6:40space, right? And I and I actually found out
- 6:42that there is some there is some way of doing this search better
- 6:46because there is some some kind of chunk of information called
- 6:51that I call like topological information there get get lost.
- 6:54So applying topological search to the same space I can achieve
- 6:58better. There are different scores for
- 7:02that in general, some kind of better search in in a more like
- 7:08semantically meaningful search. I developed a score for for this
- 7:13that is called the MRR top zero that is basically subtitled the
- 7:19topological page rank. That is a way of measuring these
- 7:21things. So I measured these things in
- 7:24the geometric search and in the outer space search, topological
- 7:27search and I found this gap. Recently I've done the same
- 7:30thing like with larger embeddings.
- 7:32So I've done the result the same thing with a 10/24 dimensional
- 7:36embeddings and what it came out is that ah look, this piece of
- 7:41information that got lost on the 384 out of the noising denoising
- 7:46out encoder is actually preserved by this new way of
- 7:49doing embeddings but with much higher dimension.
- 7:53So basically what was happening is that I could do the same
- 7:56level, the same quality of search of 1024 dimension
- 8:01embedding using the 384 embeddings because Autospace
- 8:06basically rebuild somehow the information that got lost in the
- 8:10bending process through through what epiplexity measured as
- 8:16generated information. So basically I was generating
- 8:19information in the in the in the framework as as it is explained
- 8:24by the framework of epiplexity. I was regenerating the
- 8:27information that was lost by the bending process using my
- 8:32algorithm Autospace. And the outcome is outer space
- 8:38work better in topological terms, both in the 384 and in
- 8:411024 dimension space. So yes.
- 8:44And it allowed basically a 384 space to almost work as a, as a,
- 8:51as a space that that three times the number of dimensions there
- 8:54was like a very like, oh, kind of discovery.
- 8:58So this is fascinating to me because it's almost like you're
- 9:04getting a bit of a cheat code. You're getting this extra
- 9:08dimensionality for free. What are the downsides of it?
- 9:12Because I imagine there's no free lunch.
- 9:15No, absolutely. Yeah.
- 9:19I mean, let's, let's take a step back in the general objective.
- 9:23The general objective was we want a better, more fitter
- 9:29search to apply rags on right? Because retrieval augmented
- 9:33generation depends a lot from searching among documents.
- 9:37So the initial hypothesis was that geometric search found very
- 9:42well the first 345 top ranked documents, but starts to fail
- 9:48very steeply after the 5th document.
- 9:50And that's demonstrated with comparative test.
- 9:54I wrote different blog post about this because that's how it
- 9:58works. It just finds very well the top
- 10:01three for five documents. But then it's performance just
- 10:05like go down steeply for like the tail for the tail of the of
- 10:09the of the ranking. So I said, OK, but retrieval,
- 10:13augmented retrieval and it's something that is maybe as like
- 10:17a better, more a smoother distribution, right?
- 10:20We don't want like to have big performance on the 1st 3 and
- 10:22then OK the rest whatever, whatever, whatever happens with
- 10:26the rest, it's OK, right? No, because like Rag has to
- 10:30maybe walk down different pathways to do some kind of
- 10:32reasoning, get some chain of thought.
- 10:34So you can start with like with the top three ranking results
- 10:38and they have a great like outcome.
- 10:40But then at some point you start looping and you start like get
- 10:43stuck in your local minima because as many query you run on
- 10:47the on the on your documents, you always return the same, the
- 10:50same top 3454. So there's I said there should
- 10:53be a way to actually make this the distribution of the ranking
- 10:57like less like steep and allow the search to to look at the
- 11:04lower ranks. So that if if you got stuck in
- 11:06the top ranks with the top ranks, there is something maybe
- 11:09got in this lock and minima on the top ranks just OK, let's go
- 11:13and look at the lower ranks, right?
- 11:15So that's actually exactly what topological search does.
- 11:19There is these sliders in which you can basically modulate how
- 11:23much geometric search and how much topological search you
- 11:26want. So if you want like, OK, let's
- 11:28start with pure cosine search. OK, slider 100% we look at the
- 11:34top three, top five results. But then maybe you want OK, but
- 11:38let's try to open the the reasoning, right?
- 11:40Let's try to to to look a little bit on the edge of the
- 11:43distribution a little bit. But just look at this tail.
- 11:46What happens if I if I search like less, less popular or less
- 11:50like top ranking results, right? So you can adjust this lighter
- 11:55and you go down to almost like 40% of mix between like 40%
- 12:03consigned search and 60% topological search.
- 12:05And you start having like very good, still very good results.
- 12:09But they somehow give a different point of view or a
- 12:11different like kind of approach to the problem the the top
- 12:15three, top four rank. Right, I like that.
- 12:17And so you can just like tell your LLMS to just through to a
- 12:21simple like MCP server. Oh, let's adjust my search.
- 12:25I mean, I'm, I'm stuck in this loop at this point.
- 12:28Maybe I should adjust my search. OK, let's put this ladder down.
- 12:31Let's go. Let's look more into topological
- 12:34kind of search. And you just like start
- 12:38receiving very still like very highly related, highly
- 12:41meaningful documents for the contest, but different ones,
- 12:45right? So you can restart your chain of
- 12:47thoughts and say, OK, this way, I, I reason this way, this way,
- 12:51I reason this other way. What are the common patterns in
- 12:54these things? And so on.
- 12:56It's a way to let the LLM keep exploring on relevant data.
- 13:00Like that, it's like when you do geometric, you basically go
- 13:04depth first. If you adjust the topology, you
- 13:07start opening the graph and starting to see like more like
- 13:10breadth first, right? Yeah.
- 13:12Now, you mentioned that there's maybe a way to implement this
- 13:16with MCP servers. Have you seen any of the vector
- 13:19stores or vector databases already incorporate these
- 13:23algorithms into it? Would it be at that level of a
- 13:26vector store, or is it something that you add on top of it?
- 13:29Where does it play in the stack? It would be just a different
- 13:33track for for running search. You can have like search
- 13:35geometrical and search topological and you got no,
- 13:39nobody implemented that. I have like some side project
- 13:42trying to do these things like running comparative rugs,
- 13:46installation 1 using traditional geometric vector space, search 1
- 13:53using mixed hybrid topological geometric and things like that.
- 13:59So we'll see the results soon enough.
- 14:01I guess the fact is that geometric search is so well
- 14:04established and so well optimised that obviously is the
- 14:08first way to go for like 90% of A use case, maybe right up to
- 14:13the point you need some very good reasoning or you start
- 14:16having like very complex reasoning.
- 14:17That's the point we are, we are reaching now with drugs, right?
- 14:20So in the last 20 years or so and the last, like even before,
- 14:24right, geometric search was perfectly good because, and it
- 14:28was like I, and it becomes like, I optimize with this like HNSW.
- 14:32Now we have like, so we have like these 7 layers of graphs
- 14:35trying to, to look into like billions of records, right?
- 14:39And it's great. But maybe we need to push these
- 14:42things a little bit more now because we have like more
- 14:45intelligence, a system to, to deal with, right?
- 14:48So that's my that's my point of view.
- 14:52Yeah, so is it? It's basically a.
- 14:57If I'm understanding you correctly, you want to use the
- 15:01tried and true algorithms until you saturate them and then reach
- 15:07for something like this. Basically what I'm trying to do
- 15:11now in, in experimental terms is that I add topological
- 15:14information to the geometric search because in the end it's
- 15:17like it's a way that sum, right? You have like an alpha that is
- 15:20like the the geometric search and you have a beta that is the
- 15:23the topological search component, right?
- 15:26So through, through the aerospace to the library, you
- 15:29can modulate these things until you see that you reach like
- 15:34something better, maybe like just the marginal better that
- 15:37that is just like a marginal 5% of 8% that I demonstrated in,
- 15:41in, in my blog post. But that kicks the, the rags out
- 15:49of his, of his local minimum, maybe right and, and allows him
- 15:53to actually, OK, let's climb up the, the, the local minimum.
- 15:57I, I'm, I'm running around now and let's get in, maybe reach
- 16:01another local minimum. That tells me something
- 16:03meaningful as well, and very much related, but different in a
- 16:07way that I can re elaborate my chain of thoughts in some
- 16:11different way. So it's that razor thin edge
- 16:15because you don't want to introduce too much noise and
- 16:19then have irrelevant data. Comes the fact is the problem
- 16:22with joint similarity is that he has more noise if if it's run
- 16:26like as a pure geometric search, because you just get stuff that
- 16:30is similar geometrically, but not in meaning because there is
- 16:33no semantical kind of structure that tells, oh, this is, this is
- 16:38very, this is geometrically very similar.
- 16:40But maybe it's, it's totally out of context, right?
- 16:42That's why you get like if you run like a geometric search and
- 16:46you and you ask for like the top 50 maybe records, the last 20
- 16:50records are just like garbage documents or the last 2020
- 16:54documents is just like garbage documents, like like gibberish
- 16:57documents because that maybe they just happen to be close in,
- 17:03in the in the geometrical space, but they are semantically
- 17:07totally not relevant to what you are looking for, right?
- 17:10And that's, and that's what topological search fix in the
- 17:121st place plus is allowed a better like a context that there
- 17:20is a ratio that is the diluted is the the ad tailor ratio
- 17:23right? In which like we measure the
- 17:27distance in in terms of semantic, semantic distance
- 17:32between the, the, the AD and the tails with with geometric
- 17:37similarity. This, this is always unbalance.
- 17:40Like the ad that tells you are are about something and the
- 17:43tails are about something else. With topological search this
- 17:47thing is a balance. So the add in the tails that
- 17:49talk to the same semantic space because we inject like semantic
- 17:54information in the in the search.
- 17:57Now how does this play into memory?
- 18:01Because I know you've been going down the memory for agents route
- 18:08quite deeply also. Yeah, basically at some point
- 18:11this became something like, OK, maybe we can do like search a
- 18:15memory in the same structure, in the same data structure, right.
- 18:19Because we we basically generate this this graph out of the bed
- 18:24space. And this graph is a sort of
- 18:26permanent memory of the semantic space because basically it
- 18:30collects the invariance of of this semantic space.
- 18:33So if you have like a bunch of legal documents about some
- 18:36particular kind of or a bunch of philosophical or papers about
- 18:42some kind of philosophical topic, right, you build the the
- 18:48graph Laplacian out of this out of this embedded space of this
- 18:52document and what the graph Laplacian represent.
- 18:56There is like kind of a good kind of background work on this
- 19:02by all the all the researchers that work on Laplacian
- 19:06representation for for vector spaces that basically represent
- 19:10the invariants of this space. So if the text embeddings, if
- 19:13they were, if the vector space is a text embeddings.
- 19:16So basically a reduction of all the all the meaning in in a, in
- 19:21a given field of study, the graph Laplacian automatically
- 19:25it's a representation of its invariants.
- 19:28So you have like that somehow you get some like long term
- 19:31memory There you have like a summary of the summaries of all
- 19:35the documents you have in your vector space, all compressed in
- 19:38a sparse matrix. Basically this part matrix is a
- 19:42very interesting structure. I talked about it extensively in
- 19:46my paper and in my blog post. It has incredible properties and
- 19:50it's heavily used, but in the in the item space of the vector
- 19:55space. So basically, let's build the
- 19:57Laplacian on all the items of this vector space.
- 20:00What Autospace does, it flips the concept.
- 20:04By saying no, we, we, we want to look for invariants in the
- 20:08feature space. So we want to look for
- 20:11relationship between features. What is the relationship between
- 20:14the colour of all these documents, the length of all
- 20:17these documents, the sentiment in all these documents, right.
- 20:21Not just like what is the the relation between the the colour
- 20:24and the sentiment of documents A and documents B?
- 20:28No, we want to look into the graph, the column vectors, the
- 20:32feature. Graph, and you're doing it at a
- 20:33document level, not at a chunking level.
- 20:37Every. That's really depends how you do
- 20:38your embeddings. If you chunk, if you chunk your
- 20:41documents in your embeddings, you will come out with the with
- 20:43the with the banded chunks, right?
- 20:46I usually I started. The example I've used is the CVA
- 20:49data set. That is a data sets of reports
- 20:52of common vulnerabilities in, in in software and systems.
- 20:58And usually these are like large report in in Jason format.
- 21:02So they're just basically text file with a title, a
- 21:04description. I just build my beddings by
- 21:06passing the entire document. But in theory, yeah, if you have
- 21:08like books, you can just like you don't like chunks the into
- 21:15paragraphs at the time of the beddings.
- 21:17And you can do like, yeah, you can just say, OK, then yeah, you
- 21:21have to do the reconstruction, say which chunks belongs to the
- 21:24same book, which chunks belong to the same paragraph, which
- 21:27chunks belong and etcetera. But yeah, this works the same
- 21:30both for documents and chunks. OK.
- 21:32So sorry, I cut you off and derailed you a little bit.
- 21:35You were talking about how it's flipping on it, on its head,
- 21:39looking at the features as opposed to that.
- 21:42And so how can the features tell you information?
- 21:46That's what I'm I can't make the connection on.
- 21:49That's the real semantic metadata that you're looking
- 21:51for. Like when you look into what we,
- 21:54there is like an infinite number of division for metadata, right?
- 21:58But in the knowledge graph space, for example, that you
- 22:01know very well and your your audience knows very well.
- 22:04Obviously what you have is like it's a graph that goes on top of
- 22:09the existing graph. So you have the graph of the
- 22:10nodes, right? And then you have all the the
- 22:13graph of your classes on top of the on top of your graph of the
- 22:17nodes, right? And you call that metadata is is
- 22:20the relationship between class of documents, is the properties
- 22:23that connects documents in a way defined by the class level, by
- 22:28the metadata level, not by the the instance item level.
- 22:32Same thing for vector space. There is a space in the nodes
- 22:36that are that is the space of the documents, the item space.
- 22:39But then there is a space that connects the features because
- 22:43each node as as is is feature vectors.
- 22:46So we said this node is represented.
- 22:50All the nodes of this space are represented by this feature
- 22:52vector for dimension 0, the color or the length.
- 22:58But there is another vector for the dimension 5 that is like the
- 23:03another characteristics of the vector.
- 23:05How these features connects together, So you see that you go
- 23:09to a second order kind of layer, that is that I call it metadata
- 23:12layer because that's exactly what it is conceptually, right?
- 23:15And it turns out that there is information there that can be
- 23:18used for search because you don't only search the node
- 23:22space, you search the feature space, you can search the
- 23:25feature space. And that's what Mathematicia
- 23:28called the topological because this space gives you somehow the
- 23:32third dimension, the Riemann space of the vector space.
- 23:36Basically this is the space of the second derivative of the of
- 23:40the vector space. And that's where a lot of cool
- 23:43stuff is because that's where like all the structural
- 23:46information is found. And that's the structural
- 23:49information out of space injects in your query to find, oh, this
- 23:53very super cool new results or results related to your query
- 23:58that are not geometrically closed, but maybe they follow
- 24:00different pathways down this morphology and and they're still
- 24:05related, but may be forgotten by the geometric search.
- 24:10So you're kind of blowing my mind here that that metadata has
- 24:16any value. Exactly, that's what it was
- 24:19forgotten. Basically, it was like left
- 24:21there like an archaeological relic with no use right.
- 24:25And no, it has so that I found this like last year as well
- 24:28myself. And he was like, Mark, come on,
- 24:30this is not possible that nobody looked into this thing before.
- 24:34And they said, OK, let's try. I mean, I, I have, I mean, I'm
- 24:39looking, I'm actually taking this, this time to, to walk down
- 24:43this, this rag vector space kind of problems.
- 24:48And, and that's true. That's, it's there.
- 24:50And through the aplexity framework, I, I measured it like
- 24:55last month, I ended up measuring what was missing by, by the
- 24:59geometric search. And it's, it's what is called
- 25:04structural information by the perplexity framework.
- 25:07And it's measurable. It's almost like 2030% of the
- 25:11total information. So every time we, we run a
- 25:13search on the geometric search, we basically lost 2050, 2015,
- 25:1720% of the information we could have used that is there.
- 25:21But we, we do the, we didn't regenerate because we didn't
- 25:24rebuild the graph Laplacian. And this is mathematically solid
- 25:30as far as I could like investigate.
- 25:33And I'm very, very, I would be very, very helpful to anybody
- 25:36that will look into this to tell me, no, you're, you're not
- 25:39right. I would be like the, the
- 25:41happiest person if somebody founds the found some fault in
- 25:44this reasoning. But at this point, it looks like
- 25:48it works because I have run like 10s of experiments.
- 25:52I have run 10s of in different settings like again like
- 25:55shrinking or increasing the number of dimensions of the
- 25:58embeddings and I hope I hope to be right.
- 26:03So that's where you're getting these dense vectors for free,
- 26:10basically. Yeah, we're getting information
- 26:12out of the same dense vector space because we weren't looking
- 26:15in the feature space before. Yeah, OK.
- 26:18I'm, I'm starting to wrap my head around it.
- 26:21And then the epiplexity, you should probably breakdown what
- 26:24that paper is and what your paper was, because I know you're
- 26:28referencing it quite a bit, but I'm not super clear on exactly
- 26:32what it was. I think nobody is because it's
- 26:34such a new thing and I, I guess they have only one citation for
- 26:40now in, in scholar, in Google Scholar, because it's such a new
- 26:44thing. So I, I, I, I don't know if I
- 26:46cannot really. Maybe you can, you can actually
- 26:49ask as a guest the people that wrote the paper.
- 26:54But my, my basic understanding is that basically what is
- 26:58Shannon information measure is what is what they called the
- 27:02random entropy. But they said look if you in
- 27:06general terms, like if the universe was a vector space, you
- 27:10will have like you will, you will witness like Shannon
- 27:13entropies. But they say look, but everybody
- 27:17that computes something is not like is doesn't look at the
- 27:20entire universe. It looks only at the problems
- 27:23that are in his computing capacity.
- 27:27So if I can compute up to certain level of for for up to a
- 27:32certain time with a certain amount of computing power I can
- 27:36reach, I can compute this this number of algorithms, right?
- 27:42It is true that there are infinite algorithm out there and
- 27:45they all like are under the law of of entropy.
- 27:49But if I actually limit the, the investigation of only which
- 27:56algorithms we can compute that is related to what Wolfram call
- 28:02computational boundedness, I can I, I guess it is so is that we,
- 28:10we can actually measure random entropy, but also something else
- 28:14called structural information and epiplexity is basically both
- 28:18of these thing instead of just looking at a random, a random
- 28:22entropy, it looks both like bounding the the possible
- 28:28computation, but to the observer to to the person that runs the
- 28:31computation and to it's like computational power.
- 28:35We can also highlight and measure this other thing called
- 28:40structural information. So and in this like in this like
- 28:46framework, the graph Laplacian in my outer space algorithm will
- 28:50be the structural information part, while geometric search
- 28:54deals only with like this very wide generic kind universal kind
- 28:58of construct that is like the geometric space of of of the
- 29:01vectors. OK, so I got this far in
- 29:05understanding it. Your epiplexity is constraining
- 29:10the space that you work with. Exactly because like, like it in
- 29:14in physics, right? In, in, in, in modern, not, not
- 29:17modern, but like in contemporary physics, you know something only
- 29:22because you go and observe it, right?
- 29:23So everything you see is limited by by by your detector.
- 29:28So your eyes or you're like Andron Collider, right.
- 29:31So anything is dependent of those server.
- 29:34So if you actually does the same thing for information, you say
- 29:36look, we cannot just like it's it's more like what like
- 29:40relativistics physics does, right?
- 29:42We don't look at the entire universe.
- 29:43We look at the at the frame of reference.
- 29:45So we have two bodies, they move at relative speeds to each other
- 29:50and what happens depends on which observer you pick on and
- 29:54how fast this observer is going in relation to the speed of
- 29:59light, right. It actually, it actually does
- 30:01the same apply the same thing to information saying look, you
- 30:04cannot compute like the entropy of of the universe.
- 30:07Yeah, you can, but it's not like a rule that applies to it, maybe
- 30:11not the rule that do not apply to every observer in the
- 30:14universe, because there are observer that go faster and the
- 30:16observer that goes lower, right. So the same thing there are
- 30:19observer that have a vast capacity for computing and there
- 30:26are others that are like limited in terms of computing.
- 30:29So for for for the observer, for one observer, it may happen
- 30:33that's a problem is uncomputable.
- 30:35What for another observer, it may happen that it is computable
- 30:37because he has he has access to to more computing power and
- 30:41maybe you can run the algorithm for more time because he lives
- 30:44longer or because like whatever other reason, right?
- 30:47And so if it actually try to bound every algorithm inside the
- 30:52what is called the A model, I don't know.
- 30:59I don't want to get too much in the day like a random work
- 31:02model, that is, that is bound to the observer.
- 31:05So you do this operation, you take the algorithm, you
- 31:07encapsulate this algorithm inside a random worker that is
- 31:11observer bounded. And then you compute the
- 31:15structural information that is generated by this bounded class
- 31:18between the observer and the and the algorithm.
- 31:22It's very, very, it is greatly interesting to me.
- 31:25So I hope it is forever. When you bind it, then you're
- 31:29able to get a score on what the. If you want we we can actually,
- 31:34we can actually take a look into into a ju Python notebook that I
- 31:37wrote exactly to explain this point in my in my last paper if
- 31:41you want if we have time. Busted out, Yeah, I would love.
- 31:44That OK, I wish I will share it. No problem.
- 31:46So basically this is the paper and everybody can can go take a
- 31:50look at it. But if we if we scroll here on
- 31:54the left, can you see it? Yes, there is like the notebooks
- 31:58directory and there is like this 00 in this notebook.
- 32:03Basically I try to to explain to myself what epiplexity is and
- 32:07how it relates to my to my research and is the and is the
- 32:12object of my of my latest paper. As you see, outer space feature
- 32:17space graph Laplacian is structural information.
- 32:19So the, the question was, is it true that that aerospace graph
- 32:24Laplacian encodes like encapsulate structural
- 32:28information as described by the by epiplexity, right.
- 32:31That's the main question. And if we go through all the all
- 32:36the steps of these notebooks, it will find that yes.
- 32:38But very briefly, to know like just what Epiplexity measures,
- 32:44we can just take a look to like this, these two, these two or
- 32:51three first steps. Basically what it does first, it
- 32:54computes the minimum length program to compute the graph
- 32:58Laplacian from the from the vector space.
- 33:02It's a, it's a, it's a measure of what is the minimal set of
- 33:07bits that transform A vector space into a graph Laplacian.
- 33:10Basically, it's a Kolmogorov measure for complexity.
- 33:14It's Kolmogorov's measures for complexity, right?
- 33:17So what is the minimal set of bits that maps my vector space
- 33:21to the graph Laplacian? And that's the first part to
- 33:23compute the playback city, the second one exactly.
- 33:28And this year, the outer space pipeline as a prefix free
- 33:31program, right? You want to compute the length
- 33:35of the outer space program. So yeah, there is like it's a
- 33:40mathematical construct that does this thing.
- 33:43So what is the minimal number of bits to describe this problem,
- 33:46this program basically. And that's the first step.
- 33:50This is all described in the Apriplexity paper published the
- 33:536th of January. You can go and look into that.
- 33:56The second step is is the is the is the wrapping.
- 33:58I was telling you before, because we we have to make the
- 34:02Laplacian of this vector space into a Laplacian constraints
- 34:07Gaussian Markov random field that that's it.
- 34:11It's already, I have probably already with the acronym myself,
- 34:13but I tried to went through these things like line by line
- 34:16and try to understand it. So we do these things, we
- 34:19basically encapsulate these this system between the observer and
- 34:23the and the algorithm inside this this shell of of Markov
- 34:27chain of Markov chain model, right?
- 34:30Yep. And in the end, we run a test
- 34:35how much these things, they compose the original space and
- 34:38compress the original space. Because yeah, basically from the
- 34:43paper you can actually extract there are three tests that tells
- 34:47you your epiplexity measure is correct.
- 34:51Here they are. One is the compression test, 1
- 34:53is the spectral gap test, 1 is the downstream lift test.
- 34:57If all these three tests passes you are measuring, your
- 35:02algorithm can be measured in terms of Apiplexity and.
- 35:06Apiplexity, just so I'm clear, is giving you more information
- 35:14on the randomness that you're getting from aerospace.
- 35:18It's totally different from entropy.
- 35:22Apiplexity basically adopts traditional information theory
- 35:25to what we discovered with machine learning and neural
- 35:28networks, right? Like traditional information
- 35:32theory told you that you cannot extract more information that is
- 35:35in the data because the, the, the, it's just not there, not
- 35:38there, right? So it tells you that whatever
- 35:41you do with the data, you will get entropy, you will lose the
- 35:43information, right? But we demonstrate that is not
- 35:46true because we have algorithm now that they do generate
- 35:50information out of out of the vectors out of data in general
- 35:55generating new structures. And this comes back to the whole
- 35:58idea of, hey, if we look at the metadata and we find trends in
- 36:02that, that actually gives us a denser vector.
- 36:05Exactly. We, we will get the information
- 36:07that is not in the vector space. So epipaxy they basically
- 36:10demonstrate that we can generate additional information from
- 36:14existing information. So that not is not, is not that
- 36:18every, every data space, every data set is just like whatever
- 36:25you do with it, you will going to lose the information you have
- 36:28because you're going to compress it.
- 36:29You lose information, you're going to the composite, you're
- 36:31losing from information. Say no, look, now we have
- 36:34algorithms that if you, if you take a bounded observer to the
- 36:37algorithm, you can measure that these things generate
- 36:40information that it's just like, just like a thermal loss.
- 36:44There is not just like randomness taking over.
- 36:47You can actually do the this is connected to to me what is what
- 36:52are called the inverse problems, right?
- 36:55When you have like a noise image and you want to denoise them,
- 37:00this this is called an inverse problem.
- 37:02You are generating information that is not there by looking at
- 37:05the relation of the pixel. You can generate but non
- 37:08generate, but you can extract information that is hidden there
- 37:12by using algorithms, right? That's the same principle.
- 37:15Whenever you do denoising, you generate information out of
- 37:18something that is not supposed to have that information.
- 37:20So when you do like super resolution, for example of
- 37:23images, you are doing this thing right, you go from 200720P to
- 37:3010/24. PS right you, you, you super,
- 37:34you apply super resolution to to the image.
- 37:38And that's exactly what Epiplexity measures.
- 37:40It measure how much information is generated by the algorithm.
- 37:44No, how much information is consumed by the algorithm.
- 37:48And they demonstrated the mathematically, I mean, it's
- 37:51very, it's a very young obviously framework.
- 37:53So it's not as established. And it needs to be like double
- 37:57check and tested. And I guess this is the first
- 38:00algorithm that test itself against epipexity.
- 38:04So Autospace is the first algorithm that on top of which I
- 38:10computed, we computed information generation, the
- 38:15amount of information generated by, by the, by the computation
- 38:19computational process. Yeah.
- 38:23And that's, that's something that say, oh wow, I connect to
- 38:26some dots and that's, and that was the thing.
- 38:30And that's actually, that's the very latest thing.
- 38:32But if you look back to my previous papers, that is the
- 38:36work the the stepwise a stair stairway that brings you from a
- 38:43simple like search in a vector space kind of algorithm to a
- 38:49more general algorithm. Because at this point, as as it
- 38:53is in the in the abstract, basically outer space is generic
- 38:59enough to provide. I mean, graph Laplacian applied
- 39:02by outer space in the feature space is generic enough to
- 39:05provide a good approximation or in good results for searching
- 39:11classification and only detection, diffusion,
- 39:14dimensionality reduction and that evaluation, all these
- 39:18obviously my idea is that OK, but this is super cool.
- 39:21We, we need to use this for like for LLMS and and machine
- 39:25learning operation, right? Because once you have that
- 39:27evaluation, you have classification, you have search,
- 39:31you have a new set of tools that you can, that you can implement
- 39:34with this, right? And that's what the graph wiring
- 39:37is about. What do we do with this super
- 39:41nice, super new, cool tools provided by Applexity to
- 39:45actually supervise, manage, curate data sets for machine
- 39:50learning operations and large language model operation?
- 39:54And and you got some answers about this, but my the paper
- 40:00that that deals about applications.
- 40:03A machine learning application and largely whatever is the
- 40:05previous one it talk that talks very extensively how these tools
- 40:09can be used for in the in AI OPS or ML OPS pipelines.
- 40:16Well, it does feel like you're doing this with data sets after
- 40:21the model has been created. Have you also thought about
- 40:24trying to go for the data sets that the models are being
- 40:29created on? You mean the the bending model?
- 40:32Yeah. So the training data.
- 40:35Yeah, exactly. These things, there is a big
- 40:38question marks in whatever we do with LLMS currently because
- 40:44everything is connected to how we do embeddings.
- 40:46That's why that's why it's very important to, and there is like,
- 40:51there are now like teams and teams of engineers working only
- 40:54on how do we move from raw text to embeddings, right?
- 40:58It's, it's a field on its own. We have models with 4 billion
- 41:00parameters only doing this at the moment.
- 41:03So that's one, one thing if we go instead of the, you know, on
- 41:06the numerical side and we said, let's look into pure numerical
- 41:12data, right? Machine learning data
- 41:13regressions, trees, decision trees and all that stuff we
- 41:18find. I found out, I mean, or my
- 41:20intuition is that it really, really matters how we do Fisher
- 41:25engineering because from let's say we have like this mass
- 41:29amount of raw data like coming from the large andrum Collider
- 41:33or whatever other big machinery for physics or for like any
- 41:36other kind of measurement you have, right?
- 41:39Obviously you don't run your machine learning models on your
- 41:42the totality of this data. We are talking about thousands
- 41:46of terabytes, right? So what you do, you do some
- 41:49Fisher engineering. So you run some models to reduce
- 41:52your data into some manageable workable.
- 41:54This, this is the same thing. It happens with satellite data,
- 41:57right? The image you see on your screen
- 42:00from the satellite, it's just like a model of all the raw data
- 42:05that the, that the satellite collects and, and, and push down
- 42:08to Earth, right? So it's really important how the
- 42:12people at NASA, at ESA or whatever else, they, how they
- 42:15model these, these algorithms to actually make this, they make
- 42:20this data usable. My intuition is that if we try
- 42:25to embed in, in some way or in a better way, we do now the
- 42:30features relations, while we do feature engineering for, for
- 42:34this data, we may have more powerful topological search
- 42:38downstream. So as your question is really
- 42:41relevant because it really matters how you treat the data
- 42:44upstream. So but having, having having the
- 42:48outer space, you can indeed measure how much structure and
- 42:52information your feature engineering generates.
- 42:55So you can compare if I generate these data sets using this
- 42:59model, it it produce downstream 0 point something a perplexity,
- 43:06right? Structure structural
- 43:09information. What happens if the same data
- 43:11we, I use a different feature engineering model and I compare
- 43:16this, oh, look, this generate 1% more structural information.
- 43:21You see that these things can work upstream and downstream
- 43:24because my idea in the beginning started from, OK, let's apply
- 43:28this to performances, large language model performances,
- 43:33right? We can say, let's take the the
- 43:37latent space and just like compute the Laplacian, the graph
- 43:40Laplacian on the latent space, that that's that's what Ethan
- 43:44Tropic they call, I guess, machinistic analysis.
- 43:47So they go and and just like investigate, analyse the latent
- 43:51space to find where the the best tokens are generated in which
- 43:54subspace. That's exactly what you can do
- 43:57with with the graph Laplacian. That's downstream.
- 43:59But upstream, you can do what we were talking before, like let's
- 44:03measure which best, which model does best feature engineering.
- 44:08So you see that this is like pretty much like a quite kind of
- 44:12effective point of view in terms of what we can do with the data,
- 44:17how good is the data, how this data set will go if I had
- 44:20something, what, how, how will this data set look like in six
- 44:27months for now and things like that.
- 44:30Coming back around, I'm not sure I fully understood how this
- 44:34connects to memory with agents. OK that the graph Laplacian is a
- 44:42permanent memory in the sense that he holds the he tells the
- 44:46invariants of the of your context.
- 44:49So basically it it tells you which pathways are possible from
- 44:55one feature to another. I mean mathematician described
- 45:01this thing as a three-dimensional space.
- 45:03So for example, if you have like outliers in your in your feature
- 45:08space, these outliers will be denoted with very high energy.
- 45:13If you have like very connected kind of features, this feature
- 45:17are denoted with the very low energy, right?
- 45:20So and the graph applies and basically describes all the part
- 45:25that you can take from a very connected feature to a loosely
- 45:31connected features. So it basically it basically
- 45:34constrained the way you can do reasoning somehow inside, inside
- 45:38the inside the the feature space of the of the vector space.
- 45:44OK, but we're not talking about agents remembering in the way
- 45:48that it's like, oh, the agent understands that you like only
- 45:54vegetarian food or? No, it's not about, yeah,
- 45:57remembering scenes, what they're called scenes or what they're
- 46:00called. Like they have different names
- 46:02for that, right? It's not, it's not about that.
- 46:05It's a different kind of memory, more like permanent long term
- 46:07memory of a given context. But it can also be applied to
- 46:13those because then if you have like a list of scene, a little
- 46:17scenes that that your rags remember, you can do the same
- 46:20thing because that's a vector space itself, right?
- 46:22So you can, you can even bad things of this, of this, like
- 46:25context memory. I don't know how you call it.
- 46:27I don't remember how they call it and then do the same
- 46:30operation on the context. So you can actually build your
- 46:33memory and memories of your context, right?
- 46:36That's, but that's a different kind of memory.
- 46:37Indeed. It's not like this is more like
- 46:40I I think they called it transient memory or something
- 46:44like that. What, what the, what the vector,
- 46:47what the graph Laplacians describe or define is the long
- 46:51term permanent relationships inside a context of documents
- 46:56that if you know it, it's a memory, right?
- 46:58Because that's exactly what you want to remember.
- 47:01If if you are an expert of that field somehow you want to
- 47:05remember the invariants somehow and then connects your
- 47:07invariants to to your to your application, or at least that
- 47:11that's that's how I see the the the process itself.
- 47:16Can you talk to me in a minute about this idea that you follow
- 47:22on the discovery driven development?
- 47:26Because I think that's also pretty fascinating on
- 47:29understanding a little bit more on how you work and how you go
- 47:33through and test some of these ideas.
- 47:35Absolutely, yes. Thanks for the question.
- 47:37Because that's I guess we have talked about the content and I
- 47:42think the content may be interesting to people and I hope
- 47:45so. But yeah, I mean going through
- 47:48this, I also understood a lot about what I'm really doing here
- 47:53like what what is my method right for, for doing this thing.
- 47:57And my method is mostly based on intuition, like every based on
- 48:01intuition that was great with large language models because
- 48:05that's what large language model lack.
- 48:07They don't have an understanding of the word that allows them to
- 48:10be intuitive, right? Because they are constrained by
- 48:15being, by their way of seeing the word, right?
- 48:18They only see the word through language, through text.
- 48:22So they cannot build the level of intuition that humans can do
- 48:25because we have so many more senses, right?
- 48:27So what I do is basically I try to leverage this very intuitive
- 48:30part of of what I do. And I try to to inject this
- 48:34intuition into into, into the process of multi agent kind of
- 48:42research processes, right? So I work with different LLMS in
- 48:47parallel and I just try to collect the thing that they do,
- 48:51right? And that's just like try to
- 48:53inject my intuition to correct what made I think that when I
- 48:58think they're going a little bit out of the scope of what I'm
- 49:00doing, right. So, yeah.
- 49:03And this connects greatly with what happens in the meanwhile in
- 49:07the in in scientific research, because in the meanwhile, we
- 49:10have all these new papers published at at the level that
- 49:14we have never seen before, right.
- 49:15So you cannot really work in your own like lock down kind of
- 49:22understanding of things. You always need to update this
- 49:25understanding of things. Very Bayesian.
- 49:27If if you if you, if you want, Right.
- 49:28Yeah, it's Bayesian in the process, but also into listening
- 49:33to what happens outside. And so actually when I found the
- 49:37paper that connects, I instantly try to build new intuition of of
- 49:42what I'm doing based on this new paper.
- 49:44This happens with the Applexity paper and it's it is happened
- 49:49also with another paper that was greatly impactful on me.
- 49:54But that's a really long, another really long talk that
- 49:59that I don't want. I mean, I, I think maybe you
- 50:01don't have the time to start, but yeah, that's the that's the
- 50:03process, right? You have your own Bayesian
- 50:04process that goes on with your multi agent things.
- 50:08But sometimes something from outside happens that is very
- 50:12meaningful to what you're doing. And you cannot just keep going
- 50:15on without including what what has happened at the in the
- 50:18meanwhile, right? I said, OK, I'm, I build outer
- 50:21space. I build what I call like this
- 50:24super crisis experiments called the topological transformer.
- 50:26There's a transformer architecture that works on
- 50:29spectral indexing, like in topological search instead of
- 50:32geometric search. That is very like kind of my my
- 50:34moon shot. That is just like something I'm
- 50:37not following at the moment. But that in experiment that I
- 50:40did, I say, OK, but what what happens if if I look at
- 50:46autospace in the framework of Applexity and and all this new
- 50:51stuff came out right. So you can see how the method
- 50:55somehow being so open to the outside, like putting in in
- 51:00question, like asking question from things that comes from
- 51:04outside what you're doing. It's fundamental because it
- 51:07allows you to to stay in touch with what's happening outside
- 51:12and to improve very much what you're doing.
- 51:15Yeah, it's a kind of scientific science driven kind of
- 51:19development somehow in this sense.
- 51:22And how do you go about updating these frames of references?
- 51:27Because I'm assuming you're constantly reading new papers,
- 51:30you're constantly trying to build new intuition, but it
- 51:36sounds like it's only occasionally that something will
- 51:38hit. I have.
- 51:40I have GitHub repos that are only text files with the with
- 51:44the things like text that I've built using large language
- 51:48model. I said OK this is good.
- 51:50I put this in a text file. Inside this GitHub repository.
- 51:54I have a file system that basically builds day by day on
- 51:58top of this thing, and I have a bunch of text file that I didn't
- 52:02open anymore, but they're still there.
- 52:05But maybe there are like those 3 or 4 text files for each
- 52:09directory that instead branched out into something else, right?
- 52:13So I mean, I could go through to the entire history of what I'd
- 52:17done because I have the entire file system of what I'd done
- 52:20since like March last year. And yeah, and this contains the
- 52:26prompts and the answers. So in theory, if you want to do
- 52:31a meta research of what I'm doing, things that I have no
- 52:34time of doing at the moment because of this, all the other
- 52:38things I, I'm trying to carry on, I could actually do some
- 52:41kind of which prompt worked best or which answer was the most
- 52:45impactful in, in what I've done like in the, in the months
- 52:51after, right. And all these kind of things.
- 52:53Yeah, but it's just like basic prompt engineering prompt prompt
- 52:55detecting, I guess. It's not.
- 52:57It's nothing very anything. Very, very super fun.
- 53:00There was one spicy question that I wanted to ask you.
- 53:04If you inevitably have tried to play with vector search versus
- 53:11just the giving an agent a tool, especially like a coding agent,
- 53:15just being like, hey, grip and seeing what the differences are
- 53:19in that. How do you compare those two
- 53:23when you think to reach for one versus the other, if at all?
- 53:30Yeah, basically what GRUB does is what is called lexical
- 53:33search, right? That is also what BM25 does.
- 53:36It basically just count the instances of the how many times
- 53:41the word or the concept of the How is it called or the OR the
- 53:46seed of the word is present, right?
- 53:49That's called lexical search. That is part of geometric
- 53:51search. Now you have all of this like
- 53:54wave of ebrid search in the sense that they mix geometric
- 53:57search with lexical search, right?
- 53:59So what you're doing is to like geometric search because you
- 54:02define your in the geometric search, you define your context
- 54:05by distance among vectors. In the lexical search, you do a
- 54:10more, more like statistical kind of things.
- 54:12You count basically the statistical characteristics of
- 54:17the words in the context. That is a pretty well good way
- 54:21of establishing A context because the kind of words, the
- 54:25the class of words, the families of words that you have in the in
- 54:29a, in in a text is it's context like the definition, somehow the
- 54:33definition of context. The problem is how you, you, you
- 54:37measure these distances. So like, OK, you have like this,
- 54:40this word appears 50 times in, in 1000 words, right?
- 54:47Does it mean that that this word defines this context, right?
- 54:51So you do OK, let's add some geometric search, some like
- 54:54distance cosine L2 search to this.
- 54:58And with these two things, you can tell us better which context
- 55:01belongs that documents belongs to.
- 55:04But then you go back to to the original problem of like running
- 55:10vector search, geometric search on on that on that vectors you
- 55:14build, right. So you go back that you lose all
- 55:17the semantic semantical part that the features analysis
- 55:22brings in. So yeah, that that's, that's
- 55:26lexical search, but that's lexical analysis.
- 55:28Yes, yes. Thorenzo, this has been great
- 55:31man. I appreciate you coming on here.
- 55:34Thanks a lot, Demetrius. Thanks a lot for what you do in
- 55:37the community and it's great to have people that can work so
- 55:40well, like building up communities and, and, and
- 55:44products. So it has been great talking to
- 55:47you.