# SoulNet Core Features

## 4.1 LBFT Consensus

One of the core innovations of SoulNet is the introduction of a new consensus protocol for AI subchains: LBFT (Learning Byzantine Fault Tolerance). Compared to traditional Proof of Work (PoW), LBFT is more advanced and efficient—it can be described as Proof of Useful Work, where "useful work" is defined as contributions to the optimization of AI models on SoulNet.

<figure><img src="https://1013654710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywccVWdXkpaUcByzaEvS%2Fuploads%2Fn0A48wBZ7tsHjL9IwCmh%2FSoulNet%20Whitepaper_%E5%A4%8D%E5%88%B6-41.png?alt=media&#x26;token=75655fc7-f60f-4de4-b216-6b4152295887" alt=""><figcaption></figcaption></figure>

The consensus mechanism involves three types of nodes within the SoulNet subchains: Trainers, Validators, and Confirmers, as detailed in the previous chapter. The LBFT algorithm enables nodes to reach consensus on parameterized blocks during the training phase.

_Algorithm_ 1 : _Block production for a DModel in TuringNet subchain_

_Initialize parameters &#x77;_&#x30; _in &#x42;_&#x30; , _the genesis block_

_for each iteration r_ = 1, 2, ... _do_

_wr_ ← (_Parameters retrieved from block Br_)

_Tr_ ← (_Set of m nodes for training_)

_V r_ ← (_Set of n nodes for verification_)

_Cr_ ← (_Set of t nodes for confirmation_)

_for each training node i_ ∈ _Tr in parallel do_

_w i r_+1 ← _Train_(_i_, _wr_)

_generate Bi r_+1 _with wi r_+1 _i and signs with private key SK_

_broadcast B i r_+1

_for each verification node j_ ∈ _V r in parallel do_

_receives a set of Bi r_+1

_choose x j r_+1 ← _ALBFT_(_set of Bi r_+1  )

_for all verification node j_ ∈ _V r do_

_vote for xr_+1 ← _BFT_(_x r_ 1 +1 , _x r_ 2 +1 , ..., _x r n_ +1 )

_sign Br_+1 _xr_+1 _j with private keys SK_

_for all confirmation node k_ ∈ _Cr do_

_Confirm Br_+1 _xr_+1 _k and sign with private key SK_

_Br_+1 =_Br_+1 _xr_+1 _with all signatures_

_Algorithm_ 2 : _Train_(_k_, _w_ )

_B_ ← (_split Pk into batches of size B_)

_For each local epoch i from_ 1 _to E do_

_for batch b_ ∈ _B do_

_w_ ← _w_ − η \* &#x394;_&#x6C;_(_w_; _b_)

_return w_

( _B_ is the local minibatch size, _E_ is the number of local epochs, and η is the learning rate.)

_Algorithm_ 3 : &#x41;_&#x4C;BFT_(_B_)

_for each block Bk from set B do_

_Lk_ = _calculate loss with parameters w k in Bk_

&#x20;return argmin（LK）

_Algorithm 4 : BFT(x r 1 +1 , x r 2 +1 , ..., x r n +1 )_

_each x j r+1 is the index of block Bx j r+1_

_where the calculated loss Lj is minimum from a given verification node j ∈ V r_

_use BFT algorithm over all verifications nodes in V r to reach consensus for_

&#x20;     _S=argmin（Lj）_

&#x20;         _j_∈Vr

_return x r_+1 = _xsr_+1&#x20;

Through this algorithm, subchain nodes can achieve consensus on AI models with parameters generated during the training process. This consensus is robust against malicious actors:

First, the BFT algorithm used in the validator and confirmer voting steps can tolerate attacks from up to one-third of malicious nodes.

Second, any malicious training nodes or corrupted training data may result in unverifiable or higher-loss results. If malicious training nodes account for less than one-third, the subsequent voting and confirmation steps will discard those compromised results, ensuring that the final model is trustworthy in a decentralized setting.

## 4.2 Train-to-Mine

