Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web3 recommendations: balancing trust and relevance #6942

Open
synctext opened this issue Jun 22, 2022 · 48 comments
Open

Web3 recommendations: balancing trust and relevance #6942

synctext opened this issue Jun 22, 2022 · 48 comments
Assignees
Milestone

Comments

@synctext
Copy link
Member

synctext commented Jun 22, 2022

  • Cum Laude candidate

USA House of Representatives - INVESTIGATION OF COMPETITION IN DIGITAL MARKETS :

As part of a top-to-bottom review of the market,
the Subcommittee examined the dominance of Amazon, Apple,
Facebook, and Google, and their business practices to determine
how their power affects our economy and our democracy.
...
By controlling access to markets, these giants can pick
winners and losers throughout our economy. They not only wield
tremendous power, but they also abuse it by charging exorbitant
fees, imposing oppressive contract terms, and extracting valuable
data from the people and businesses that rely on them. Second,
each platform uses its gatekeeper position to maintain its market
power. By controlling the infrastructure of the digital age, they
have surveilled other businesses to identify potential rivals, and
have ultimately bought out, copied, or cut off their competitive
threats. And, finally, these firms have abused their role as
intermediaries to further entrench and expand their dominance.

(literature survey, start Q1'22, background data science track, practical is OK, government agency embedding?). ideas:

  • literature search idea: what machine learning can we use for a roadmap to defeat Big Tech? Decentralised: yes!
  • Key focus: deployment and getting experimental experience is central?
  • Generative adversarial network (GAN). The core idea of a GAN is based on the "indirect" training through the discriminator, another neural network that is able to tell how much an input is "realistic", which itself is also being updated dynamically {Wikipedia}. For a thesis: musicDAO context, 1 part issues keyword searches+ranks the results, the other part conducts relevance ranking.
  • SearchZero idea: inspired by reinforcement learning without (much) rules, https://www.deepmind.com/blog/muzero-mastering-go-chess-shogi-and-atari-without-rules
  • ClickLog {privacy,performance?}?
  • front-page composition(content discovery), versus keyword search for known item.
  • new thesis format: 8-10 pages IEEE 2-colum, 4 max. figures.

Background: operational permissionless plug-in system for Android. Foundational block for zero-server app store.

@synctext
Copy link
Member Author

synctext commented Aug 15, 2022

Please read these for our next meeting if possible (already part of deep-dive):

Open Question. How much activism to put in survey and thesis, "from centralized control to decentralized freedom".

EDIT:

@synctext synctext changed the title master thesis placeholder - learn-to-rank master thesis placeholder - ?? self-repairing, self-healing, indestructible Web3 platforms ?? Aug 18, 2022
@synctext
Copy link
Member Author

finding anything in a sea of misinformation

@grimadas
Copy link
Contributor

Today we did some initial brainstorming, which we continue next week.

The thesis addresses one of somewhat overlooked problem in Web3: Attack-resilient Search.
The idea is to propose a model on how to build search overlays/indexes with stranger policies and that promote peer diversity.
How can we help resist the censorship?

Structured overlays, search and indexing is one of the fundamental topics in peer-to-peer literature.
Specially we need to pay attention to some "old" proposals, which are now re-discovered in the new context.

Some of the classical work:

Now the topic is revived again in the context:

@synctext
Copy link
Member Author

synctext commented Aug 20, 2022

Continued brainstorm... Note: Doing theory just for the theory and Cum Laude is not the most fun. For scientists, most engineering time takes time away from true science. I fundamentally disagree, but that's sadly the ivory-tower culture. Outcome: simulations, somewhat nice, Internet-deployment is waste of time ⚡ ...

  • fundamentals of Web3: evolution of cooperation against monopolies, surveillance, and misinformation
    • understand the German Math from the lab by an actual mathematician
    • The most scientific line we have: evolution of cooperation
    • Mathematical proof of something under all possible attacks
    • Web3 architecture with an evolving formula to decide if agents are good or evil. (or gullible)
    • possible idea: some peers helped you and helped others, you trust them more.
      • Essential data structure: work graph {which agent helped another agent}
      • Work graph is also subject to attacks, misreporting, lying, slandering, white washing, Sybil attacks, etc.
      • Graph of trust is build up when you see helpful. Graph walks, exploration, discovery.
      • Preferential treatment of most trusted peers
      • Within a network of untrusted peers you discover trust vectors for trusted services.
      • Alternative idea: peers with same preference for items (similarity graph)

OR

OR

  • Web3Trust: finding truth in a sea of misinformation
    • Search algorithm: user searches for a certain tag, goal is to find relevant items
    • Different focus, not machine learning, but trust, fraud, and spam.
    • Not so simple trust-aware model: items have an association with multiple tags. Users crowd-source these associations of items and tags. Items have a certain popularity with users, influencing their relevance ranking. Finally, users have a position within the user-to-user trust graph. It is possible that the majority of users is evil and actively spreading false tags and misinformation. essence: assume the majority is evil. then solve, good luck 🤞

OR

Imagine a large and complex knowledge graph that cannot be stored in a single place, because of a variety of reasons
(practical, societal, legal or other). Instead, this knowledge graph is spread across multiple sources; perhaps to the
extent that every person has their own space where they store their own data. And there is no coordination of which
data is stored where, and how data is exposed. This is what we call a _decentralized knowledge graph_.
An additional complexity is that each piece of data in this graph can have different permissions associated with it:
not all data is public, and some of it can only be read or written by certain people.

???

@rmadhwal
Copy link

rmadhwal commented Aug 29, 2022

I'm done reading through all the suggested readings/topics.
Impressions on each topic:

  • fundamentals of Web3: evolution of cooperation against monopolies, surveillance, and misinformation

    • Creating an algorithm that traverses through a network to build a web of trust seems like an interesting engineering topic
    • But perhaps a bit too theoretical (?), while I appreciate the maths, I don't think my strengths lie in theory and formal proofs
  • Foundations of Web3 search with fraud, misinformation, and lawyer attacks

    • Quite an interesting area, I have some experience with Federated ML, decentralised ML looks like a very promising area with great room for engineering work.
    • Read through the existing master thesis and his experience through figuring out how to frame the problem statement was quite enlightening. However, I'm a bit confused about the scope of the problem and how ML will be used. Is the purpose of the ML to: a) better understand the user's query and serve better results tailored to the exact query (in a vacuum from the user's preferences and other users and their preferences) or b) if there are no exact matches to the query then instead populate results based on: the user's preferences and what we've learned from other users based on those preferences ? (or maybe a bit of both)
    • The answer to the above questions would help me understand why we need DFML
  • Web3Trust: finding truth in a sea of misinformation

    • Same concern as for first topic, perhaps too theoretical and not enough engineering
  • Quantification of decentralisation of Web3 and the old age of P2P

    • Thanks for the link to Prof Verborgh's article, I ended up doing a deep dive in his website. I find his ideas for personal data silos and how they would change the conventional structure of the web fascinating (destruction of APIs).
    • Would be very interested to work on/enhance a system similar to Solid which enables this kind of worldview

Interesting article on state of metadata in the current world

If an experimental thesis means that I will lose my cum laude, I'd rather do that than not work with code for 10 months :)

@synctext
Copy link
Member Author

synctext commented Aug 30, 2022

@synctext
Copy link
Member Author

synctext commented Sep 15, 2022

Trust for Web3 in a world of misinformation, spam, and fraud

The scientific challenge within this master thesis is enabling anybody to freely publish without any censorship, creating a commons where everybody is free to read, react, and interact, while at the same time preventing the destruction of this commons by utilising a trust network for filtering misinformation, spam, and deceptive content. We believe this problem is unsolvable within the context of profit-driven big tech companies and can only be solved within the collaborative Web3 context. Our infrastructure for the common good is owned by both everybody and nobody. This collective sense of ownership is believed to be a critical element to its feasibility.
Thesis content: 1) math model. 2) algorithm 3) experiment/some code: trust graph, trust function, personalised misinformation filter, permissionless innovation, and radical transparency ???
stuff like: ... The first principles of our foundational Web3 are that each information object is a tamper-proof swarm with an irrefutable signed record on an append-only ledger. Each pseudonym is tied to the trust network. Everybody is free to modify their own trust function. Select between keyword search and frontpage-browsing (one-shot ranking of all items; who you trust, items might like). Possible implementation feasibility shortcut: audio proof-of-principle; video in TikTok-style is mere engineering 🤣

@synctext
Copy link
Member Author

synctext commented Sep 22, 2022

btw we have access to industrial GPU infrastructure

The following GPU extensions are planned for later this summer: DAS-6/Delft
will be extended with 16 A4000 and 4 A5000 GPUs; DAS-6/UvA-SNE will be extended
with 3 A40 and 3 A10 GPUs; DAS-6/VU will be extended with 8 A2 GPUs. Stay tuned.

