Proof of Useful Work (PoUW) State Machine
The Proof of Useful Work (PoUW) state machine is a critical component of the Cortensor network, ensuring that AI inferencing tasks are executed collaboratively and efficiently across a decentralized network of miners. This cognitive component orchestrates the flow of tasks, manages the correctness of outputs, and maintains the integrity of the network through a series of states. Each state in the PoUW state machine is governed by smart contracts, which facilitate interactions among miners and ensure that tasks are completed accurately and on time.
Overview of the PoUW State Machine
The PoUW state machine in Cortensor operates as a sophisticated state-based mechanism that manages the distribution and processing of AI inferencing tasks across the network. This mechanism is designed to handle the complexities of decentralized AI workloads, where multiple miners collaborate to solve problems by contributing to different stages of the task. The state machine controls the flow of work from the initiation of a session to the final submission of results, ensuring that the network functions without centralized oversight while maintaining high standards of accuracy and reliability.
Key Components of the PoUW State Machine
Smart Contract Facilitation
Smart contracts are central to the operation of the PoUW state machine, as they carry the state of each session (or virtual block) and govern the selection and coordination of miners. These contracts are responsible for enforcing the rules of the state machine, ensuring that miners adhere to the prescribed workflow and that tasks are completed in a decentralized manner.
Session Creation and Management
A session in Cortensor is akin to a virtual block, where a set of randomly selected miners work together to solve an AI-related task. The session begins in the "request" state, where the network randomly selects miners to initiate the session. Once the miners are selected, they are notified via events triggered by the smart contract to begin work.
State Transitions and Task Execution
Request State: The session starts in the request state, where miners are randomly selected to create the session. This state marks the beginning of the task and involves the allocation of miners based on their capabilities.
Create State: In this state, the selected miners generate the initial structure of the session, such as defining fields, topics, or domains based on predefined prompts. This is a crucial phase where the foundational elements of the task are established. If a miner fails to produce the required output or does not respond within the allocated time, the network automatically reassigns the task to another miner to prevent a single point of failure.
Prepare State: After the initial structure is created, the session moves to the prepare state, where miners extend the work done in the create state. They generate additional related information, such as questions or subdomains, that will be used in subsequent states. The output from this state is then used to select another set of miners for further processing.
Active State: In this state, multiple miners work concurrently to generate outputs based on the inputs provided in the previous states. This collaborative effort ensures that the task is approached from multiple perspectives, increasing the likelihood of generating high-quality results.
Precommit State: Miners submit the hash of their output during this stage, without revealing the actual data. This "precommit" step is crucial for maintaining the integrity of the process, as it prevents bad actors from altering their outputs based on the work of others. The precommit state adds a layer of security by ensuring that the outputs are consistent and verifiable in the next stage.
Commit State: In the commit state, miners submit their actual inference outputs, which are then compared against the hashes submitted in the precommit state. This comparison ensures that the outputs are genuine and have not been tampered with. The consistency between the precommit hash and the actual output is critical for validating the results.
End State: The session concludes in the end state, where the outputs are finalized and the session (or virtual block) is completed. The results are then cleaned up, and the session is recorded as a finished block. This state also marks the point where the game-like process can begin anew, with a new set of tasks and miners.
Validation and Quality Control
Proof of Inference (PoI): During the validation phase, the network measures the embedding vector distance between outputs to ensure that miners used similar or identical models to generate the data. This step verifies that the outputs are consistent and adhere to the expected standards.
Proof of Useful Work (PoUW): PoUW further validates the correctness, usefulness, and semantic information of the outputs by utilizing additional LLM models. This process ensures that the work produced during the session is not only accurate but also valuable and relevant to the task at hand.
Ensuring Decentralized Quality Control
Cortensor’s PoUW state machine is designed to maintain a high standard of service quality across a decentralized network. By using a state machine that controls the flow of tasks and validates outputs through PoI and PoUW, Cortensor can effectively measure the capabilities and reliability of individual nodes. The system’s flexibility allows for the introduction of additional states or levels to further classify nodes based on their performance, ensuring that only the most capable nodes serve user requests.
Extending the State Machine for Scalability and Future Services
The PoUW state machine is inherently extendable, allowing Cortensor to introduce new levels of complexity and classification as the network grows. This adaptability ensures that the system can scale with increasing demand and can classify nodes according to their suitability for different types of tasks. One of the significant future applications of this state machine is in synthetic data generation. As AI models continue to evolve, the demand for high-quality synthetic data will grow, and the PoUW state machine can be extended to manage and validate these tasks within the network. This capability is one of the reasons it is called "Proof of Useful Work"—because it not only verifies the correctness of AI inferences but also facilitates the creation of valuable outputs that can be used for various AI-driven services, including synthetic data generation.
Conclusion
The PoUW state machine is the core of Cortensor’s decentralized AI inference network, controlling the flow of tasks, ensuring the correctness of outputs, and maintaining the integrity of the network. By leveraging smart contracts and a sophisticated state-based workflow, Cortensor can deliver high-quality AI services in a decentralized manner. The state machine not only supports the collaborative efforts of miners but also provides a robust mechanism for validating and verifying the work produced, ensuring that the network remains reliable, scalable, and secure. This decentralized approach to quality control is essential for Cortensor's mission to democratize AI and make advanced AI models accessible to a broader audience. Moreover, its extensibility allows it to support future services like synthetic data generation, further enhancing the network's value and utility.
Last updated