Table of Contents
Fetching ...

Lattica: A Decentralized Cross-NAT Communication Framework for Scalable AI Inference and Training

Ween Yang, Jason Liu, Suli Wang, Xinyuan Song, Lynn Ai, Eric Yang, Bill Shi

TL;DR

Lattica tackles the challenge of scaling AI workloads beyond centralized data centers by providing a decentralized cross-NAT communication substrate. It integrates multi-protocol NAT traversal, a CRDT-based decentralized data store, content-addressed storage with DHT-based CID discovery, and an RPC streaming layer to support sharded inference and distributed training. Key contributions include a Rust/libp2p-based architecture with Python SDK bindings, Bitswap-inspired data exchange, and practical evaluations showing direct connectivity in ~70% of NAT scenarios and robust RPC throughput across regional and intercontinental links (e.g., up to ~10k QPS for 128 B locally, ~1.2k QPS WAN, ~110 QPS intercontinental for 256 KB). The framework enables edge intelligence, collaborative reinforcement learning, and federated/volunteer computing by eliminating reliance on centralized intermediaries, paving the way for sovereign and scalable decentralized AI deployments.

Abstract

The rapid expansion of distributed Artificial Intelligence (AI) workloads beyond centralized data centers creates a demand for new communication substrates. These substrates must operate reliably in heterogeneous and permissionless environments, where Network Address Translators (NATs) and firewalls impose significant constraints. Existing solutions, however, are either designed for controlled data center deployments or implemented as monolithic systems that tightly couple machine learning logic with networking code. To address these limitations, we present Lattica, a decentralized cross-NAT communication framework designed to support distributed AI systems. Lattica integrates three core components. First, it employs a robust suite of NAT traversal mechanisms to establish a globally addressable peer-to-peer mesh. Second, it provides a decentralized data store based on Conflict-free Replicated Data Types (CRDTs), ensuring verifiable and eventually consistent state replication. Third, it incorporates a content discovery layer that leverages distributed hash tables (DHTs) together with an optimized RPC protocol for efficient model synchronization. By integrating these components, Lattica delivers a complete protocol stack for sovereign, resilient, and scalable AI systems that operate independently of centralized intermediaries. It is directly applicable to edge intelligence, collaborative reinforcement learning, and other large-scale distributed machine learning scenarios.

Lattica: A Decentralized Cross-NAT Communication Framework for Scalable AI Inference and Training

TL;DR

Lattica tackles the challenge of scaling AI workloads beyond centralized data centers by providing a decentralized cross-NAT communication substrate. It integrates multi-protocol NAT traversal, a CRDT-based decentralized data store, content-addressed storage with DHT-based CID discovery, and an RPC streaming layer to support sharded inference and distributed training. Key contributions include a Rust/libp2p-based architecture with Python SDK bindings, Bitswap-inspired data exchange, and practical evaluations showing direct connectivity in ~70% of NAT scenarios and robust RPC throughput across regional and intercontinental links (e.g., up to ~10k QPS for 128 B locally, ~1.2k QPS WAN, ~110 QPS intercontinental for 256 KB). The framework enables edge intelligence, collaborative reinforcement learning, and federated/volunteer computing by eliminating reliance on centralized intermediaries, paving the way for sovereign and scalable decentralized AI deployments.

Abstract

The rapid expansion of distributed Artificial Intelligence (AI) workloads beyond centralized data centers creates a demand for new communication substrates. These substrates must operate reliably in heterogeneous and permissionless environments, where Network Address Translators (NATs) and firewalls impose significant constraints. Existing solutions, however, are either designed for controlled data center deployments or implemented as monolithic systems that tightly couple machine learning logic with networking code. To address these limitations, we present Lattica, a decentralized cross-NAT communication framework designed to support distributed AI systems. Lattica integrates three core components. First, it employs a robust suite of NAT traversal mechanisms to establish a globally addressable peer-to-peer mesh. Second, it provides a decentralized data store based on Conflict-free Replicated Data Types (CRDTs), ensuring verifiable and eventually consistent state replication. Third, it incorporates a content discovery layer that leverages distributed hash tables (DHTs) together with an optimized RPC protocol for efficient model synchronization. By integrating these components, Lattica delivers a complete protocol stack for sovereign, resilient, and scalable AI systems that operate independently of centralized intermediaries. It is directly applicable to edge intelligence, collaborative reinforcement learning, and other large-scale distributed machine learning scenarios.

Paper Structure

This paper contains 6 sections, 1 figure, 1 table.

Figures (1)

  • Figure 1: Lattica—Four Scenarios: (1) Multi-protocol NAT traversal using Direct Connection Upgrade through Relay (DCUtR) over TCP and QUIC, with relay fallback; (2) Decentralized Content Delivery Network (CDN) in which static resources are chunked, content-identifier (CID) addressed, and synchronized via the Bitswap protocol; (3) Reinforcement learning pipeline where a training cluster generates model chunks (e.g., CID1, CID2) and synchronizes them with inference clusters A–C; (4) Sharded AI inference over the Lattica Distributed Hash Table (DHT) using Remote Procedure Call (RPC) streams with fault-tolerant shard nodes.