btw2 there is already a complaint that our older GPU stuff is making too much noise in the noisy datacenter ⛑️

@rmadhwal
Copy link

rmadhwal commented Sep 28, 2022

Question to think about for this week: How does one quantify trust in information propogation ? While trust in systems that rely on work can be broken down to a "fundamental unit" where Alice can verify Bob having done work for her (regardless of if that claim is fake or not), how can a user every verify if the information provided by another peer is misinformation or not? (especially if it's fake news which can't be discerned from real news)

These two weeks I focused on two types of papers, one focused on decentralised search (i.e. finding information in a sea of information) and trust (disinformation/freeriding peers/peers spreading false information)

Most relevant papers on decentralised search:
A decentralised web engine
An evaluation framework for comparing decentralised search
An older paper by the same authors on the same topic
Analysis of p2p search infrastructure using Gnutella as subject - while the analysis itself may not be very useful, the metrics they devised could be useful for quantifying a potential search algorithm's performance

I found the idea of constructing content overlay networks mentioned in the first paper interesting. The concept involves creating graphs with close and far neighbours, the close neighbours consist of peers that own similar content to your node, together close neighbours form a content overlay. When querying for content outside your overlay, you'd rely on a caching mechanism/gossip to find out about the relevant overlays. Could be a starting point for implementation, the paper suggests using Neo4j to support graphs for large network.

Most interesting papers I read on trust:
Suggests an interesting initial method of trust which leverages a cool data structure to find information about peers
ConTrib
BOINC: A platform for volunteer scientific computing, their trust model requires ensuring that returned values are valid and not just noise meant to sabotage experiments - they use evolving redundancy where multiple nodes perform the same work in combination with whitelists to reduce harm of redundancy
Sybil proofness with "transitive" trust
Freerider tracking in gossip
PeerReview: An accountability mechanism for distributed systems
Data structures for tamper evident logging

@synctext
Copy link
Member Author

synctext commented Sep 29, 2022

  • @rmadhwal grown to dislike machine learning.
    • pseudo-scientific methodology of ML: try lots of things, see what works. Stumble upon success method
    • Bag of tricks to utilise instead of intelligent predetermined architecting
    • Literature is often dense maths, yet another trick which works on some sunny day with some non-dirty data
    • Almost everything is about data engineering quality, machine learning quality is secondary
    • Machine learning is simply no longer interesting
  • We do not have any formula of the creation of trust out of nothing
    • we can assume never to win the "fake identity battle" with captcha and other proof-of-personhood
    • All prior work did not utilise years of collaboration and the unstoppable growth of a core of successful collaborators
      • opportunity cost, probability of conversion from exploiter to collaborator
      • "genuine collaborator" versus trapped into doing the right thing, because guaranteed to be detected and lead to benishment.
      • long-term stable evolution of collaboration - into a single master thesis algorithm
    • We do know that trust may emerge when two people collaborate for a long time with mutual benefit
    • This thesis creates a long-enduring trust network between participants
    • We assume the existence of a mechanism to detect malicious people when trying to collaborate for a while
    • see our 2013 running code (but not good enough) on privacy-reserving similarity function
    • its an old idea! see our 2005 running code and publication https://grouplens.org/beyond2005/full/pouwelse.pdf
    • thesis thesis explore a single primitive of joining a collective and building a reputation of goodness. With the emergent effect of enhanced utility and attraction of evil nodes who will relinquish their bad habit for joining the forces of good 🤣
      • all this might utterly fail obviously
      • But if we don't try this out in a master thesis we will never achieve world piece (or Web3 search without misinformation)
      • deciding who is malicious of your long-term neighbours is left for future work (but easier problem to have).

@rmadhwal
Copy link

rmadhwal commented Oct 14, 2022

This week I did a deep dive on trust, reputation systems and web3.

Something I thought of through my readings on proof of skin (/proof of x in general) systems is if reputation systems can be enhanced by proof of skill/competence. The ideas seem synergistic to me since even skillful people could have incentives to mislead others, while reputable people who publish information on systems that they are experts on should probably not be trusted (as much).

I found an interesting project: SourceCred which seems to be solving a similar problem to what we're discussing (they're used in MakerDAO), though from my primary reading, it seems like the reputation system they implement is primarily based on contributions, but I think a system of "credit" within sub-communities which is retroactively priced, priced based on the size/quality of the sub-community is an interesting idea.

For reputation systems, I did a deep dive in white papers that would help build my literature survey's background:
Resnick's paper on reputation system is a great background setter for reputation systems on the internet
Another paper by Resnick which analyses how trust is developed online among strangers, specifically on EBay
An early idea which attempts to use Beta Distribution to model a 'shadow of the future' for stranger's trustworthiness
Another early idea which incorporated some dynamicity in the reputation values but with limited sybil/cheater detection
The paper on wikitrust has some nice ideas about the properties that a good reputation system should have
Finally, FullReview, an extension on top of PeerReview which also accounts for selfish nodes seems to be a very promising protocol for accountability in distributed systems

Also found an interesting book, The Evolution of Cooperation which I'm picking up as a nighttime read

Going into this week I wanted to make sure that I had enough content to explain in my literature survey what web3 is and why trust is such an essential property of it. However, most of the articles I read were unfortunately not white papers, I will list them below anyway:
The web3 landscape - provides a great overview of apps in web3, where DAOs and DeFi are headed
The best introduction I found to web3 was on Ethereum's website
An interesting article on proof of skin in web3, i.e. building reputation and earning rewards through investment of skin in the system
Also found this interesting framework on github which allows users in decentralised apps to prove their competence
An article about proof of skill by a service that no longer exists
Proof of attendance protocol - I find the idea of tying identity to blockchain interesting given that one of the tenets is anonymity, but similar to how nothing can be achieved in software without side effects, surely trust can never be fully developed with complete privacy, so while anti-thetical, incorporating some aspects of real life such as skills/attendance is an interesting direction to me
This article talks about how status can be used to build communities and a bit about how it
has historically done so

An article on social tokens in general and their function to communities

Beyond this I also wanted to read some dissenting opinion on web3, surely only reading about why something is great and ignoring the glaring deficits and pretending they do not exist is not a wise method of learning about something. Here are some good counter opinions that I found on the subject:
The article title speaks for itself, I don't agree with some of the opinions, but seems to me that a lot of the points are in the average developer's mind when they think about web3

@synctext
Copy link
Member Author

synctext commented Oct 14, 2022

Master thesis idea of the week: "creating trust with weak signals and fixating collaborators". For "with honors" your style needs to be like the Harvard professor Nowak : Five rules for the evolution of cooperation. And focus more on this line of work: An optimal strategy to solve the Prisoner’s Dilemma. PD favor: iterative, group, etc. Quantifying social group evolution
After decades of trying we dont have anything more general than tit-for-tat, by making a mild assumption we make it tractable and prove the viability of our generic mechanism to create trust. How to apply trust (Web3, practical context of our lab)?

  • Trustworthy content discovery
  • Adversarial information retrieval
    • keyword search
    • spam filtering
    • relevance ranking
    • Sybil detection, index poisoning, slandering, etc.
  • DAO voting, integrity, and protection of treasury assets

Thinking: evolution of cooperation feels more fundamental. However, they ignore the problem of fake identities. Sybils are the core cost driver for Big Tech and other Internet police. Generalised: You scratch my back and I'll scratch yours later.

Quite elaborate scope "unwritten rules for the evolution of cooperation in Web3":

  • Fundamentals are PD games, repeated, and group evolution
  • We have failed to apply these generic mechanism from the natural world to The Internet. 2003 work: commercial repuation versus social trust. https://dspace.mit.edu/handle/1721.1/87343
  • We present a survey of surveys. This table lists of prior surveys around trust and reputation
  • Now we have evolved further into Web3. Fully self-organising, dishonest majority weak assumptions for success: honest people can eventually communicate, eventually collaborate, other weak signals, defection detection, and fixed collaborators.

@rmadhwal
Copy link

rmadhwal commented Nov 1, 2022

Here's the first draft of my literature survey, there's a few things pending at the end but the structure/skeleton is mostly fleshed out
Literature_Survey first draft.pdf

@synctext
Copy link
Member Author

synctext commented Nov 1, 2022

