square-dribbbleConcrete Implementation of AI Computing Power

Efficient and Reliable Shared Computing Resources

Naai DePIN provides a high-performance, reliable, and secure computing resource sharing platform for users worldwide. By uploading computing resources to the blockchain, participants such as miners and developers can contribute idle computational power as network nodes, jointly maintaining the security and availability of the system.

Tasks are scheduled and executed in a decentralized manner within the network. Redundancy across multiple nodes and a validation mechanism ensure the accuracy and reliability of computation results. Users only need to connect to the Naai DePIN network to access stable, on-demand computing services with cross-regional support.

Naai DePIN is a mobile AI computing public blockchain that supports distributed computing. It offers distributed computation and result aggregation mechanisms based on blockchain technology. The result aggregation module collects computation results from various slave nodes and consolidates them using the aggregation function defined in the smart contract.


1. Distributed Computing and Result Aggregation Module

In Naai DePIN's mobile AI computing ecosystem, the master node writes smart contracts based on its computational requirements. Each smart contract includes two core functions:

  • Distributed Computing Function: Defines how to execute distributed tasks across multiple nodes.

  • Result Aggregation Function: Defines how to aggregate computation results obtained from all participating slave nodes.

The smart contract also contains descriptive metadata to help slave nodes understand the contract's intent and execution requirements.


2. Smart Contract Publication and Task Assignment

  • Master Node Contract Deployment: The master node writes a smart contract according to its task needs and publishes it to the blockchain network.

  • Slave Node Contract Claiming: All nodes on the blockchain can read the contract description to determine whether they have sufficient computational resources. Qualified nodes claim the task as slave nodes and locally store the execution logic.

  • On-Chain Recording: The claiming and related operations by slave nodes are recorded on the blockchain ledger to ensure transparency and immutability.


3. Computation by Slave Nodes

  • Distributed Task Execution: Each slave node executes the assigned task according to the distributed computing logic in the smart contract, using its local dataset.

  • Result Submission: Upon completion, each slave node uploads its result to the blockchain. The master node then retrieves all submitted results from the chain.


4. Result Aggregation and Filtering Mechanism

To ensure result integrity and filter out malicious or faulty data, the master node applies the following mechanisms:

  • Predefined Algorithm Filtering: The master node uses anomaly detection algorithms to filter invalid computation results.

  • Weight Calculation Based on History: The master node accesses each slave node’s historical computation data (e.g., participation frequency, data volume, timestamps) from the blockchain and calculates a reliability weight (PPP) using the formula below:

Where:

  • n: The number of historical computations a node has participated in

  • sᵢ: The amount of data involved in the i-th computation

  • tᵢ: The time interval between the i-th computation and the current time


Anomaly Detection Algorithm

The master node uses the Local Outlier Factor (LOF) algorithm to detect abnormal computation results. The process includes the following steps:

  1. Calculate the local reachability density for each result.

  2. Adjust the distance metric using the PPP weight to improve filtering accuracy.

  3. If the local outlier factor of a result exceeds a preset threshold, the result is flagged as an anomaly and excluded from aggregation.

By following the steps above, the master node calculates the weight of each slave node. These weights are then used in conjunction with the outlier detection algorithm to compute the local outlier factor for each node’s submitted result. In the outlier detection algorithm, let the sample set be D, and let the distance between sample o and sample p be denoted as d(o, p). Define dₖ(o) as the distance from point o to its k-th nearest neighbor.

When dₖ(o) = d(o, p), the following conditions are satisfied:

  1. There exist k points p′ ∈ D \ {o} such that d(o, p′) ≤ d(o, p)

  2. There exist k − 1 points p′ ∈ D \ {o} such that d(o, p′) < d(o, p)

In other words, p is the k-th nearest neighbor of o.

Define Nₖ(p) as the set of the k-nearest neighbors of point p, satisfying: Nₖ(p) = {p′ ∈ D \ {o} | d(o, p′) ≤ dₖ(o)}

Define the k-reachability distance from point p to point o as: dₖ(o, p) = max{dₖ(o), d(o, p)}

Define the local reachability density of point o as:

By combining the above formulas, the local outlier factor (LOF) of each sample in the dataset D can be calculated. The greater the LOF value of a sample, the higher the likelihood that the sample is an outlier.

Based on the above anomaly detection algorithm, the Naai DePIN supercomputing public chain treats all computation results from slave nodes as a sample set, and each individual result from a slave node as a sample within that set. To enhance the accuracy of outlier detection, Naai DePIN integrates a POS-based adjustment into the original distance metric used in the LOF algorithm.

For each slave node, its computation result is evaluated by substituting the corresponding POS-adjusted distance into the anomaly detection algorithm. By doing so, the local outlier factor (LOF) associated with that slave node's result can be calculated.

3.Result Aggregation: After filtering, the validated computation results are aggregated using the result aggregation function defined in the smart contract. This function consolidates the outputs from all trusted slave nodes to produce the final output of the distributed computation task.


5.Advantages of the Enhanced Model

Data Security and Transparency

  • All node operations are recorded on the blockchain ledger, ensuring immutability and data integrity.

  • The distributed computing framework enables secure data sharing and effectively prevents data leakage.

High-Performance Distributed Computing

  • By introducing smart contracts, blockchain transactions are transformed into programmable computation frameworks that support large-scale distributed data processing.

  • The result filtering mechanism effectively excludes abnormal or malicious nodes, ensuring the accuracy and reliability of computation results.

Flexible Scalability

  • The algorithm and weight assignment mechanisms are configurable and can be adjusted based on practical needs.

  • The framework is adaptable to various distributed computing scenarios, such as AI model training, image processing, and real-time data analysis.

Compatibility with Existing Blockchains

  • Naai DePIN is compatible with mainstream smart contract platforms, including EVM and SVM, enabling seamless deployment of AI applications.

  • Developers can efficiently build and deploy on-chain AI services via smart contracts, empowering sectors like DeFi, NFT, and GameFi with intelligent capabilities.


6.Use Cases

AI Model Training on Mobile Devices

  • Utilize idle computing power from distributed mobile devices to train deep learning models at scale.

Real-Time Image Processing

  • Slave nodes process local image data independently, while the master node aggregates results. This is ideal for applications such as autonomous driving or surveillance systems.

Blockchain-Powered Smart Cities

  • Combine IoT devices with distributed computing to enable real-time decision-making and operational optimization in smart city environments.

Through the integration of blockchain technology and a distributed computing framework, Naai DePIN’s mobile AI compute ecosystem dramatically enhances the efficiency of compute resource utilization—empowering innovation across industries.

Last updated