A Comprehensive Overview of Blockchain Consensus Mechanisms and Alignment Algorithm RAFT

Darren LI

Hatched by Darren LI

Aug 03, 2023

4 min read

0

A Comprehensive Overview of Blockchain Consensus Mechanisms and Alignment Algorithm RAFT

Introduction:
Blockchain technology has revolutionized various industries by providing decentralized and secure solutions. One critical aspect of blockchain technology is the consensus mechanism, which ensures the agreement of all participants on the validity of transactions. In this article, we will explore the different types of consensus mechanisms and their classification, examine the application of the Byzantine problem in distributed systems, and delve into strong consensus and authorized consensus mechanisms. Additionally, we will discuss the emergence of open consortium chains and their significance in the blockchain landscape.

Types of Blockchain Systems:
Currently, blockchain systems can be broadly categorized into three types: public blockchain, private blockchain, and consortium blockchain. Each type serves different purposes and caters to specific requirements. While public blockchains are open to all participants and provide transparent and decentralized networks, private blockchains restrict access to authorized entities. Consortium blockchains, on the other hand, strike a balance between the openness of public blockchains and the control of private blockchains.

The Rise of Open Consortium Chains:
In April 2020, Alipay, a leading Chinese online payment platform, introduced an open consortium chain to fill the technological gap in blockchain services. This move shattered the barriers of high development costs and long construction cycles associated with consortium chain development. The open consortium chain model presents a promising solution for organizations seeking the benefits of blockchain technology without compromising on control and privacy.

Alignment Algorithm RAFT:
The Hong Kong University of Science and Technology has developed an efficient alignment algorithm called RAFT, which stands for Reward Augmented Fine-Tuning. RAFT leverages human-annotated data to train a reward model, which is then used to adjust the behavior of machine learning models through reinforcement learning algorithms like Proximal Policy Optimization (PPO). However, traditional reinforcement learning algorithms heavily rely on gradient computations, leading to high training costs and instability due to numerous hyperparameters.

RAFT overcomes these challenges by employing a reward model to rank and filter generated samples from large-scale generative models, ensuring they align with user preferences and values. The algorithm follows three main steps:

  1. Data Collection: Data collection can be performed using the generative model being trained or a combination of pre-trained models and human input. This approach enhances the diversity and quality of the generated data.

  2. Data Ranking: In RLHF, a classifier or regressor aligned with the target requirements is available to filter out samples that best match human preferences.

  3. Model Fine-Tuning: The model is fine-tuned using the samples that align most closely with human preferences, resulting in an AI model that better caters to human needs.

The advantages of RAFT include increased sampling (due to downsampling) and reduced gradient computations (as low-quality data is filtered out by the reward function). As depicted in the graph below, the original Stable Diffusion algorithm performs poorly in generating 256x256 resolution images. However, after fine-tuning with RAFT, not only does the algorithm produce impressive results, but it also requires only 20% of the time taken by the original version.

Actionable Advice:

  1. Explore the Possibilities of Open Consortium Chains: Organizations looking to harness the benefits of blockchain technology should consider the open consortium chain model, which offers a balance between transparency and control.

  2. Implement RAFT for Enhanced AI Model Training: Researchers and practitioners in the field of machine learning can adopt the RAFT algorithm to improve the stability and robustness of their models while reducing training costs.

  3. Leverage Human Input for Data Generation: When training generative models, incorporating human input alongside pre-trained models can significantly enhance the diversity and quality of the generated data, leading to better results.

Conclusion:
Blockchain technology continues to evolve, with consensus mechanisms playing a pivotal role in ensuring the integrity and security of transactions. The emergence of open consortium chains has opened up new possibilities for organizations seeking the advantages of blockchain technology. Additionally, the alignment algorithm RAFT offers a more stable and efficient approach to fine-tuning machine learning models. By leveraging human input and prioritizing user preferences, RAFT enables AI models to align better with human needs. By embracing these advancements and implementing the actionable advice provided, organizations and researchers can unlock the full potential of blockchain technology and AI.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