Great read !!!

  • Somewhat looong: "Like with the financial crisis, such developments have led to a shift in the general attitude towards such large Internet platforms where the requirement of third parties for maintaining and enforcing trust in sociotechnical systems is being viewed more as a hindrance rather than a help. [8]"
  • Above is not crystal clear. Profit only: banks being too leveraged and fragile. Big Tech avoiding trust erosion and misinformation
  • Web3 aims to be "a commons", quote and ref?
  • "without the presence of a overseeing, super powerful third party" is that the platform owner? Add little more clarity.
  • Exceptionally "conceptional dense" text: it covers Big Tech Bad, Linux coding, too big to fail of banks, Prisoner’s Dilemma grounding, and trust is everywhere. {just an observation to record}
  • Add scientific depth and make a Web3 definition. The Web3 decentralised movement does not have consensus on a central definition. lots around and this https://a16z.com/wp-content/uploads/2022/04/principles-and-models-of-decentralization_miles-jennings_a16zcrypto.pdf
  • Note that your term "long enduring" has 2009 Nobel prize linkage.
  • "A system that will be able to achieve the stated dreams of Web3 should be effectively able to tackle these problems". With freeriding, index poisoning etc. you focus on infrastructure integrity issues. Social issues of long-term cooperation such as echo-chambers, inequality, exclusion, filter bubbles, polarisation, and the social divide are outside the scope of this survey???? Also no mentioning of Dunbar number which poses a biological limit on our social fabric.
  • "4) Clarity", maybe the cardinal effect is: "certainty". Simplicity and transparency reduce uncertainty and create trust.
  • Your survey does not contain much self-promotion why your survey is superior to all numerous prior trust surveys.
    • Abstract: "Web3 is a future version of the Internet that aims to create a commons where everybody is free to publish, read, react, and interact with content."
    • This survey shows that the unique combination of emerging Web3 leaderless technology and the decades-old problem of trust might represent a powerful combination.
    • We argue that Web3 is likely to lead to the emergence of the "universal trust machine". {insert more drama}.
    • Only Big Tech can create trust in their ecosystem, which they own, and monopolise. First mechanism to create trust for everyone and for free. A universal trust machine, owned by both nobody and everybody.
    • Suggestion: The universal trust machine: [BR] a survey on the Web3 path towards realisation.
  • [35], could really use 50+ citations
  • "Trust over IP" is similar effort by engineers. How does your more fundamental scientific-view relate to this? My take: a spiced up strong identity system is not yet a trust framework. This lacks a formula to calculate trust. The concept of central "issuers" fundamentally goes against self-sovereign identity and permissionless innovation.
  • Why decentralised trust is hard, its the governance (who's the boss). "One of the ironies of decentralized systems is that they require better governance than most centralized systems. Centralized systems are often governed in an ad hoc way because the central point of control can easily tell all participants what to do. Decentralized systems, on the other hand, must coordinate across multiple parties, all acting independently in their own self-interest. This means that the rules of engagement and interaction must be spelled out and agreed to ahead of time, with incentives, disincentives, consequences, processes, and procedures made clear.", https://www.windley.com/archives/2018/02/decentralized_governance_in_sovrin.shtml
  • {observation rant} Scientists always bias towards the formula for good and evil. However, the dissemination of information about who to trust is harder to defend. Nobody publishes much on the secure dissemination of trust vectors, while the data about good and bad deeds is more difficult to protect. But less cool math.
  • No bang at the end. A table of milestones and accomplishments, we're on a path towards universal trust machine? Or shatter all hope for that.
  • any illustration?
  • master thesis: De-Google Pagerank ?

Finally: 80% coding for good in master thesis is OK. Would have a price in grade!

@synctext
Copy link
Member Author

synctext commented Nov 9, 2022

writing down your insightful coffee remark: no algorithm exists yet which balances trust and relevance.
thesis with more like phd level of depth: "Design of a semantic search engine in pure Android" {inspiration}

Practical P2P semantic search (storyline idea)

Numerous projects have designed peer-to-peer semantic search engine. Some of this pioneering work also implemented and even deployed their ideas. Yet none of this prior work in the past 20 years proved to be practical, viable, or resilient against spammer.

With Tribler we deployed a keyword search engine for Bittorrent video streams in 2006. Our work has been used by over 2 million people. After 17 years of incremental upgrades we moved beyond keyword matching and added search for concepts.
Tribler has currently basic understanding of concepts, understanding of relationships between concepts and can balance conceptual relevance with trust. Pagerank pioneered the calculation of trust, simply by counting hyperlinks. By far the most difficult part of the first practical P2P semantic search engine is trust, not search. Finding trustworthy content has become difficult as trust has eroded in our digital lives, global institutions, and society at large.

Our algorithm called SemanticTrust uniquely integrates knowledge graphs, relevance ranking, crowdsourcing, and reputation calculations. We fully implemented this algorithm in Kotlin and Internet-deployed it on a P2P network of various $100 smartphones. We demonstrate the efficiency of our SemanticTrust algorithm by running it on 100 nodes which form a P2P network. Our result show low resource utilisation, quick ClickLog dissemination speeds, SemanticTrust efficiency, responsiveness to new item discovery, and etc. etc. Grow to Tiktok sophistication. We conclude that our practical P2P semantic search engine is a key step to De-Google The Internet [see rant].

The example query used in related work 20 years ago is as follows:
"Find all earthquakes with epicenter in a 5000 miles radius of the location at latitude 60.790
North and longitude 97.570 East and find all tsunamis that they might have caused"
As our society has evolved the workload has shifted into the TikTok era of queries. Our deployed system with 2 million installs is specifically engineered and optimised for the following:
"Find content which will make me feel good".
This combination of known item search and browsing for "romantic songs" in a world of cheap spamming tools is particularly challenging.

(repeating: phd-level remarks) Above is the science, now the engineering excellence with a focus on another 17 years of relentless improvements: maintainability. The best code is deleted code 😸

  • keep implementation simple: as trivial as possible
  • Avoid fancy ideas Top-k-size keyword search on tree structured data
  • Avoid ontologies, as they led to failure of the semantic web
  • Assume all the smart ideas published in the past 20 years on P2P semantic search will consistently fail in the real world with real spam, real sub-second search user requirements, realistic poor metadata, and real relevance ranking.
  • Avoid general huge new dependencies, like https://github.com/spotify/annoy#background
  • Most advanced datastructure you're advised to use is the : The SQLite R*Tree Module for virtual tables with keywords, popularity, and trust levels
  • Obviously we today we don't have anything for performance analysis of search, so we need that tooling first. First rule of optimisation is having a single number or results graph to optimise.
  • @kozlovsky Let's invest maximum 2 days for a quick and dirty app-tester tool which measures query performance.
    • Search time for standard queries "Linux", "Linuuuuuuux", "Linux Mint", "Debian", "Sintel", "mp3", "Big Buck Bunny", "Paywall: The Business of Scholarship", "Cosmos Laundromat", "adcBicycle Malignant Cove", "Gavin Coetzee Orange Forest ", "Jesus Loves To Watch You Sleep by adcBicycle".
    • Graph displaying Query number on X-axis (1..12), time till first results, and total query response time for all refreshes.
    • Next step is to add a breakdown of performance: time to get first 10 random unordered results, network traffic parsing is costly due to a nasty bug, full text search unordered is main culprit, or is the relevance ranking with popularity weighting the main cost.
  • ToDo2: spend 3 weeks to craft dataset of Music, scientific papers, and creative commons videos. Enrich with tags. Target: measure bandwidth usage for search using Twitter, Mastodon, Google, and your work.

@rmadhwal
Copy link

rmadhwal commented Nov 18, 2022

Was a bit busy with exams the last two weeks so slightly slower progress on the literature survey:
Literature_Survey second draft.pdf
Covered most of the feedback that was mentioned last week for the first half, still need to work on a good conclusion and a table tracking "progress on road of realisation".

Except for this, spent time looking into the mentioned thesis idea, I find the storyline very interesting. Spent some time reading up the Tribler codebase too. Had an interesting discussion with @grimadas about how MeritRank could be used in a search setting, have some gaps to fill that I'll work on in next two weeks along with the rest of the literature survey. Will also start working on the mentioned ToDos.

Was asked to add this declaration here: The most interesting part of my thesis for me is building systems and reading existing code.

@synctext
Copy link
Member Author

synctext commented Nov 18, 2022

  • You have a deep understanding of SybilRank {could answer my questions as a co-author with 'academic amnesia'}. Especially the decay of good work is essential to solve. This is always costly to record and/or calculate.
  • Very impressive 9-page writing.
  • "Decentralisation and Decentralised Networks", keep your grand writing style with Hobbes and Hume longer. Suggestion: "Two digital worlds: (de)central."
  • Your "II History Background" only covers decentral and web3 in more detail, when compared to intro. Quite a fast transition from Hobbes to Internet cables. You could use the French revolution as an intermediary. More politics. To the point of utter boredom: "Local Government and the Decentralisation of Urban Regeneration Policies in The Netherlands"
  • "The concept of a “decentralised network” was first coined by Paul Baran", now you could start the (de)central network sub-section. or call it "two/three types of digital networks"
  • "recent growth of blockchain technology", the intro goes from Hobbes into the digital realm. No explicit transition like: An open question remain if trust during the enlightenment era was fundamentally different from trust within the Internet era. or...
  • "II.B Web3", decentralisation like its 1999: Napster. The decentralisation movements: P2P and Web3. "Decentralisation Winter", all 5 scientific conferences died. {your thesis advisor did the closing talk at the final edition of the last surviving venue 💀 }
  • "I. THREATS TO LONG TERM COOPERATION IN A DECENTRALISED NETWORK" suggest: THREATS TO LONG TERM digital COOPERATION'
  • is the "numerous fake identities" not the most destructive attack?
  • "IV. EVOLUTION OF COOPERATION" why not first the positive collaborative mechanism, then the fail whale
  • The reputations could use a table of academic algorithms and industrial deployments.

Master thesis: keyword search MusicDAO {practical P2P semantic search} OR learn-through-consumption {musicDAO endless TikTok-scroll}

  • concrete balance relevance with trust
  • unexplored risky world of TikTok

@synctext
Copy link
Member Author

synctext commented Nov 21, 2022

Practical P2P semantic search - related work: "Situating Search"

Beyond the critique of a few proposals, this paper
offers a broad perspective of how search systems and society have
evolved with each other and where we should go from here.
[ ... ]The system should be free of economic structures that
support and even incentivize the monetization of concepts
(such as identity terms) and allow commercial interests to
masquerade as ‘objective’ information

Solve within your Master thesis: technology as a solution to a political problem ...

@rmadhwal
Copy link

rmadhwal commented Dec 6, 2022

Progress on Literature Survey:

Literature_Survey third draft.pdf

  • Rewrote the abstraction and large parts of the introduction
  • Added more context to trust on internet vs trust in general
  • Added more reputation mechanisms
  • Moved sections around to improve the overall flow

Still Pending:

  • Illustrations and more mechanisms for creating trust (will add fault detection mechanisms)
  • Table summaring all the covered mechanisms
  • Good conclusion to tie everything together

Work on Thesis these last two weeks:

  • Spent some time going through MeritRank's code and understanding the various attacks/graph based decays
  • Looked at and understoof the new MusicDao impementation
  • Spent some time thinking about how MeritRank/embedding based relevance algos could be used to create trust. Initial idea is to use Neo4j as a graphing library: would scale very well and seems to fit our use case really well

@synctext
Copy link
Member Author

synctext commented Dec 6, 2022

  • "read, publish and interact with content", not just content. Monopoly on the entire online world.
  • Figure 1: mention this is the cardinal 1964 architectural insight
  • "III. EVOLUTION OF COOPERATION", swap with prior chapter
  • "II. HISTORY AND BACKGROUND", 'Decentralisation and Web3' ?
  • "One of the foundational works investigating how cooperation can emerge and persist" insert another opening line. More Hobbes-like: from the dawn of civilisation the history of humanity is filled with conflict, destruction, and war. Peaceful cooperation has been the yuppie hippy dream like forever. Now we build this digital utopia, keep reading :-)
  • Sourcecred: study and mention???
  • Currently you bundle all existing knowledge very nicely. The most difficult challenge is to add new insight.