A primary incentive mechanism in the SoulNet community is Train-to-Mine: mining Soul tokens by training models on subchains. The following diagram describes the interaction between the main chain and subchains from the perspective of mining.

In this framework, the main chain and subchains work together to execute and complete machine learning tasks. Each block on the main chain is rewarded via DPoS consensus, while each block in a subchain's training phase is rewarded via LBFT consensus.

<figure><img src="https://1013654710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywccVWdXkpaUcByzaEvS%2Fuploads%2FuUVO5X4QZ5NcFmJkNpaD%2FSoulNet%20Whitepaper_%E5%A4%8D%E5%88%B6-42.png?alt=media&#x26;token=4feb823f-bb7b-46b3-a1d1-29eda86da705" alt=""><figcaption></figcaption></figure>

The workflow of a typical machine learning task is as follows:

1\. The AI developer who wants to train a model initiates a machine learning task on the main chain by submitting a certain number of Soul tokens as a deposit to incentivize miners.

2\. The main chain locks the submitted Soul tokens, along with a portion of newly minted tokens, as collateral, and creates a dedicated subchain for the requested training task.

3\. The subchain begins training and produces sub-blocks for each iteration. Each round of consensus pays out subchain training rewards to the leading nodes.

4\. Once the model reaches a high-performance threshold, exceeds iteration limits, or depletes the deposit, the subchain can notify the main chain that the training task is complete.

5\. The main chain distributes the token deposit proportionally to the subchain participants based on training contributions.

6\. The main chain writes a transaction to confirm task completion and notifies the developer.

<figure><img src="https://1013654710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywccVWdXkpaUcByzaEvS%2Fuploads%2FlsQIlaLrywfUnNtqYDEH%2FSoulNet%20Whitepaper_%E5%A4%8D%E5%88%B6-43.png?alt=media&#x26;token=985135ce-03ba-4d6a-85ed-8beb894b2c67" alt=""><figcaption></figcaption></figure>

## 4.3 Inference Mining

1\) Another major incentive in the SoulNet ecosystem is Inference Mining: mining Soul tokens by executing inference tasks on subchains. The workflow is as follows:

2\) An AI user initiates an inference task by calling the main chain and submitting Soul tokens as a deposit to reward miners.

3\) The main chain locks this deposit and creates an inference block on the relevant model’s subchain.

4\) The subchain begins inference. Miners execute tasks in order of fee priority and package inference results into a block. Validators inspect and sign off on these results and broadcast the block.

5\) The main chain distributes the token deposit to the nodes in the subchain.

6\) The main chain writes a transaction confirming task completion and notifies the user, who can then retrieve the inference results from the subchain block.

<figure><img src="https://1013654710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywccVWdXkpaUcByzaEvS%2Fuploads%2FhjJhPbqGsfyeF0jUNCHm%2FSoulNet%20Whitepaper_%E5%A4%8D%E5%88%B6-44.png?alt=media&#x26;token=98fe0eec-3d2b-4809-99b0-39f1bdb794b7" alt=""><figcaption></figcaption></figure>

## 4.4 AI Model Marketplace

Based on the above core functionalities, SoulNet will establish an open and trustworthy AI model marketplace. This marketplace is built on two foundational layers:

·First Layer: Distributed Machine Learning, which enables model training across decentralized nodes.

·Second Layer: ALBFT Consensus, which ensures the creation of trustworthy models in distributed environments while incentivizing the community.

Above these layers, the Soul token-based economy forms the foundation for a decentralized AI platform—empowering developers, users, and contributors to participate in a fair, transparent, and trust-based AI ecosystem.

<figure><img src="https://1013654710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FywccVWdXkpaUcByzaEvS%2Fuploads%2FgZyOB8Z8KCr2wwQLzHDi%2FSoulNet%20Whitepaper_%E5%A4%8D%E5%88%B6-45.png?alt=media&#x26;token=c10f4aed-2488-4ccf-8078-02aa458ecff3" alt=""><figcaption></figcaption></figure>
