Cover photo

Zero Knowledge AI

We keep getting asked ‘wen token?’ Well, a simple method would be to sell NFTs which act as lifetime special access accounts; however, we love pushing innovation to its limit, so let’s explore the basic concepts of decentralizing language models with zero-knowledge proofs.

Decentralizing LLMs with zero-knowledge proofs could address some of the concerns related to centralization and data privacy. Especially if using a lightweight ZKP implementation designed for resource-constrained environments such as mobile devices. In scenarios where the mobile device lacks sufficient computational capacity, resource intensive tasks could be offloaded to more powerful edge nodes within the decentralized network.

Zero-knowledge proofs could be employed to allow users to make queries and interact with the decentralized LLM without revealing the actual data used for training. ZKPs enable users to prove they have valid information or satisfy certain conditions without disclosing the specific data. This way, users can access the benefits of the LLM without compromising data privacy.

Data would be encrypted and distributed across a network of nodes which would host a portion of the language model and contribute processing power to collectively perform the tasks handled by the LLM. This approach helps prevent a single entity from controlling the entire language model.

How could this work in practice?

A user who wants to interact with the LLM generates a query as an encrypted message without revealing the input data they want to process.

The user then generates a zero-knowledge proof that attests to the validity of their query. The proof assures the decentralized LLM that the user's query adheres to the required format and conditions, without revealing the actual data being used.

The nodes in the decentralized LLM network collectively act as verifiers. They validate the zero-knowledge proof provided by the user without needing to see the original data. The proof demonstrates that the user's query is valid and satisfies the necessary conditions.

At no point during the interaction does the decentralized LLM or any node obtain access to the user's original, unencrypted data. The privacy of the user's input remains intact, and the zero-knowledge proof ensures that the LLM performs the task without revealing the data used for training.

The user's private data should only be accessible by the user who submitted it, and from that point on, it remains encrypted. The primary purpose of using ZKPs is to ensure that the user's sensitive data remains private and secure throughout the interaction with the decentralized LLM.

Training an LLM with encrypted data

Traditional machine learning training involves sharing the raw data with a central entity or server, which could be a privacy concern, especially if the data contains sensitive information. In a ZKP environment, the focus shifts to preserving privacy while still achieving the collaborative training of the model.

The training data is encrypted and sharded. Each data shard is then distributed across multiple nodes in the decentralized network, where each node only holds a portion of the data. During the training process, the participating nodes compute model updates based on their respective data shards without exchanging the raw data.

To validate that the model updates are accurate and comply with the training protocol, nodes generate zero-knowledge proofs that attest to the correctness of their updates without revealing any information about their data. Validator nodes in the network verify the zero-knowledge proofs to confirm the accuracy of the updates without learning anything about the underlying data. 

The encrypted model updates are aggregated and combined using techniques like homomorphic encryption, which allows computations on encrypted data without decrypting it. This way, the model remains encrypted throughout the aggregation process. Once the training is complete, the final model can be decrypted by the end-user who holds the decryption keys and made available for use. 

The use of ZKPs and encryption ensures that no node has access to the complete raw data during the training process, preserving the privacy of individual data contributors. Instead, only the aggregated and encrypted model updates are relayed and validated across the network.

Wen Token?

Via a utility token, we could incentivize the creation of the most robust dataset to train an LLM to date.

Individuals and organizations who provide data to improve the LLM's training dataset could receive compensation in the form of tokens. These tokens would act as an incentive for data sharing, which is crucial for the continued improvement of the language model.

Nodes that contribute processing power and storage to host parts of the LLM could be rewarded with tokens for their services. This incentive mechanism encourages participation and helps maintain a robust and reliable decentralized network.

Users who wish to access the LLM for tasks like language translation, summarization, or other natural language processing tasks could use the token to pay for these services. Smart contracts could be utilized to automate token payments directly to the nodes contributing computational resources.

While this is a basic overview of the implementation, we would love to hear feedback. Join the OSO telegram to chat.