Master thesis ideas:

  • "Open source TikTok alternative based on multidimensional trust in taste, relevance, and honesty"
  • "Decentralised search engine with attack resilience", musicDAO
    • scientific angle of thesis: balancing relevance and trust
    • Brian his code is not {yet} within main repo. We need a PR!!! @brian2509
    • Emulation: clicklog generation, user modeling. Unsupervised: no dataset!
    • idea: content enrichment, knowledge graph ontology free: tags, crowdsourcing, search boost.
    • Fix "smooth jazz" and "happy hardcore" search problem with non-matching Creative Commons Bittorrent swarms
    • Polished MusicDAO for actual usage and field experiment launch: May. June processing and finish thesis.
    • Docker Android Alpine for 10-100 emulation edge devices, https://github.com/alvr/alpine-android ???
    • First step: actual music, Bittorrent, tags, Clicklog

@rmadhwal
Copy link

rmadhwal commented Dec 7, 2022

Brain Dump of discussion today:

Tentative thesis goal: Top N recommendation system similar to
image

The order of recommendation will take into account a combination of two values: trust and relevance.

Trust value is created using a reputation mechanism which uses MeritRank, for this:

  • Create a user/item graph as accounting mechanism. Each user potentially "owns" a items they interact with a certain weight value associated with each. This weight value is determined by: a) number of times item is played b) amount of time the item is interacted with/proportion of item played with some discounting to make sure that shorter items are not biased c) possibly explicit feedback mechanisms like like/dislike. The final authoritative list of items owned by the user will then be top x items with highest weights assigned to them.
  • Exact model still needs to be fleshed out, the model will establish how discovery occurs in the network. Intuition will be to initially bootstrap some items then use other owners of those items to find other items for recommendations.
  • Need a boostrapping mechanism which allows serendipity, new users to discover items. Possible suggestions is having a list of fixed "divisive" items suggested to new users which allow easy determination of their taste
  • Weights/Click Logs are gossiped around using a semantic cluster mechanism where changes are propogated to a certain list of users, with half users being users with similar taste and half random users

The relevance metric is less fleshed out but also of secondary importance for the thesis since we can argue that it is a black box and can be substituted out for any other ML/non-ML model. For the first iteration, maybe just use item similarity with current items of the user to generate this.

What will be important is how we choose to combine the score obtained for relevance with the trust value to decide the ordering of recommendations.

Let me know if I missed or misunderstood something @synctext @grimadas

@rmadhwal
Copy link

Hopefully final version of my literature survey

In this cycle, I spent some time slowly extending the current MusicDao implementation to have a recommendations tab.
Also, I also looked at practical ways of implementing MeritRank and discussed a method with @grimadas of reudcing the Random Walk to matrix multiplications which would allow an infinite time horizon, similar to EigenTrust's implementation. Will work on fleshing this out more in the coming weeks.

@synctext
Copy link
Member Author

synctext commented Jan 11, 2023

Great literature survey! Ready for arxiv uploading.

For With Honors thesis: think about convincing your thesis committee that your did great science: "Algorithms 1" awesomeness.

ToDo: convert comments on this issue into your first thesis chapter: "Problem Description", IEEE format, thesis skeleton.

addition, thesis title brainstorm:

  • Web3Recommend: the first trust-aware algorithm for Web3 recommendations
  • Learning by Consumption: balancing trust and taste within Web3 recommenders
  • P2P recommedations for Web3 with trust and taste optimisation algorithm
  • Optimising trust and relevance for Web3 recommendations using peer-to-peer architectures

addition2: how about always showing the recommender as the MusicDAO frontpage. First sorted by popularity. Using learning-by-consumption you sort by most recommended song as user plays stuff.

@rmadhwal
Copy link

Survey is on Arxiv
I've forwarded email with password for you to claim ownership.
Thesis Problem Statement as requested

@synctext
Copy link
Member Author

synctext commented Jan 19, 2023

