You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before doing fancy decentralised machine learning, learn-to-rank; first have stability, semantic search, and classical algorithms deployed. Current Dev team focus: #3868
I have taken to understanding the work done by Martijn on ticket 42. I read through it and downloaded the code attached.
The last version of the code had a couple of functions not yet implemented so I reverted to the 22-06-2022 version (instead of the last version uploaded on 27-06-2022).
The 22-06-2022 had a few outdated functions and small bugs as well here and there, but since they were small I was able to solve them.
I have downloaded the required dataset and then successfully run the parser and scenario_creating functions implemented by Martijn. After that I ran the experiment itself based on the above-mentioned scenario, resulting in a couple of csv's and graphs.
I understand the general idea of the experiments and how they work, however the code still eludes me since it's not commented to a significant amount.
Here's an example of the graph of an experiment run with Martijn's code so far:
Re-read papers regarding learn-to-rank and learned how to use the IPV8. With it I created an algorithm which simulates a number of nodes and sends messages to one another. From here I worked with Marcel and started implementing a system whereby one node sends a query to the swarm and then receives recommendations of content back from it. The progress is detailed in ticket 7290.
The idea at the moment is that we implement a version of Mixture-of-Experts (https://arxiv.org/pdf/2002.04013.pdf) whereby one node sends the query to other nodes which are nearby and receives recommendations. These are then aggregated to create a shortened and sorted list of recommendations for the querying node.
There are 2 design choices:
We could send the query-doc_inferior-doc_superior around as gossip or we (as we do at the moment) send the updates around every run. We'll look deeper into these ideas.
One issue discovered was regarding the size of the IPV8 network packet which is currently smaller than the entire model serialized with Pytorch, Marcel is currently working on that. We have 720k weights at the moment, and the maximum network packet size for IPV8 is 2.7MB so we have to fit in as many weight updates as possible.
You can see a demonstration of the prototype below:
I'm currently working on how to aggregate the recommendations of the swarm (for example, what happens if the recommendations of each node which received the query are entirely different). My branch on Marcel's repository: https://github.com/mg98/p2p-ol2r/tree/petrus-branch
It's beyond amazing what you acomplished in 6 weeks after starting your phd. 🦄 🦄 🦄
Is the lab now All-In on Distributed AI? 🎲
Can we upgrade to transformers? That is the cardinal question for scientific output. We had Distributed AI in unusable form deployed already in 2012 within our Tribler network. Doing model updates is too complex compared to simple starting with sending training triplets around in a IPv8 community. The key is simplicity, ease of deployment, correctness, and ease of debugging. Nobody has a self-organising live AI with lifelong learning, as you have today in embryonic form. We even removed our deployed clicklog code in 2015 because it was not good enough. Options:
do science-only prototype, see results, try with 1 million items, such as: arxiv 1 million articles. Do a workshop paper, get a nice phd thesis chapter(s).
production-level coding. Get to deployment as-fast-as-possible. Efficiency, storage, and bandwidth cost need to be only compared to the current filename matching. So comparing classic syntactic search with most simple possible semantic search. The different will be gigantic! Anything "simple intelligent" is better than dumb literal keyword query matching.
Science breakthrough. Get the transformers to decentralise. First do a bit of the above, but go beyond current state-of-the-art
For simplicity, use NanoGPT that our student also got operational. Simple, easy to upgrade, light on resources, but still amazing power with just some Shakespeare dataset training.
Privacy and security: adverserial search are future work or do simple weighted MeritRank for mixture of expert gating function. Selected a few experts/nodes as "guard nodes", like TOR does for privacy and security.
For a Youtube alternative smartphone app we have a single simple network primitive : Query, content-item-clicked, content-item-NOT-clicked, clicked-item-popularity,signature and in TikTok form without queries and added viewing attention time: content-item-long-attention, long-attention-time, content-item-low-attention, low-attention-time, long-attention-item-popularity,signature. Usable for content discovery, cold starts, content recommendation, and obviously semantic search.
Next sprint goal: get a performance graph!
We need to get a paper on this soon, because the field is moving at lightning speed. So up and running before X-Mas, Tribler test deployment, and usage of NanoGPT in Jan, paper in Feb 🚀
After looking into what datasets we could use for training a hypothetical model, I found ORCAS which consists of almost 20 million queries and the relevant website link given the query. It is compiled by Microsoft and it represents searches made on Bing in a period of a few months (with a few caveats to preserve privacy, such as showing only queries which have been searched a number of times and not showing a user_ID and stuff like that).
The data seems good, but the fact that we have links instead of titles of documents made it impossible to use the triplet model we have right now (where we need to calculate the 768 dimension embedding of the title of the document: since we don't have a document-title and only a link we cannot do that).
So I was looking for another model architecture to be usable in our predicament and I found Transformer Memory as a Differentiable Search Index. The paper argues that instead of using a dual-encoder method (where we encode the query and the document on the same space and then find the document which is nearest neighbour to the query) we can use the differentiable-search-index (DSI), where we have a neural network map directly the query to the document. The paper presents a number of methods to achieve this but the easiest one to implement for me at this time was to simply assign each document one number, have the output layer of the network be composed of the same number of neutrons as the number of documents and make the network essentially assign probabilities to each document, given a query. Additionally, the paper performs this work with a Transformer architecture, raising the possibility of us integrating Nanogpt into the future architecture.
I got to implement an intermediary version of the network whereby the same encoder that Marcel used (the allenai/specter language model) encodes a query and the output is the probability for each document individually. The rest of the architecture is left unmodified:
layers = [
('lin1', nn.Linear(768, 256)), # encoded query, 768 dimensions
('relu1', nn.ReLU()),
('lin2', nn.Linear(256, 256)),
('relu2', nn.ReLU()),
('lin3', nn.Linear(256, 256)),
('relu3', nn.ReLU()),
('lin4', nn.Linear(256, number_of_documents)), # output probabilities
]
In my preliminary tests so far, when we have 884 documents (i.e. 884 output neurons) we can perform 50 searches in 4 seconds (so about one search per 0.08 seconds). When we have 1066561 documents, 50 searches get completed in 200 seconds (one search per 4 seconds). Under some circumstances this may be acceptable for Tribler users but people with older computers might experience significant difficulties. I will need to look at ways of reducing the computation time required.
Moving forward, I'm looking to finally implement a good number of peers in a network that send each other the query and answer (from ORCAS) and get the model to train.
Problem: decentralised learn-to-rank with full scalability
Rush Paper. Maximise personal development within phd&learning speed, be the first workshop-level paper, 5 Jan 2024 deadline: https://www.wis.ewi.tudelft.nl/dbml2024
{future sprint} Strategy for item-not-clicked? Use simply another item in top-K. Can we use co-occurence (same query, different docs) to find a non-click substitute?
add some database angle for workshop scope: also run these queries with Postgress and see how fast it is in classical methodology.
I got the T5 LLM to generate the ID's of ORCAS documents.
Current Setup:
From entire dataset, I took 100 documents which have around 600 queries associated with them each, yielding around 60k query-document pairs. No query-document pair appears more than once.
I split the dataset into train/test with a split factor of 50%
Two agents read the same data from the disk, initially the train set
They send each other sequentially every row of the data (which at this point looks like [query, doc_id] )
They train on the message received but not the one sent (as they both have the same data I'm avoiding training on the same data twice)
The model predicts the doc_id given a query
After all train_dataset has been iterated through, I count this as an epoch and I iterate through it all over again. I count the number of times the doc_id was guessed by the model and this is how I calculated accuracy
After each 'epoch', if accuracy on train set reaches >=90% I saved the model and tokenizer
Training took about 12 hours
Then I calculate accuracy on the test set using the same method (but without training on the new data)
This way, accuracy on the test set was found to be 93%, proving that the model has a high potential to generalize
I was looking for what to do moving forward.
I found a paper survey on the use of LLM's in the context of information retrieval. It was very informational, there's a LOT of research in this area at the moment. Made a list of 23 papers which were referenced there that I'm planning to go through at an accelerated pace. At the moment I'm still wondering what to do next to make the work I've already performed publishable by the conference on the 5'th of Jan.
10 users, produce first loss graph, recall results, or something performance graph
Determine storyline: "decentral Google?" Write the first 2-page of experiment and goal text. No intro or related work yet.
update
Please try to think a bit already about the next step/article idea for upcoming summer 🌞 🍹 ? Can you think of something where users donate their GPU to Tribler and get a boost in their MeritRank as a reward 🥇 ➕ the Marcel angle of "active learning" by donating perfect metadata. Obviously we need the ClickLog deployment and crawling deployed first.
In the past weeks I've managed to introduce 10 users who send each other query-doc_id pairs.
The mechanism implemented is the following:
a number of 100 documents per available peer is selected from the entire ORCAS dataset from the beginning to act as the actual dataset
from this, the new dataset is split into train/test datasets, keeping the ratio of each document in the dataset equal (so if there are 20 queries for a document, 10 will be in the train set and 10 in the test set). I've hardcoded that no documents appear which have only 1 query associated with them, meaning they would have appeared only on the train or test sets. The test set is excluded from training, only the data from the train set is sampled in the training process;
from the documents available, each peer samples a random number between 80 and 120 documents that act as the peers own dataset. Peers may sample documents which have already been sampled by somebody else. In total for the experiment with 10 peers, 661 documents were sampled by at least 1 peer out of 1000 (100 docs per peer * 10 peers);
each peer initiates its own T5 model (small version) and sets it to train mode;
training is now performed in batches of 32. Each peer has a list (corresponding to the batch-data) containing the query and another list containing the doc_id. When the list reaches 32 items, the peer trains its model on the data from those 2 lists and then resets them;
every 0.1 seconds, each peer selects a random query-doc_id pair from its own dataset and sends it to another random peer, but does not append to its own current_batch_list. This is done to not agglomerate the training with a peers own data more than the data of the other peers. So each peer appends data (equal to 32 / nbr_of_peers_currently_identified) to its own batch_list when the it is empty. This way we can more or less control that the data fed into the model of each peer is approximately equal probability to come from any peer in the network, including the current peer;
I've tried experiments with 2, 10, 32 peers so far. The experiments with 2 and 10 peers have performed well. For the case with 10 peers, training was finished within 6 hours and they all have an accuracy of 99-100% on the train set and 90-91% on the test set (for the 661 sampled documents out of 1000). The experiment with 32 peers ran out of RAM memory (as each peer holds its own model) and started performing erratically, I don't think we can trust those results. I've talked with Sandip and got an account for DAS6 as I don't think we can scale the experiments more without a training server. I'll be working to understand how to use it;
For the future I think trying to use DAS6 to perform a test with 100 peers may be worthwhile to check the integrity of the model and the evolution as the number of peers increases.
I have further looked into the code from SHATTER, data inference/reconstruction attack methods, and (as per Jeremie's recommendation) into MixNN which does similar work, though more basic.
I have presented the attack idea on models which mix their parameters and send them to different people to Dr. Naman Goel from Oxford lab and he suggested that since the method is not widely accepted, it may be an attack on an architecture which not many people use, thus being not very interesting.
I thought of looking into byzantine attacks in decentralized networks, then saw that a normal gradient similarity method has been published already in June this year, so I'd have to see if I can come up with something new. I found a literature review on the topic which I believe would be useful to read.
Idea: User has consumed some content, each with a semantic coordinate (calculated with an LLM for example). Then, we calculate the semantic coordinates of the user as the average of the coordinates of the content they have consumed. If I search with a query, I get the coordinates of the query, and then check around me for people who's semantic coordinate is closest to the query, then I ask them, as they are the most likely users to have content in which I'm interested.
Not sure if idea is feasible but it is plausible
Document needed for phd progress meeting. Mixture of Experts scaling is a great opportunity for decentralisation we talked about already in 18 Oct 2023. Idea outline:
Online decentralised learning is still immature. First, it is an emerging topic and not much competition yet.
Build upon the Decentralized Mixture-of-Experts work
AI on Networks
● Decentralized learning, distributed training and inference, federated learning over
device-edge-cloud continuum
● Trustworthy and privacy-preserving AI over a wide spectrum of networks
● Large foundation model pre-training, fine-tuning and inference over large-scale networks
● Robust adversarial machine learning over wired and wireless networks
● Resource-constrained and edge deployable AI solutions, experiments and testbeds for
ML-driven wireless systems.
Idea 1: Decentralized file-search based on taste embeddings:
Description: When searching for a file in a decentralized network, instead of flooding the network with the query, the system finds people who have similar items to my query and only query them.
Methodology:
Use the ORCAS dataset (which contains query – doc_id pairs), and assign 10 nodes (representing users) a number of documents with their associated queries;
Use an LLM to get the embeddings of all queries;
Calculate embeddings of a document as the average embeddings of its queries;
Calculate embeddings of a node (representing his/her taste) as the average embedding of their documents;
For a new query, calculate cosine similarity between query and all nodes we’re aware of, and send the query to the most similar nodes. Average DSI retrieved doc-ids. This way it works like a mixture of experts;
Open Question: What is the state of the art in decentralized search
Idea 2: Decentralized learning with model-parallelism:
Description: Investigate different aspects of model training in decentralized networks when single nodes can hold only a section of the model.
Methodology:
Look into privacy aspects of the matter, such as how the node holding the first section of the model perturbs the updates sent to the others in order to safeguard its data;
Look into how fault tolerance strategies, including how nodes can reorganize themselves to address issues as they arise;
Consider additional aspects such as communication efficiency and load balancing in a fully decentralized environment.
Brief update after discussion with Naman:
Idea 1 is decent, low risk, low reward. It's publishable but doesn't have many avenues for future research; Not great conference potential but publishable
Idea 2 is ambitious, high rish, high reward. It's probably a direction with a lot of competition but has potential for future research and is more publishable to better conferences
Both ideas should be pursued at the same time. If second fails to deliver because the field is too crowded, at least I have the first one.
So the general plan with De-DSI:
Write the Go/Nogo doc
Find aprropiate baseline for comparison
Start implementation
And the general plan with the decentralized model-parallel training:
Get acquainted with the literature and write it down here
Once I understand the current state of the art in the topic, I'll see if I can find anything interesting to do
Efforts after a week of trying to reproduce the baseline paper (not great looking yet).
It represents an aggregation of the last 4 graphs in the baseline paper.
X axis: Number of docs
Y axis: Accuracy at TTL = 50
Here's a sample of golden documents and their nearest query:
'impressions': 'impression',
'wwe': 'wcw',
'burgettstown': 'clarion-limestone',
'kariya': 'rucchin',
'fey': 'tina',
'damiano': 'cunego',
'mlh1': 'pms2',
'second-team': 'third-team',
'dooling': 'keyon',
'f-84f': 'thunderstreaks',
'harmonization': 'harmonisation'
The different lines represent combinations of alpha (teleportation factor) and distance from the golden-document in terms smallest of number of nodes that the query would need to pass to get to the golden document.
The implementation details on the baseline paper are fuzzy, so the results reflect me trying to infer what they did here and there (for example with regards to the 'uniform' distribution of documents to nodes: for 10 documents I have distributed 10 documents across the 4k nodes, so most nodes had no document in that experiment).
Had a discussion with Quinten and Naman and we came up with the following experiments:
Construction speed of tree Vs Diffusion convergence speed. How fast can we construct the structure necessary for the execution of the queries. We can have a measure of convergence for the baseline (the details of which they don't specify), and we can have a measure of time for calculating the k-means in all leaf nodes for the same number of nodes.
Execution speed of the queries of our method vs baseline method. Since the baseline requires a graph of connections, we can assume different types of graphs (for example a star graph) and compare the execution speed or success_chance_within_50_hops for our method vs their method. Our method would not use the graph structure in any way. Thus, we can examine in which types of graphs their method works better, in which it works worse.
We can also vary the size of the graphs. The baseline fails for more than 3 hops almost completely so I would expect better results for our method when the graph is large.
Our/baseline method with GLOVE Vs LLM embeddings. This would be useful because using an LLM takes a lot longer to get embeddings than the GLOVE model, and also has more dimensions, so calculating nearest neighbors takes slightly longer. We may want to have a graph to check how much better using an LLM is in terms of accuracy and compare the plus in accuracy with the minus in terms of tree-construction / diffusion-convergence speed.
Experiment with many documents per person. When a node holds many documents, the average will not be very representative of the interests of the user. We may show how our method breaks when we consider 100 documents per person somehow. We can implement a solution to this by having a new parameter which measures how divergent a user's interests are. When the divergence factor is larger than a specified threshold, we can cluster our interests and we can duplicate ourselves for each cluster, and thus place ourselves in multiple places in the graph according to the number of clusters we have. The details of this are to be figured out.
Additional updates:
I think I have finished implementing the baseline. I get decent results in similar situations as in their paper. I have made some inferences as they didn't detail every part of their experiments. Nevertheless, I will get a graph and ask them for their code again, all of them. Maybe this time I get an answer.
I thought of future experiments (as they are probably out of scope for this paper):
* Query Reformulation: Use LLM's to reformulate a query into multiple similar queries and follow each of them through the tree. Once you get a number of results from all of them, aggregate responses.
* Cluster Labelling: Use LLM's to label a leaf nodes so the regions are more interpretable.
Then took about a month of very chill paper reading to cool down 😸
Then worked on Marcel's paper regarding the self-financed search in decentralized systems while did some paper reading, mostly on decentralized learning methods.
In the mean time I came up with a research topic which could be interesting to look into:
Context:
* In federated learning, gradients sent to the server are vulnerable to gradient inversion attack which aims to reconstruct the data on which the learning was performed. So while the data is not directly observable, an attacker owning the server could plausibly obtain an approximation of the private data of individuals participating in the learning process;
* When the user participating in the training process utilizes multiple data on their training, the gradients will thus be a combination of the gradient obtained from each data point. The more data the person would use in their training before sending the gradients, the harder it will be for an attacker to untangle the gradients in order to obtain individual data points, instead of an unintelligible combination of all data;
Idea:
* Utilize random unrelated data to the task at hand and classify them as 'Unrelated'. For example, if we have a clothing classifier in images (e.g. pants, t-shirts etc.), just use any image on the internet which doesn't have any clothing in it and train on those images with the label 'Unrelated'. This would add gradients to the shared gradients, obfuscating the original data of the person.
* Unlike the traditional methods of differential privacy, this is a separable task in the neurons of the network. As such, this might not necessarily affect the accuracy on our main topic as the pattern of the unrelated data is not random, but discernible/learnable. We would indeed need a larger model than in normal circumstances, but the attainable accuracy is not bounded by differential privacy.
We have MeritRank trust algorithm. Can that be combined with your De-DSI and Semantica work for a 3rd chapter? So, De-DSI was for static content. Semantic is dynamic, but not attack proof. So mature these ideas, do small deployment using TorrentFreak publicity and Forum.Tribler.org Beta Test of "P2P AI".
If we focus on in-memory data structure aided with standard LLM we're no longer stuck on Google T5 encoder/decoder architecture (on-device fine-tuning). Focus on Global Brain problem: 200+ million scientific articles. Find a paper for "query". Scaling keyword search under active attack!
50k items, personalised around your content interest, preserve privacy (user-to-user similarity maximization). Magic for deployment: inference-only, works on moderate CPU. Sybil attack emulation results.
Next paper idea is going to be tied to take the first step to accelerating scientific discovery using automation, AI and crowdsourcing as alternatives to current-day peer-review conferences/journals. The idea is to create a modern version of paper-publication institutions which include:
Executable papers;
Public leaderboard for each dataset;
Search and recommendation with cutting-edge research methods;
Crowdsourced GPU's as donations for new algorithms;
Potential storage of all of this information on a blockchain.
More features to be added. The next paper might link only to the search part (for PhD topic), but the overarching goal could be a step towards the institution described above.
I'll do a literature review on the topic by the 23'rd of June
Desci from Coinbase - leverages blockchain technology to aim for a more open, incentivized, and community-driven scientific research. DeSci seeks to ensure the integrity and immutability of scientific records
Paper2Code - multi-agent LLM system that transforms paper into a code repository. It follows a three-stage pipeline: planning, analysis, and code generation, each handled by specialized agents.
Achievements:
85 % of original paper authors found the generated code helpful
when execution errors occurred, only tiny fixes (~0.5% of lines changed on average) were needed to get it working
CORE-Bench - 270 tasks based on 90 scientific papers across three disciplines (computer science, social science, and medicine)
Best Performance: 22% accuracy on Hard tasks, and up to ~60% on Easy tasks
PaperBench from OpenAI - 20 ICML 2024 Spotlight and Oral papers from scratch, including understanding paper contributions, developing a codebase, and successfully executing experiments. For objective evaluation, we develop rubrics that hierarchically decompose each replication task into smaller sub-tasks with clear grading criteria. In total, PaperBench contains 8,316 individually gradable tasks
Best Performance:
Current frontier agents (Claude 3.5 Sonnet) replicate just ~21% of rigorous ML research from scratch.
Human experts still outperform agents significantly (~41% after 48 hours of work vs ~27%).
Tools for reproducibility in science:
Code Ocean is a computational reproducibility platform that aims to make code more readily executable and discoverable. The platform, which is based on Docker, hosts the code and data in the necessary computational environment and allows users to re-run the analysis in the cloud and reproduce the results, bypassing the need to install the software. (Pastrana & Swaminathan, 2018)
Artifact Review and Badging Authors can (optionally) upload a container or repro script; a dedicated Artifact Evaluation Committee runs it. Reviewers see the committee’s report plus badges such as “Results Replicated.” Nothing is agent-driven yet, but containers make it plug-and-play for any LLM agent you want to add. AAAI-26 “AI-Powered Peer-Review Assessment” pilot - Large-language-model agents draft an extra review and summarise the discussion for SPC members. The system is container-friendly, but today it analyses PDFs only—no automatic experiment re-runs.
ICLR 2025 “Review-Feedback Agent” - multiple LLMs to provide reviewers with optional feedback on their reviews. This feedback agent was optimized to give suggestions that made reviews more informative, clear, and actionable. We also implemented multiple LLM-based guardrails, called reliability tests, which evaluated specific attributes of the AI feedback before it was posted.
Distributed Computing Platforms for Donating Compute Resources
BOINC(Berkeley Open Infrastructure for Network Computing) - is an open-source middleware platform that lets researchers create distributed computing projects and volunteers donate spare CPU/GPU cycles to process scientific workloads. It handles task distribution, data transfer, result validation and credit assignment, while providing volunteers a unified interface to browse and support multiple projects. Gridcoin is an open-source cryptocurrency that rewards volunteer computing on the BOINC platform. Instead of wasting energy on arbitrary proof-of-work, Gridcoin nodes award coins to users based on the amount of BOINC work they contribute to whitelisted science projects. It initially used proof-of-work but quickly moved to proof-of-stake consensus (to avoid energy waste). Volunteers who attach to BOINC projects and join the Gridcoin network earn GRC proportional to the research credits they accumulate. Domains: All BOINC projects can be rewarded (from medical research to math); this effectively provides a crypto incentive to donate cycles to science.
Basic idea: use a network of individuals, each with an LLM (or multiple) on their machine which parses public PDF’s and construct a decentralized Knowledge-Graph. The system would involve inter-LLM deliberation and a decentralized conflict-resolution and consensus mechanism.
Literature review shows that:
An ensemble of multiple agents perform better at reasoning than a single LLM
LLM’s can perform decently at knowledge-graph creation from documents
Decentralized KG has been tried before LLM’s but not yet with them
Main selling point of idea: Put the three points together and make it work.
For a more detailed literature review, see here, page 3
In the past few months I've replicated DiskANN and a few methods of updating the DiskANN index for additions/deletions over time, and have implemented a new method for full P2P system to self-organize people in semantically useful neighbourhoods, based on what the users want. For full details, see presentation.
Activity
pneague commentedon Oct 3, 2023
I have taken to understanding the work done by Martijn on ticket 42. I read through it and downloaded the code attached.
The last version of the code had a couple of functions not yet implemented so I reverted to the 22-06-2022 version (instead of the last version uploaded on 27-06-2022).
The 22-06-2022 had a few outdated functions and small bugs as well here and there, but since they were small I was able to solve them.
I have downloaded the required dataset and then successfully run the parser and scenario_creating functions implemented by Martijn. After that I ran the experiment itself based on the above-mentioned scenario, resulting in a couple of csv's and graphs.
I understand the general idea of the experiments and how they work, however the code still eludes me since it's not commented to a significant amount.

Here's an example of the graph of an experiment run with Martijn's code so far:
synctext commentedon Oct 3, 2023
Hmmm, very difficult choice.
For publications we should focus on something like
Web3AI: deploying decentralised artificial intelligencepneague commentedon Oct 18, 2023
Re-read papers regarding learn-to-rank and learned how to use the IPV8. With it I created an algorithm which simulates a number of nodes and sends messages to one another. From here I worked with Marcel and started implementing a system whereby one node sends a query to the swarm and then receives recommendations of content back from it. The progress is detailed in ticket 7290.
The idea at the moment is that we implement a version of Mixture-of-Experts (https://arxiv.org/pdf/2002.04013.pdf) whereby one node sends the query to other nodes which are nearby and receives recommendations. These are then aggregated to create a shortened and sorted list of recommendations for the querying node.
There are 2 design choices:
We could send the query-doc_inferior-doc_superior around as gossip or we (as we do at the moment) send the updates around every run. We'll look deeper into these ideas.
One issue discovered was regarding the size of the IPV8 network packet which is currently smaller than the entire model serialized with Pytorch, Marcel is currently working on that. We have 720k weights at the moment, and the maximum network packet size for IPV8 is 2.7MB so we have to fit in as many weight updates as possible.
You can see a demonstration of the prototype below:

I'm currently working on how to aggregate the recommendations of the swarm (for example, what happens if the recommendations of each node which received the query are entirely different). My branch on Marcel's repository: https://github.com/mg98/p2p-ol2r/tree/petrus-branch
synctext commentedon Oct 18, 2023
It's beyond amazing what you acomplished in 6 weeks after starting your phd. 🦄 🦄 🦄
Is the lab now All-In on Distributed AI? 🎲
Can we upgrade to transformers? That is the cardinal question for scientific output. We had Distributed AI in unusable form deployed already in 2012 within our Tribler network. Doing model updates is too complex compared to simple starting with sending training triplets around in a IPv8 community. The key is simplicity, ease of deployment, correctness, and ease of debugging. Nobody has a self-organising live AI with lifelong learning, as you have today in embryonic form. We even removed our deployed clicklog code in 2015 because it was not good enough. Options:
For a Youtube alternative smartphone app we have a single simple network primitive :
Query, content-item-clicked, content-item-NOT-clicked, clicked-item-popularity,signatureand in TikTok form without queries and added viewing attention time:content-item-long-attention, long-attention-time, content-item-low-attention, low-attention-time, long-attention-item-popularity,signature. Usable for content discovery, cold starts, content recommendation, and obviously semantic search.Next sprint goal: get a performance graph!
We need to get a paper on this soon, because the field is moving at lightning speed. So up and running before X-Mas, Tribler test deployment, and usage of NanoGPT in Jan, paper in Feb 🚀
pneague commentedon Nov 2, 2023
After looking into what datasets we could use for training a hypothetical model, I found ORCAS which consists of almost 20 million queries and the relevant website link given the query. It is compiled by Microsoft and it represents searches made on Bing in a period of a few months (with a few caveats to preserve privacy, such as showing only queries which have been searched a number of times and not showing a user_ID and stuff like that).
The data seems good, but the fact that we have links instead of titles of documents made it impossible to use the triplet model we have right now (where we need to calculate the 768 dimension embedding of the title of the document: since we don't have a document-title and only a link we cannot do that).
So I was looking for another model architecture to be usable in our predicament and I found Transformer Memory as a Differentiable Search Index. The paper argues that instead of using a dual-encoder method (where we encode the query and the document on the same space and then find the document which is nearest neighbour to the query) we can use the differentiable-search-index (DSI), where we have a neural network map directly the query to the document. The paper presents a number of methods to achieve this but the easiest one to implement for me at this time was to simply assign each document one number, have the output layer of the network be composed of the same number of neutrons as the number of documents and make the network essentially assign probabilities to each document, given a query. Additionally, the paper performs this work with a Transformer architecture, raising the possibility of us integrating Nanogpt into the future architecture.
I got to implement an intermediary version of the network whereby the same encoder that Marcel used (the allenai/specter language model) encodes a query and the output is the probability for each document individually. The rest of the architecture is left unmodified:
layers = [
('lin1', nn.Linear(768, 256)), # encoded query, 768 dimensions
('relu1', nn.ReLU()),
('lin2', nn.Linear(256, 256)),
('relu2', nn.ReLU()),
('lin3', nn.Linear(256, 256)),
('relu3', nn.ReLU()),
('lin4', nn.Linear(256, number_of_documents)), # output probabilities
]
In my preliminary tests so far, when we have 884 documents (i.e. 884 output neurons) we can perform 50 searches in 4 seconds (so about one search per 0.08 seconds). When we have 1066561 documents, 50 searches get completed in 200 seconds (one search per 4 seconds). Under some circumstances this may be acceptable for Tribler users but people with older computers might experience significant difficulties. I will need to look at ways of reducing the computation time required.
Moving forward, I'm looking to finally implement a good number of peers in a network that send each other the query and answer (from ORCAS) and get the model to train.
qstokkink commentedon Nov 3, 2023
Cool stuff 👍 Could you tell me more about your performance metrics? I have two questions:
This matters a lot for deployment in Tribler.
pneague commentedon Nov 3, 2023
But keep in mind, this is extremely preliminary, I did not implement NanoGPT with this setup so that's bound to increase computing requirements
synctext commentedon Nov 8, 2023
Paper idea to try out for 2 weeks:
Query, item-clicked,item-clicked-popularity, item-not-clicked, date, signature.item-not-clicked? Use simply another item in top-K. Can we use co-occurence (same query, different docs) to find a non-click substitute?LLM for search related work example on Github called vimGPT:
vimgpt.mov
pneague commentedon Nov 22, 2023
I got the T5 LLM to generate the ID's of ORCAS documents.
Current Setup:
I was looking for what to do moving forward.
I found a paper survey on the use of LLM's in the context of information retrieval. It was very informational, there's a LOT of research in this area at the moment. Made a list of 23 papers which were referenced there that I'm planning to go through at an accelerated pace. At the moment I'm still wondering what to do next to make the work I've already performed publishable by the conference on the 5'th of Jan.
synctext commentedon Nov 22, 2023
update
Please try to think a bit already about the next step/article idea for upcoming summer 🌞 🍹 ? Can you think of something where users donate their GPU to Tribler and get a boost in their MeritRank as a reward 🥇 ➕ the Marcel angle of "active learning" by donating perfect metadata. Obviously we need the ClickLog deployment and crawling deployed first.
pneague commentedon Dec 12, 2023
In the past weeks I've managed to introduce 10 users who send each other query-doc_id pairs.
The mechanism implemented is the following:
For the future I think trying to use DAS6 to perform a test with 100 peers may be worthwhile to check the integrity of the model and the evolution as the number of peers increases.
23 remaining items
pneague commentedon Oct 21, 2024
I have further looked into the code from SHATTER, data inference/reconstruction attack methods, and (as per Jeremie's recommendation) into MixNN which does similar work, though more basic.
I have presented the attack idea on models which mix their parameters and send them to different people to Dr. Naman Goel from Oxford lab and he suggested that since the method is not widely accepted, it may be an attack on an architecture which not many people use, thus being not very interesting.
I thought of looking into byzantine attacks in decentralized networks, then saw that a normal gradient similarity method has been published already in June this year, so I'd have to see if I can come up with something new. I found a literature review on the topic which I believe would be useful to read.
Idea: User has consumed some content, each with a semantic coordinate (calculated with an LLM for example). Then, we calculate the semantic coordinates of the user as the average of the coordinates of the content they have consumed. If I search with a query, I get the coordinates of the query, and then check around me for people who's semantic coordinate is closest to the query, then I ask them, as they are the most likely users to have content in which I'm interested.
Not sure if idea is feasible but it is plausible
synctext commentedon Oct 21, 2024
Document needed for phd progress meeting. Mixture of Experts scaling is a great opportunity for decentralisation we talked about already in 18 Oct 2023. Idea outline:
update much related work exists on 6G federated learning. Yet highly theoretical, impractical, and immature. Great stuff to help realise for real 😃 IEEE/ACM Transactions on Networking cfp
15 Jan 2025 deadline, super rush! 🤔
pneague commentedon Oct 29, 2024
Idea 1: Decentralized file-search based on taste embeddings:
Description: When searching for a file in a decentralized network, instead of flooding the network with the query, the system finds people who have similar items to my query and only query them.
Methodology:
Use the ORCAS dataset (which contains query – doc_id pairs), and assign 10 nodes (representing users) a number of documents with their associated queries;
Use an LLM to get the embeddings of all queries;
Calculate embeddings of a document as the average embeddings of its queries;
Calculate embeddings of a node (representing his/her taste) as the average embedding of their documents;
For a new query, calculate cosine similarity between query and all nodes we’re aware of, and send the query to the most similar nodes. Average DSI retrieved doc-ids. This way it works like a mixture of experts;
Open Question: What is the state of the art in decentralized search
Idea 2: Decentralized learning with model-parallelism:
Description: Investigate different aspects of model training in decentralized networks when single nodes can hold only a section of the model.
Methodology:
Look into privacy aspects of the matter, such as how the node holding the first section of the model perturbs the updates sent to the others in order to safeguard its data;
Look into how fault tolerance strategies, including how nodes can reorganize themselves to address issues as they arise;
Consider additional aspects such as communication efficiency and load balancing in a fully decentralized environment.
Brief update after discussion with Naman:
Idea 1 is decent, low risk, low reward. It's publishable but doesn't have many avenues for future research; Not great conference potential but publishable
Idea 2 is ambitious, high rish, high reward. It's probably a direction with a lot of competition but has potential for future research and is more publishable to better conferences
Both ideas should be pursued at the same time. If second fails to deliver because the field is too crowded, at least I have the first one.
So the general plan with De-DSI:
And the general plan with the decentralized model-parallel training:
qstokkink commentedon Nov 6, 2024
Some reading pointers:
Semantic Overlay Networks. Arturo Crespo and Hector Garcia-Molina
https://resources.mpi-inf.mpg.de/d5/teaching/ws03_04/p2p-data/12-09-writeup2.pdf
Kademlia: A Peer-to-Peer Information System Based on the XOR Metric
https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=eb51cb223fb17995085af86ac70f765077720504
Epidemic Broadcast Trees
https://www.dpss.inesc-id.pt/~ler/reports/srds07.pdf
synctext commentedon Nov 12, 2024
Found an amazing paper from 2006! Efficient Peer-to-Peer Semantic Overlay Networks based
on Statistical Language Models.
Actually, an AI tool found this for me. Prompt: Has anyone used the llm revolution to improve semantic overlay networks? from https://hasanyone.com site by excellent FutureHouse toolbuilders, https://www.futurehouse.org/research-announcements/wikicrow
pneague commentedon Nov 25, 2024
Efforts after a week of trying to reproduce the baseline paper (not great looking yet).
It represents an aggregation of the last 4 graphs in the baseline paper.
X axis: Number of docs
Y axis: Accuracy at TTL = 50
Here's a sample of golden documents and their nearest query:
'impressions': 'impression',
'wwe': 'wcw',
'burgettstown': 'clarion-limestone',
'kariya': 'rucchin',
'fey': 'tina',
'damiano': 'cunego',
'mlh1': 'pms2',
'second-team': 'third-team',
'dooling': 'keyon',
'f-84f': 'thunderstreaks',
'harmonization': 'harmonisation'
The different lines represent combinations of alpha (teleportation factor) and distance from the golden-document in terms smallest of number of nodes that the query would need to pass to get to the golden document.
The implementation details on the baseline paper are fuzzy, so the results reflect me trying to infer what they did here and there (for example with regards to the 'uniform' distribution of documents to nodes: for 10 documents I have distributed 10 documents across the 4k nodes, so most nodes had no document in that experiment).
synctext commentedon Nov 25, 2024
red red wineversusblue beer)pneague commentedon Dec 3, 2024
Had a discussion with Quinten and Naman and we came up with the following experiments:
We can also vary the size of the graphs. The baseline fails for more than 3 hops almost completely so I would expect better results for our method when the graph is large.
Additional updates:
* Query Reformulation: Use LLM's to reformulate a query into multiple similar queries and follow each of them through the tree. Once you get a number of results from all of them, aggregate responses.
* Cluster Labelling: Use LLM's to label a leaf nodes so the regions are more interpretable.
pneague commentedon Apr 14, 2025
Submitted paper to the journal special issue:
Solving_Decentralized_Search_using_LLM_based_Semantic_Trees-14.pdf
Then took about a month of very chill paper reading to cool down 😸
Then worked on Marcel's paper regarding the self-financed search in decentralized systems while did some paper reading, mostly on decentralized learning methods.
In the mean time I came up with a research topic which could be interesting to look into:
Context:
* In federated learning, gradients sent to the server are vulnerable to gradient inversion attack which aims to reconstruct the data on which the learning was performed. So while the data is not directly observable, an attacker owning the server could plausibly obtain an approximation of the private data of individuals participating in the learning process;
* When the user participating in the training process utilizes multiple data on their training, the gradients will thus be a combination of the gradient obtained from each data point. The more data the person would use in their training before sending the gradients, the harder it will be for an attacker to untangle the gradients in order to obtain individual data points, instead of an unintelligible combination of all data;
Idea:
* Utilize random unrelated data to the task at hand and classify them as 'Unrelated'. For example, if we have a clothing classifier in images (e.g. pants, t-shirts etc.), just use any image on the internet which doesn't have any clothing in it and train on those images with the label 'Unrelated'. This would add gradients to the shared gradients, obfuscating the original data of the person.
* Unlike the traditional methods of differential privacy, this is a separable task in the neurons of the network. As such, this might not necessarily affect the accuracy on our main topic as the pattern of the unrelated data is not random, but discernible/learnable. We would indeed need a larger model than in normal circumstances, but the attainable accuracy is not bounded by differential privacy.
Literature review:
* To be completed
synctext commentedon Apr 14, 2025
ToDo: 3 papers ideas to rank and select from. Public AI is now a huge things.
We have MeritRank trust algorithm. Can that be combined with your De-DSI and Semantica work for a 3rd chapter? So, De-DSI was for static content. Semantic is dynamic, but not attack proof. So mature these ideas, do small deployment using TorrentFreak publicity and Forum.Tribler.org Beta Test of "P2P AI".
If we focus on in-memory data structure aided with standard LLM we're no longer stuck on Google T5 encoder/decoder architecture (on-device fine-tuning). Focus on Global Brain problem: 200+ million scientific articles. Find a paper for "query". Scaling keyword search under active attack!
50k items, personalised around your content interest, preserve privacy (user-to-user similarity maximization). Magic for deployment: inference-only, works on moderate CPU. Sybil attack emulation results.
pneague commentedon Jun 3, 2025
Next paper idea is going to be tied to take the first step to accelerating scientific discovery using automation, AI and crowdsourcing as alternatives to current-day peer-review conferences/journals. The idea is to create a modern version of paper-publication institutions which include:
More features to be added. The next paper might link only to the search part (for PhD topic), but the overarching goal could be a step towards the institution described above.
I'll do a literature review on the topic by the 23'rd of June
pneague commentedon Jun 18, 2025
Desci from Coinbase - leverages blockchain technology to aim for a more open, incentivized, and community-driven scientific research. DeSci seeks to ensure the integrity and immutability of scientific records
https://news.ycombinator.com/item?id=44004625
Datasets for paper reproducibility:
Paper2Code - multi-agent LLM system that transforms paper into a code repository. It follows a three-stage pipeline: planning, analysis, and code generation, each handled by specialized agents.
Achievements:
85 % of original paper authors found the generated code helpful
when execution errors occurred, only tiny fixes (~0.5% of lines changed on average) were needed to get it working
CORE-Bench - 270 tasks based on 90 scientific papers across three disciplines (computer science, social science, and medicine)
Best Performance: 22% accuracy on Hard tasks, and up to ~60% on Easy tasks
PaperBench from OpenAI - 20 ICML 2024 Spotlight and Oral papers from scratch, including understanding paper contributions, developing a codebase, and successfully executing experiments. For objective evaluation, we develop rubrics that hierarchically decompose each replication task into smaller sub-tasks with clear grading criteria. In total, PaperBench contains 8,316 individually gradable tasks
Best Performance:
Current frontier agents (Claude 3.5 Sonnet) replicate just ~21% of rigorous ML research from scratch.
Human experts still outperform agents significantly (~41% after 48 hours of work vs ~27%).
Tools for reproducibility in science:
Code Ocean is a computational reproducibility platform that aims to make code more readily executable and discoverable. The platform, which is based on Docker, hosts the code and data in the necessary computational environment and allows users to re-run the analysis in the cloud and reproduce the results, bypassing the need to install the software. (Pastrana & Swaminathan, 2018)
Artifact Review and Badging Authors can (optionally) upload a container or repro script; a dedicated Artifact Evaluation Committee runs it. Reviewers see the committee’s report plus badges such as “Results Replicated.” Nothing is agent-driven yet, but containers make it plug-and-play for any LLM agent you want to add.
AAAI-26 “AI-Powered Peer-Review Assessment” pilot - Large-language-model agents draft an extra review and summarise the discussion for SPC members. The system is container-friendly, but today it analyses PDFs only—no automatic experiment re-runs.
ICLR 2025 “Review-Feedback Agent” - multiple LLMs to provide reviewers with optional feedback on their reviews. This feedback agent was optimized to give suggestions that made reviews more informative, clear, and actionable. We also implemented multiple LLM-based guardrails, called reliability tests, which evaluated specific attributes of the AI feedback before it was posted.
Distributed Computing Platforms for Donating Compute Resources
BOINC(Berkeley Open Infrastructure for Network Computing) - is an open-source middleware platform that lets researchers create distributed computing projects and volunteers donate spare CPU/GPU cycles to process scientific workloads. It handles task distribution, data transfer, result validation and credit assignment, while providing volunteers a unified interface to browse and support multiple projects. Gridcoin is an open-source cryptocurrency that rewards volunteer computing on the BOINC platform. Instead of wasting energy on arbitrary proof-of-work, Gridcoin nodes award coins to users based on the amount of BOINC work they contribute to whitelisted science projects. It initially used proof-of-work but quickly moved to proof-of-stake consensus (to avoid energy waste). Volunteers who attach to BOINC projects and join the Gridcoin network earn GRC proportional to the research credits they accumulate. Domains: All BOINC projects can be rewarded (from medical research to math); this effectively provides a crypto incentive to donate cycles to science.
pneague commentedon Jul 3, 2025
AGENTIC SYSTEMS FOR KNOWLEDGE GRAPH CREATION
Basic idea: use a network of individuals, each with an LLM (or multiple) on their machine which parses public PDF’s and construct a decentralized Knowledge-Graph. The system would involve inter-LLM deliberation and a decentralized conflict-resolution and consensus mechanism.
Literature review shows that:
Main selling point of idea: Put the three points together and make it work.
For a more detailed literature review, see here, page 3
synctext commentedon Nov 27, 2025
ZeroFlow: Overcoming Catastrophic Forgetting is Easier than You Think by the AMiner professor.
Decentral RAG dataset on Medical, but also legal is interesting:
972,000+ court decisions · 5,516 federal laws · 15,722 cantonal laws · 8.09 M resolved citation edges · 11.26 M statute references · 83,958 Botschaft amendment references (459 verbatim Botschaften ingested, scaling) · daily RFC-6962 Merkle root + OpenTimestamps anchor (cryptographic provenance) · cli:ch + ECLI identifiers on every decision https://github.com/jonashertner/caselaw-repo-1
pneague commentedon Apr 22, 2026
In the past few months I've replicated DiskANN and a few methods of updating the DiskANN index for additions/deletions over time, and have implemented a new method for full P2P system to self-organize people in semantically useful neighbourhoods, based on what the users want. For full details, see presentation.
semanticDHT_14Apr.pptx