Great work! (Source: “Universal Trust Machine”, https://arxiv.org/abs/2301.06938):
image

Somewhat Related work: TasteBuddy-based Version Selection Strategy for BitTorrent Users against Content Pollution

Creative Commons dataset of actual music, actual Bitcoin wallet for donations, tags, and metadata
"An error occurred accepting the competition rules."

http:https://archive.ics.uci.edu/ml/datasets/FMA%3A+A+Dataset+For+Music+Analysis goes:
http:https://archive.ics.uci.edu/ml/machine-learning-databases/00386/fma.txt points:
https://github.com/mdeff/fma finally:
https://os.unil.cloud.switch.ch/fma/fma_full.zip Creative Commons 106,574 tracks from 16,341 artists
Social data: http:https://millionsongdataset.com/sites/default/files/thisismyjam/jam_to_msd.tsv http:https://millionsongdataset.com/thisismyjam/
20000 music samples with instruments used metadata

~>curl -O https://os.unil.cloud.switch.ch/fma/fma_full.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  878G    0 27.1M    0     0  2024k      0   5d 06h  0:00:13   5d 06h 1923k^C

Conclusions: you can spend 90% of your AI time on data engineering! Solution: shortcut with 106,574 tracks

ToDo: state-of-the-art in content recommendation (Collaborative Filtering)?
https://datajobs.com/data-science-repo/Collaborative-Filtering-%5BKoren-and-Bell%5D.pdf
ToDo2: first attempt at recommendation in Superapp

@rmadhwal
Copy link

rmadhwal commented Feb 7, 2023

Spent the last two weeks researching Collaborative Filtering and coming up with a high level strategy of how recommendations would be implemented in the Superapp.

After reading existing methods, I think the approach we should take is: Distributed Probabilistic Memory, User Based Collaborative Filtering inspired partly by this paper

  • Using a probabilistic method allows us to make predictions about taste for a user by only using the taste profiles of a subset of users (using gaussian assumptions). This allows for a small communication cost.
  • Memory based methods would work best for us since model training is expensive and the dynamic nature of the network would make it quite tough anyway
  • User Based Collaborative Filtering makes it so that we only rely on user's ratings to make our predictions, in the case of MusicDAO we can use something like (time song listened to/song duration) to determine an implicit rating of a song.

The cited paper uses the below for its new user profile constructions:
Screenshot 2023-02-07 at 8 49 36 AM

This approach needs to be adapted to work in a distributed context, i.e. instead of a database we will have gossip about various user profiles, but except for that we can use this formula to construct a first minimal working implementation.

@synctext
Copy link
Member Author

synctext commented Feb 7, 2023

Main thesis focus:

  • balance trust and relevance
    • Baseline performance
    • Specific Item pollution Attack
    • Epic Sybil Attack
  • probabilistic collaborative filtering for Web3 decentralisation. You found great old article from 2004, after reading 100+ papers! Probabilistic Memory-Based Collaborative Filtering
  • Machine learning, K-Means clustering?
  • implicit affinity, use time_till_swipe_away as the cardinal metric for frictionless derived user preference.
  • Signed profile updates: gossip to solve the "peers are mostly offline" problem. (Magnet link as content ID, mixing content recommendation, content discovery)
  • minimal user interaction: landing page of "Recommended For You" plus more hidden "history tab".
  • New user initiation (bonus): cold bootstrap problem of "divisive content" to split between jazz, hip-hop and rock (this is a secondary balance problem: not too mainstream, not too obscure).
  • Explanatory recommendation? (Out of scope?) Explain why its recommended, also show profile of other people with their (full) music taste?
  • "Evaluation and Experiments", how can we compare this work to prior art? Re-implement classics and compare the performance?
  • "Performance Analysis": how to both integrate in Superapp and run the recommender within cmdline Kotlin mode?
  • Can create .APK from Brian branch and run in emulator

Excellent recent work from EPFL:

Sprint Target: get baseline implementation working and post screenshot from emulator

@synctext synctext changed the title master thesis placeholder - ?? self-repairing, self-healing, indestructible Web3 platforms ?? Web3 recommendations: balancing trust and relevance Feb 7, 2023
@rmadhwal
Copy link

rmadhwal commented Feb 23, 2023

In this sprint I designed and implemented Flooding based Distributed Memory, User Based Distributed Collaborative Filtering v1.0. The following is an overview of how it works:

  1. When a Node requires n recommendations it sends out n GatherRecommendations requests to n neighbours, the request contains: the Node user's ratings for all songs that they have listened to (so no privacy yet), a unique UUID identifying the request, the number of hops the request has crossed and the maximum number of hops for the request
  2. Each Node forwards the request to n - 1 other randomly selected neighbours and locally calculates a Recommendation object consisting of: a) the Node's user ratings b) intersection the number of intersecting songs with the request, if intersection > 0: c) Pearson Correlation Coefficient d) Common Preference Degree e) Rating Difference of Common Item (based on ideas from this paper)
  3. Once the request reaches the maximum number of hops, the Node simply does the calculation and returns the result and does not forward the request
  4. After the neighbour Node recieves all n - 1 responses (or after they time out), it compares the n Recommendation objects it has with:
    image
    Where DSim is trivially calculated with rating difference of common items and Nsim is
    image
    image
    In this case the max value is calculated using the maximum of the subset of all Recommendations recieved.

The Recommendation with the maximum value is returned by the Node.

  1. Finally in the node the request originated from, using the n recommendations it has recieved, Recommendations are calculated using:
    image

Note that in the case that the Node has no items listened to or any common items with any other users, this is not better than a random selection, so the cold start problem still needs to be tackled, also the Beta paramater needs to be tuned. I was able to find the dataset for the Million Songs Challenge (in fact the motivation for using a memory based algo was from the winning submission)

I will try to get some simulations running with this data to see if I can compare it to benchmarks, obviously, this algorithm is not guaranteed to calculated globally optimum recommendations, however, since each node only has to perform a single computation against its user ratings, it should work quite fast in a distributed context. While I have implemented the algo, I haven't plugged it into MusicDAO yet because I've been having trouble getting the creative common content working or being able to seed music to other users. Getting the integration and some simulations working will be the target of my next sprint.

In the above, the "ratings" are implicit ratings which are calculated using a mixture of: a) number of plays b) time each song c) total song "listen" time, thus giving an indication of the user's "value" of the song based on the amount of time they have invested into it

@synctext
Copy link
Member Author

synctext commented Feb 23, 2023

  • target audience: https://www.frontiersin.org/research-topics/19653/user-modeling-and-recommendations ?
  • not a unnatural joining of relevance and trust: add two numbers
    • unified trustworthy semantic clustering
    • score with emergence and balance between both relevance and trust.
    • graph mathematics: trust graph and user-to-user similarity graph. Edge-based, abstract beyond item graph.
  • two architecture to compare
    • remote computation and recommendation
    • local-first computation, information exchange, and semantic clustering
    • can you reason about the trust and taste of offline peers? (traverse graph, even when nodes offline)
    • continuous learning. assume the networked is always converged
      • newly joining peers find their taste buddies
      • Introduce-peer mechanism. send your (small) profile to any peer and they will give you an introduction to their best matching taste buddy. First random walk with fast convergence. Avoid semantic DHT as the plague for security/Sybil/spam/ddos reasons.
    • atomic: no connection with storage layer collaboration. Meritrank is based exclusively on content discovery with help of another peer and successful playout of this content by user (implicit approval).
  • lack of co-occurrence and any overlap?? Sparseness problem
  • 4P: Performant Private Peer-to-Peer File Sharing from 2014 to query for files without resorting to flooding
  • Assume: everybody has a database of cryptographically signed ClickLogs (magnet links + playout count with duration)
  • Peers can be offline. When online they spread their latest profile to online peers with highest semantic nearness (taste buddies concept from 2005)
  • Every online peers maintains an active connection with a few dozen taste buddies
  • scalability analysis
    • When network is smaller than 1 million users, everybody can nearly store complete profile (subsampling)
    • Beyond 1 million we have (irrefutable) semantic clustering
  • think about experimental section and performance evaluation
  • Challenge: 1 math model of trust and taste. Keep as simple and elegant as possible. axiomatic principles Einstein envy 💥

@rmadhwal
Copy link

rmadhwal commented Mar 6, 2023

Mid sprint progress (I've iterated through many ideas this week so I figured I'd post a small update with my current state of the algorithm):

  • Implemented a semantic/trust graph which stores information on the global state of who trusts who. Ended up using JGraphT for this, has excellent algorithm and serialization/deserialization support. I can succesfuly save/share graphs with other nodes.

Updated idea for how the distributed recommendation will work:

  • Each peer stores a Trust graph which indicates: a) the state of trust relationships in the whole network b) the individual recommended items for a subset of top n peers that they trust. (Trust information is relatively cheap, and even for a million users we're looking at a few MBs which should be reasonable, the number of items on the other hand is expensive, though realistically you'd never need this information for users you don't trust since they will never give you recommendations). Further, I am using a slightly customised DIMACS format which allows incredibly compact representations of trust graphs which in combination with UTF-8 encoding and gzip compression ensures that potentially massive trust graphs can be easily transferred with the EvaProtocol in a few seconds (ideally this will only be required the first time a node joins the network)
  • Trust graphs are shared between peers and each peer can calculate a
    UserTrust score for all available (read: online) peers. In order to calculate this trust score I was exploring the famous EigenTrust algorithm, but the requirement of pre-trusted peers seemed like a dealbreaker, on further research, I discovered your old paper which built upon the intuitive notion of using social connections instead of pre-trusted peers.
  • However, this is still too limiting because not all users will have social connections. Hence, I came up with the idea that in a scenario where a user does not have any social connections, the "pre-trusted peers" can instead be constructed through random sampling of similarity values i.e. query the network with your profile and pick top 10% similar users. (Note that we don't actually have to query each node, querying a few nodes should be enough since they have information about items for other nodes)
  • The obvious downside of this approach is that this gives power to sybil attacks where an adversary can construct a profile almost entirely similar to yours but with a few items they want to target you with. However, this can be countered easily by introducing a new notion:
  • ItemTrust: similar to how we calculate an aggregated value of trust for each user, we can also calculate an aggregated value of trust for each item. So in essence, we're separating trust in users/items. A "trusted" user is a user who has a similar taste to you/has given good recommendations in the past but not all the items they recommend have to be trusted. In order for an item to be recommended, the user who recommends it needs to be trusted AND the item needs to be recommended by a diverse variety of users (i.e. not just a sybil collective or a single user)
  • MeritRank principles can be used in calculation of both UserTrust and ItemTrust so items that are only recommended by a sybil collective will be less trusted than items which genuine users recommend

Following the above principles, the flow for a new user who joins the network:

  1. Constructs an updated trust graph for itself (with no item information as of yet)
  2. Constructs its set of p pre-trusted users: In case it already has social connections it trusts (friends/famous personalities), these can be used as the pre-trusted peers. In case no or limited social connections queries network for similarity matches
  3. Calculates global trust/similarity values using enhanced EigenTrust for all online users and contacts the top k trusted users (i.e. with highest UserTrust values), each user gives it item information for n/k users that are the best match with its profile. (so we recieve a total of n users)
  4. Caclulates recommendations based on the n users by ranking unseen items through a combination of : a) user similarity + rating (enhanced pearson correlation coeff discussed in earlier comment + impicit listening time + explicit thumbs up/down) b) UserTrust c) ItemTrust
  5. Recommendations are voted on with thumbs up and thumbs down, this is used to update local trust values (and hence also the calculation of global UserTrust/ItemTrust)
  • Hence, even if we end up in a scenario where the recommended similar user is a user who is targetting us/a sybil, the "poisoned item" that they attempt to recommend to us won't be recommended because the network as a whole won't attest to it

Problems to be figured out:

  • How to calculate UserTrust and ItemTrust in a continuous and iterative manner. "UserTrust" is a combination of a user's taste and past experience, current idea is to use modified EigenTrust where pretrusted peers are based on similarity values. "ItemTrust" on the other hand could be calculated using a local flooding approach where we flood all trusted nodes, the flood starts off with a certain "power", the power is divided among neighbours proportial to the trust placed in them (the power also decays according to MeritRank principles) when a node is visited by the flood, the trust values of items it trusts are incremented (or decremented if the user doesn't trust the item). Finally, ItemTrust values could be averaged through gossip to obtain a global ItemTrust vector.
  • How to formulate the sybil resistance provided by the the combination of "UserTrust" and "ItemTrust" in a mathematical manner so that we can show that the benefits provided to an adversary through constructing sybils/fake profiles are counterwighed by the cost imposed by our algorithm
  • How to keep the trust graphs in the network in sync. I have introduced a notion of "versions" in each edge, so there's a simple way to see when data is outdated, however, gosipping changes is not trivial, we need to consider the scenario where users are offline and come online, how do they "discover" how outdated their graph is efficiently (i.e. potentially without a brute force based comparison). i.e. need to think of an efficient data structure which allows "simple and efficient diffing" of two trust graphs

@rmadhwal
Copy link

rmadhwal commented Mar 13, 2023

Update to the above: On further consideration I realised that calculating UserTrust using highest similarity peers as "pre-trusted peers" is problematic. Instead, I am now leaning towards performing a "Distributed Page Rank" combined with EigenTrust which is used to generate a concensus on "top x online trusted peers" at any time in the network (recalculated as trusted peers go offline) which can be used to introduce new nodes to the network.

Further, I have created a first version for a formula which reflects a user's trust + similarity to a certain item.

The function will take as input two parameters: 1) explicit like or dislike (a lack of either can be viewed as an implicit like) 2) gamma: playing time of the song compared to total playing time of all songs

The formula is a piecewise function that can be viewed here. The function maps the above parameters to a value between -inf and +inf. The inuition behind this formula is as follows: there are 4 possibilities:

  1. A user "likes" an item and listens to it a lot (high gamma): this is one of the user's favourite songs, the function will yield a large positive value
  2. A user "likes" an item but doesnt listen to it much (low gamma): this yields a small positive value since while this is a "trustworthy" item, the similarity of the song is lower than the user's other items
  3. A user "dislikes" an item but listened it to a large amount: The user gave this song a try but it is simply not their taste. This indicates that the value judgement of the song was based on the user's similarity rather than the item being inherently untrustworthy. Hence, this yields a small negative value
  4. A user "dislikes" an item and barely listened to it: The content of the item is potentially untrustworthy since the user barely had to listen to it to determine it is "bad", therefore, yields a large negative value

Of course the above can be exploited for "review bombing" by sybils, which is what we hope MeritRank will help mitigate

@synctext
Copy link
Member Author

synctext commented Mar 14, 2023

  • Implemented a semantic/trust graph, graph sharing on top of IPv8 works! 🚀
  • asked for a machine learning consultancy, how to output exact hashes with ML 😅 {??? multinomial classification ???}
  • Mark as Spam, makes it explicit. Taste and trust should not be slammed into a single variable. Information loss. Spam is also a spectrum: plain misleading, bad recording, cover band recording, noisy recording, live recording in the rain, Taylor Swift masters re-recording for justice, etc.
  • "Justin Bieber is Gay" example
    • spam is harshly punished versus disliked content
    • mixing trust and dislikes creates problems
    • Explicit item trust (mark as spam) implicit item trust (nobody ever could endure viewing for more than 4 seconds)
    • Especially difficult for divisive content.
    • see example "Justin Bieber is gay" scientific problem - tag spam
  • Input: user-item profile and pre-trusted users {e.g. trust genesis blocks }. Calculate: User-to-user trust graph, item-to-item similarity graph. Produce: item trust!
  • Thesis experimental section. Big Choice:
    • classical simulator-only
    • Full Android. Operational and deployed perhaps {current target}
      • Hot immature decentral TikTok videos {decide early Q4}
      • Deployed MusicDAO

@rmadhwal
Copy link

rmadhwal commented Mar 27, 2023

Mid-sprint update:

I have devised a hybrid Personalised PageRank - Personalised SALSA algorithm for the ItemTrust calculation which uniquely combines the taste of a user's semantic neighbours' taste and the user's trust in other users to quantify how much the user trusts an unseen item.

The algorithm is inspired by GraphJet, the algorithm used by Twitter to generate real time recommendations for Tweets.

The original algorithm is a random walk based monte carlo estimation of user-item similarity which uses SALSA, the below illustration demonstrates how it work in Twitter:
twitter

The flow of the original random walk is below:

  1. Construct a bipartite graph with users on the left and items (songs) on the right
  2. From a "seed set" (which consists of either the user or highly trusted user) randomly jump to an item with uniform probability
  3. From the item, with uniform probability jump back to a user who likes the item, repeat 2) with this user
  4. At any step, with probability alpha jump back to a user from the "seed set"
  5. The recommended items are the items that have been visited the most over repeated random walks

For the distributed implementation, the above approach will be modified in a few ways:

  1. Instead of uniformly jumping to item from user as above, we will jump according to the user's taste preference as calculated from the formula we discussed before
  2. Instead of uniformly jumping back to a user from an item as above, the weights back from an item to user will be based on UserTrust values (calculated using MeritRank enhanced Personalised PageRank earlier in the node to node network), this way we can ensure that you're more likely to visit non-sybil users (since they should in theory have higher UserTrust values)
  3. The "scores" of each item will be modified according to MeritRank values providing further sybil resistance
  4. Instead of naively recalculating all random walks every time we have a new node/edge, we will store all random walks for a node and only iteratively recalculate "dirty" random walks

Further, in the original algorithm we want to guarantee "recent recommendations" hence only "x most recent" interactions are stored (to guarantee freshness). Similarly, our algorithm will guarantee freshness of recommendations by only storing "x most recent edges", this will also ensure our storage isn't burdened.

Each node will periodically gossip a random node and its taste profile (read: song recommendations). This "edge gossip" mechanism will be weighted by the recency of the recommendations i.e. an edge with a newer timestamp is more likely to be gossiped, but older edges can also be shared with a low probability. Once a node receives this gossip, if it has at least one item in common with the gossiped user and room for more profiles, it simply stores the user. If it does not, it calculates a score weighted by: a) the similarity of the user b) the freshness of the recommendation (timestamp of the recommendation) and if it's higher than the lowest node in the user to item network, the new node is marked to be added to the network. After the "to be added" nodes reaches a certain threshold (x) we can batch remove x nodes and add x nodes, recalculating all dirty random walks. This ensures that we aren't constantly recalculating RandomWalks and since there is bound to be overlap between dirty nodes in dirty random walks, should be more efficient too. The gossip is also made "less random" with the following mechanism: with probability "beta", instead of randomly gosipping, look for two nodes in your network which have at least one item in common and gossip their profiles to each other.
Note that beta needs to be tuned since there is a high possibility that the users already have each other's profile and we also want to incentivise "serendipity".

Further since each random walk is caclulated independently of each other, it can be easily parallelised (also potentially distributed across similar nodes - but that's probably beyond the scope of this thesis)

Hence, each user will store two graphs: 1) A Node to Node directed graph which indicates its trust in other users, used for calculation of UserTrust through Personalized PageRank 2) A bipartite undirected Node to Item graph which indicates its taste in items, used for calculation for ItemTrust through the hybrid algorithm mentioned above.

As a further optimisation, the node to node graph can be stored on disk and only fetched to memory when we need to recompute Personalised PageRank, while the node to item graph which only contains a subset of the nodes in the first graph can be always kept in memory since it's much lighter and queried much more frequently.

Cold Start Problem: A global PageRank can essentially mathematically shown to be the result of averaging each user's Personalised PageRank. Thus a consensus mechanism across all nodes can be used to indicate "top trustworthy online users". A fresh user will simply share its taste profile with these top trustworthy users who will return semantically similar users to be added to its Node to Items network. As we slowly determine the user's taste as they listen to more songs, the gossip mechanism will ensure that it will slowly replace semantically similar in its network with those that are dissimilar.

Update to above: I'm done implementing the graphs mentioned aboved, currently working on implementing Personalized PageRank. Once that is done, I will proceed with implementing the hybrid algorithm above.

@synctext
Copy link
Member Author

synctext commented Apr 3, 2023

  • no tags in MusicDAO. keep it simple: just re-sort the MusicDAO looong content list. Personalise.
  • Recommend to do a first Problem Description writeup in thesis format

@rmadhwal
Copy link

rmadhwal commented Apr 24, 2023

Progress for this sprint:

image

The last two weeks I narrowed done the focus of my thesis through some reading and realised the most significant aspect of recommendation systems in Instagram/TikTok is the ability to generate "fresh" recommendations. i.e. while similarity is important, what is more important is to act on "recent signals" (where signals are interactions of users with songs), this is also the most significant aspect of the algorithm that my system is inspired by: GraphJet.

In the original algorithm, this involves deciding a "time window" and only considering interactions of users with tweets inside it. Practically implementing this for our system requires two things: 1) an edge gossiping algorithm that prioritises gossiping newer edges and 2) a mechanism to remove edges older than the time window. All edges already have a timestamp associated with them so I came up with and implemented a novel "time-biased gossiping algorithm" as below:

  1. The gossiper collects all interaction edges in the network
  2. All edges older than the decided time window are removed
  3. The oldest edge in the new set of edges is found and in a new vector we calculate the "deltas" of the timestamps of the remaining edges compared to the oldest edge and then caclulate its softmax

This allows us to assign weights to each edge biased by their recency to ensure that our gossiper is more likely to gossip newer edges, yet in order to keep the network in sync, older edges are also gossiped.

After implementing this, we face a similar issue to the original algorithm that often old users will find that they have no interactions (since they haven't consumed any content recently inside the time window). GraphJet solves this by conducting random walks from a pool of trusted users. I introduced a dynamic "exploratory probability", this probability determines if the SALSA random walk should start from a non-root node instead, the choice of non-root node is based on the personalized page rank calculated earlier, so in effect we are also choosing trusted nodes to start the walk from, but also allowing a certain amount of "serendepity". This probability will change depending on how many interactions the users has inside the network, so in the extreme case where the user has no interactions it will be 100%, this in effect also helps to partially solve the cold start problem.

Beyond this, I have also been thinking of a set of experiments to further verify certain properties of the system:

  1. Scalability: The current implementation requires storing all node to node and node to song trust information in memory and conducting random walks. The most important aspect will be to measure memory consumption and time taken to generate recomendations as we grow to a million users/thousands of songs
  2. Sybil Resistance: In MeritRank the MAPD values for increasing values of beta and alpha decays is calculate to show the reducing benefit to the attacker of using sybils, I plan on conducting similar experiments with a network created from the Million Song Dataset
  3. Gossip Efficiency: I would like to measure how many rounds it takes to synchronize different nodes with systems of different size through the gossiping algorithm mentioned above

Other pending items:

  1. Similarity metric for new users to find other trusted users for their first interactions - I will use the improved pearson correlation coefficient that I designed earlier
  2. Integration with either MusicDAO/the TikTok app
  3. Start working on writing my thesis :)

@synctext
Copy link
Member Author

synctext commented Apr 24, 2023

  • Making progress to a July graduation!
  • Combining a random walk-based recommender with a walk-based reputation algorithm
    • sounds like a trick
    • How to sell this as a profound scientific achievement ??? {luckily I don't need to answer this...}
  • SOLVE: Decentralised Web3 recommendations surrounded by Sybils and byzantine faults
  • "Giga-Sybil experiment" == 99% Sybil
  • Source code of evil Twitter bots: https://www.floriandaniel.it/papers/MillimaggiICWE2019.pdf

@rmadhwal
Copy link

After discussions with @grimadas, I ended up designing multiple set of experiments to run on our recommendation system. The two most important being: 1) Influence on sybils in top x ranking after increasing the decays in the system 2) influence on the relevance of the rankings as we increase the decays.

If the system works as it is supposed to as we increase the decays is 1, we should see less sybils in the system, but also see a lower relevance since our aggresive tactics would mark a lot of non-sybil recommendations as sybil too, thus degrading their ranking.

In order to run the experiments, I constructed a sample TrustNetwork out of a subset of data from the Million Song Dataset which consists of 400000 songs, 50000 users and their interactions (read: play counts). The user to user trust in the network was bootstrapped by adding 5 edges to most similar nodes together using the improved pearson coefficient we will use for bootstrapping new users into the network, the node to song edges were made using affinity.

For experiments in 1, I made 30% of the nodes in the network sybils and randomly carried out either linear, cycle or parallel sybil attacks through them, randomly adding 1 to 5 sybil nodes to them (therefore, carrying out the Giga Sybil Attack we spoke about). After this, I carried out the personalised recommendation algorithm on a 100 random non-sybil nodes and measured with increasing decay parameters: 1) How much ranking score sybil songs gained overall 2) The score of sybil songs in: Top 100 Ranking, Top 500, Top 1000 and Top 5000 (Because are main objective is the user's "Ranking Table" and removing sybils from it, so this metric effectively conveys what we need to test. The results of these experiment are shown in the graph below:

image
image
image
image

As expected, as we increase decays, the number of sybils goes down dramatically. So this shows that our random walks are capable of detecting sybil nodes. Here is a more zoomed in view with lower z axis values which shows the micro difference between Beta Decay (from MeritRank) and the Exploration probability I introduced:

image

I also carried out statistical tests to show the impact of both parameters numerically.
The results also line up from what I expected from intuition, in that for low values of beta decay, increasing exploration probability actually increases the number of sybils. This is because exploration probability increases reliance on the trust values from personalized page ranks, however, with low beta decays, the personalized page rank do not decay the sybils properly, hence the exploration probability ends up increasing the chance of visiting sybil songs.

Next, for tests in 2), I found a similarity metric for comparing two sets of rankings in this paper. It's called the "Ranked Biased Overlap" and is in effect an improved Kendal Tau for lists which do not necessarily share all items and ends up biasing ranking differences near the top. I ran experiments on the base network with increase amounts of decay and compared how much the ranking changes as we increase decays, here are the results:

image

As expected, with increasing decays the similarity drops, but notably the similarity does not change too much (expect for high values of exploration probability), this is a good indication that non-sybil rankings are not too heavily influenced by our decay parameters.

I also carried out ANOVA and regression tests to show the significance (and non-significance) of the various decay parameters in the experiments.
Next, I need to carry out "scalability" tests to show that the system resource size remains small as we scale to over a million users and that edge gossiping can effectively convey changes in the network quickly (should be relatively trivial).

I have also started working on a thesis draft though I did not have much time between running and rerunning experiments so here's a very early draft with a basic skeleton of what I expect: Thesis_first_draft.pdf
Here's also the ipython notebook with analysis of my experiments:
ipy.pdf

@synctext
Copy link
Member Author

synctext commented May 15, 2023

  • Impressive progress yet again
  • Pressure for graduation before 1 Aug 2023!
  • linear, cycle or parallel sybil attacks, as defined within the Bullat vocabulary 😄
  • sybil,non-sybil model OR gullible, sybil, honest model.
  • I made 30% of the nodes in the network sybils and randomly carried.
    • make a general mode, much more scientific: number of attack edges the attacker controls
    • number of nodes which are behind those attack edges (even n-hops deep)
    • keep the 99% sybils simply steady :-)
  • 2nd experiment, no attacks going on; so simply measuring false positive impact
  • First draft title: "Web3Recommend Decentralised Web3 social recommendations with trust and relevance balance"
  • "Web3Recommend: Web3 recommendations with both trust and relevance"
  • Would use stronger SEO scam, fraud-for-profit as your thesis motivation
  • Write the abstract as an abstract 😃
    • Social Recommender System for Web3 platforms == Web3Recommender
    • "In this paper, we present a novel decentralized Recommender System that balances trust and relevance in its recommendations by combining GraphJet"...
    • becomes: "Our Web3Recommender balances trust and relevance by combining GraphJet"...
  • Tone down, not just 1+1 thesis. Inspired by the GraphJet and Meritrank algorithm we devised a novel, foundational, groundbreaking, etc.
  • more science: Our Web3Recommend architecture is the first to combine a random walk-based recommender with a fully decentralised reputation algorithm also based on random walks.
  • Sybil resistance is cardinal to our design... Monte Carlo magic...
  • No boring long lines: "In order to quantifiably demonstrate the trust-relevance balance in our system, we conducted experiments on our system using data from Kaggle’s ”Million Song Dataset” and showed that with the right hyper-parameters our system can effectively remove sybils/spam from top recommendations while not greatly harming the relevancy of non-malicious recommendations."
  • Thesis draft
    • No 3D plots please (unreadable)
    • No "Problem Description"
  • Ambition: getting Web3Recommend fully implemented inside MusicDAO 💥 🥴 🎉

@rmadhwal
Copy link

rmadhwal commented Jun 5, 2023

Integrated Web3Recommend with MusicDAO in a "Discover" section Disclaimer: Since the only device running this is my phone, you will only see one recommendation so far (which is not playable since torrenting across super apps doesn't quite work 🥲 )

https://github.com/rmadhwal/trustchain-superapp/releases/tag/2

Based on feedback from last week and discussion with @grimadas, new set of experiments and new set of (non-3d) graphs:

  1. I altered the recommendation system considerably, now it is "inspired" by GraphJet and still uses personalised SALSA but in a more "constrained" manner. The first set of experiments proves that this new algorithm can generate reasonable relevant recommendation. In order to do this I sample 100 root notes in the test network and randomly remove a song that they really like, then I run the recommendation algorithm to see where the "missing song" shows up in the recommendations, graph showing the result for this experiment:
    image

Interpretation of results: With alpha decay set to 0.1, in more than half of the root nodes, the missing song is within the top 100 recommendations (the dataset consists of 300k songs so this is top 0.0003% of the results) and about 80% of the times it is in the top 100k (top 33% recommendations)

Then I compared the new algorithm with Vanilla GraphJet for varying alpha decays:
image
image
image
image

As can be seen from the graphs, the algorithm performs just as well or much better than GraphJet (except for a few Alpha Decay values where the top 100 % differs by a small amount). Notably, for 0.1 Alpha Decay there is almost a 20% difference!

  1. Ranked Biased Overlap with increasing Alpha and Beta decays i.e. false positive impact
    image
    image

As can be seen from the results, the false positive impact seems to increase a lot more with increasing Alpha Decay, while increasing Beta Decay seems to have an almost negligible impact. Thus, a low Alpha Decay such as 0.1 and a high Beta Decay such as 0.8 seems like a good recommendation for the system if they can also provide sybil resistance.

  1. Impact of a single sybil attack on recommendation: Here we attempt to measure the impact that a single malicious user can have by creating multiple sybils, the goal of MeritRank is to reduce this to a constant i.e.
    image

So if our implementation is correct we should observe this.

First, without any alpha decay to confirm that a linear attack can indeed cause a lot of nefarious ranking manipulation without MeritRank:
image
And with Alpha Decay showing that we can show sybil resistance:
image
Similarly for Beta Decays with parallel sybil attacks:
image

  1. Impact of a giga sybil attack on recommendation: The goal of this experiment is to show that even in a network very massively infested with sybils, we can limit the impact of the sybils and provide trustworthy results. Attack Mode: 50% attack edges (doing 99% makes it so that the only items random walks discover are sybils and hence we can't really show anything too reasonable). An attack edge randomly consists of either a linear, parallel or cyclic sybil attack as mentioned before. The depth of a linear attack is 10 nodes deep and of a parallel/cyclic attack is 2 nodes deep (since we have already shown that sybil attacks can't benefit from increasing nodes any further, this is a reasonable number)

First, with increasing Alpha Decays:
image
image
image

Next with increasing Beta Decays:
image
image
image

Note the formula for calculating the scores in ranking is based on adding up the ranks of each sybil items. So in top 100 recommendations if item #1 is a sybil, that would contribute "100" to the sybil score and so on.
These experiments clearly demonstrate sybil resistance as well as relevance in the generated recommendations.

Beyond this, I also have ANOVA analysis which demonstrates that Alpha and Beta decay can confidently limit the impact of sybils on recommendations.

Pending: Experiments for scalability, however since the implementation is already done, these should be relatively trivial and involve very simple measurements. I will measure memory impact with increasing users to demonstrate that the algorithm is reasonably scalable.

Progress on thesis draft: second_draft.pdf Rewrote the abstract based on suggestions and considerably rewrote the intro and added a problem description, however, still not as refined as I want it to be. Will focus on getting this done for the next sprint.

@synctext
Copy link
Member Author

synctext commented Jun 5, 2023

  • {repeating} Impressive progress yet again
  • "Impact of a giga sybil attack on recommendation", please show how good your algorithm is. There is no shame on showing it collapses. Increase the size of the Sybils from 50% to 100%! Like: 'in this experiment we deliberately increase the attack until there is only Sybil in the network. This final experiment determines how strong the Sybil attack can grow in our algorithm without collapse'.
  • [ ] The live "release testing" fails to work sadly
    • Do you have unit tests? YES
    • Do you have end-to-end system tests? No, nothing like that exists in MusicDAO
    • "torrenting" seems broken, releasing a new albums fails (content injection, DHT stuff; normal downloading works)
  • The live "release test V2" works ! 🚀 🎸 🚀
    • instant crash when doing a release, without release date 😆
    • FIRST ACTUAL RELEASED MOBILE APP of decentralised AI-DAO (random-walk based "machine learning") 😲
      • unstoppable DAO without any central element
      • AI is very rudimentary Monte Carlo machine learning (ToDo upgraded to Bayesian)
      • inglorious "Hello World!" screenshot

@rmadhwal
Copy link

rmadhwal commented Jun 19, 2023

First semi complete draft

Still have to complete 2-3 mini sections, most notably experiment results need to be interpreted, boostrapping mechanisms need to be added and a good conclusion is needed. Also needs more polish (and much better formatting).

But this should give a pretty decent idea of what my final thesis should look like.

@synctext
Copy link
Member Author

synctext commented Jun 19, 2023

  • Solid thesis draft, 3 weeks till schedule defence. points below are for perfection
  • Cut intro in halve
  • Make a "Problem Description" section
  • "II. KEY FEATURES OF WEB3RECOMMEND" remove/move elsewhere
  • "III. BACKGROUND ON RECOMMENDATION AND DECENTRALISATION", then starts with PageRank (e.g. trust)
  • Thesis contains lots of tutorial level matter, simply remove. The success and importance of the open-source software movement can be seen in its dominance across various software domains. Notable examples include the open-source Apache projects, which have overtaken commercial alternatives from Microsoft and Sun in the server software market. Additionally, the Linux operating system has gained widespread popularity, being embedded in a wide range of devices, from mobile phones and recording devices to largescale servers in data centers. [31]
  • "D. Decentralisation"
    • add a section on "EigenTrust", explain why these and all others have failed.
    • "E. Challenge of decentralisation", lack of a global perspective, lack of a single leader, lack of a decentralised Internet police for fake accounts, lack of a central bug fix authority, lack of protocol upgrade. Leaderless self-organisation is unsolved. DAO and Web3 are emerging scientific areas.
  • "A. Bounding Identity Creation" against sybils
  • "D. Effect on ranking of increasing decays experiment", put this all in an "experimental setup" section
  • arxiv and Delft repo upload (with official cover page)

@rmadhwal
Copy link

rmadhwal commented Jun 22, 2023

Updated the draft based on feedback, submitted the first version of the thesis for feedback from the thesis committee.

@rmadhwal
Copy link

rmadhwal commented Jul 4, 2023

@synctext
Copy link
Member Author

synctext commented Jul 6, 2023

  • Ready to defend 🚀
  • Slide comments:
    • cut by 40-50% !
    • page 3 "The BIG Data problem", possible add the: Daily 140k ??? new Spotify tracks
    • "Web3 Recommender Systems - Challenge 1", remove near-empty page, too much white space, little content, little text
    • "Lack of a single leader ", lack of any leader
    • No slide clearly marked "Problem Description" with big red box around something
    • Web3Recommend == our proposed solution
    • Can be integrated into any Android based Web3 Platform == engineering, science == "platform agnostic"
    • As a proof of concept, integrated with MusicDAO write in bullet form: Proof-of-principle: MusicDAO-based deployment
    • Web3Recommend Key Features == engineering, science == "architectural components"
    • Page 33: wall-of-text 😲
    • include 1 monster formula, but no others.

@rmadhwal
Copy link

@synctext
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants