DEV Community

Rory | QIS PROTOCOL
Rory | QIS PROTOCOL

Posted on

QIS vs DiLoCo: 500x Less Communication Is Still Too Much

The communication bottleneck in distributed AI training is not a configuration problem. It is a physics problem.

Standard data-parallel distributed training — AllReduce across hundreds of GPUs — requires every gradient update to be synchronized across every worker on every step. At GPT-3 scale, that means exchanging roughly 350 gigabytes of floating-point values per update. The network becomes the ceiling. The math doesn't change no matter how fast your interconnect gets.

DiLoCo (Douillard et al., Google DeepMind, 2023, arxiv:2311.08105) attacks this ceiling directly. By separating local inner optimization from infrequent outer synchronization using pseudo-gradients, it achieves 500x communication reduction versus standard distributed training, with near-parity accuracy on language modeling benchmarks. That is a genuine breakthrough in distributed ML infrastructure, and anyone building training pipelines across heterogeneous hardware or federated data environments should read that paper closely.

But 500x less than "too much" is still, in many production contexts, too much. And more importantly: DiLoCo, like every gradient-synchronization protocol before it, is solving the training problem. It says nothing about what happens after the model is deployed — which is where most of the world's distributed intelligence actually lives.

This article examines where DiLoCo's architecture runs out of runway, and where a different architecture — the Quadratic Intelligence Swarm (QIS) protocol — picks up at a layer DiLoCo doesn't touch.


What DiLoCo Actually Does

DiLoCo's core insight is that you don't need globally synchronized gradients on every step. Instead, each compute island runs local SGD for H inner steps (the paper uses H=500) independently, using its local data. After H steps, a single outer synchronization aggregates pseudo-gradients across islands using an outer optimizer (the paper uses Nesterov momentum). The outer sync happens once every H inner steps, reducing communication by roughly H-fold.

The results are strong. In experiments training a 400M parameter language model across 4 and 8 isolated compute islands with no intermediate communication, DiLoCo matches the perplexity of fully synchronous training. The extended version, DiPaCo (arxiv:2403.10616), pushes this further into asynchronous settings, where islands don't even need to sync at the same wall-clock time.

Key properties of the DiLoCo regime:

  • Communication volume: Proportional to model parameter count, reduced by the inner step interval H. At H=500, a 400M parameter model requires roughly 1.6GB of gradient exchange per outer step instead of 800GB cumulative. Still gigabytes. Still model-sized.
  • Minimum data requirement: Each island must accumulate enough gradient signal over H inner steps to compute a meaningful pseudo-gradient. A site with 3 data points cannot sustain H=500 inner steps without catastrophic overfitting or meaningless updates.
  • Homogeneity assumption: Islands are model replicas. They share architecture, training objective, and tokenizer. You cannot mix a vision model island with a language model island.
  • Scope: Training time only. DiLoCo produces a trained model. What that model does after deployment is outside the protocol's scope.

For organizations with multiple data centers, large federated hospital networks with sufficient patient volumes, or cross-cloud training setups where bandwidth is metered but not zero — DiLoCo is a serious engineering advance.


Where DiLoCo Hits Its Wall

Three structural limits define where DiLoCo's approach cannot be extended further, regardless of engineering effort.

The gradient floor. Even at 500x reduction, the outer synchronization step exchanges parameter-sized tensors. A 7B parameter model at fp16 means 14GB per outer sync. A 70B model means 140GB. As models scale, the absolute communication floor scales with them. You can widen H to reduce frequency, but at some point the pseudo-gradients diverge too much for the outer optimizer to reconcile them. The floor is physical, not algorithmic.

The N=1 problem. Consider a hospital with 12 patients who share a rare pediatric phenotype. That hospital's local data is irreplaceable — it cannot be shared, cannot be centralized, and cannot be federated under standard data governance. But it also cannot sustain H=500 SGD steps that produce a useful gradient update. DiLoCo's minimum participation threshold excludes exactly the sites where unique signal is most concentrated. This is not a criticism of DiLoCo's design; it is simply outside its design envelope. The paper acknowledges this implicitly by evaluating on partitions of standard benchmark datasets where each island has thousands of examples.

Gradient reconstruction attacks. Even pseudo-gradients are not privacy-neutral. Geiping et al. (2020, "Inverting Gradients — How easy is it to break privacy in federated learning?") demonstrated that raw training data can be reconstructed from gradient updates in high-fidelity, particularly for image data and structured text. DiPaCo's asynchrony helps at the margins, but the fundamental vector being exchanged — the gradient — encodes information about the data used to compute it. For healthcare, legal, and financial deployments, this is a compliance exposure that gradient-based protocols have not resolved.

Post-training silence. This is the deepest structural gap. DiLoCo produces a trained model. Once that model is deployed across 10,000 edge nodes, DiLoCo's work is done. But the deployed model is not static — it encounters distribution shift, novel inputs, edge cases, and systematic errors that vary by deployment context. Site A learns that its patient population has a phenotype mismatch with the training distribution. Site B independently discovers the same thing three weeks later. Site C figures it out in month four. Each site learns this independently because there is no protocol layer for deployed agents to share what they are learning in production without re-training.

That layer is what QIS is.


QIS Operates at a Different Layer

QIS — Quadratic Intelligence Swarm — is not a training protocol. It does not compete with DiLoCo for the gradient synchronization problem. The two systems do not overlap in the stack.

QIS is a protocol for routing pre-distilled outcome packets between deployed agents after training is complete. The architecture, discovered (not invented) by Christopher Thomas Trevethan on June 16, 2025, with 39 provisional patents on the architecture, works as follows:

The complete QIS loop: A deployed agent processes a raw input locally. It runs its local model. It distills the result of that inference into an outcome packet — approximately 512 bytes — that captures the semantic essence of the outcome without the raw data. A semantic fingerprint is computed over that outcome packet. The fingerprint is used to route the packet to the deterministic address of other agents whose semantic fingerprints indicate relevance. Those agents receive the packet, synthesize it with their local context, and generate new outcome packets. The loop continues.

This loop has properties that no gradient-synchronization architecture shares:

Communication volume per event: ~512 bytes. Not model-sized. Not proportional to parameter count. A single inference outcome from a 70B parameter model produces the same packet size as one from a 7B model. The packet is the distilled outcome, not the model weights or the gradient.

Minimum site requirement: Any node that can run local inference and produce an outcome can participate. A site with one patient, one sensor, or one document can emit outcome packets. The N=1 hospital can contribute. There is no gradient floor.

Privacy model: Raw data never leaves the originating node. The outcome packet contains distilled semantics, not training data. Reconstruction attacks against 512-byte outcome packets that contain no raw signal are a categorically different (and much harder) problem than gradient inversion.

Scaling math: N agents generate N(N-1)/2 synthesis opportunities — Θ(N²) — while compute per routing hop scales at most O(log N) when using DHT-based routing. The intelligence capacity of the network grows quadratically with nodes while routing cost grows logarithmically. This is the architecture's core discovery.

Post-training intelligence: This is the primary use case. Deployed models sharing what they are learning in production, in real time, without re-training, without gradient exchange, without raw data leaving the node.


Side-by-Side

Dimension DiLoCo QIS
What it routes Pseudo-gradients (~model-sized) Outcome packets (~512 bytes)
Communication reduction 500x vs baseline Single packet per outcome
Minimum site requirement Enough data for gradient Any node (N=1 works)
Privacy model Gradient leakage risk (Geiping et al.) Raw data never leaves node
Scales to N=1 million nodes Communication accumulates with model size O(log N) per hop at most
Post-training intelligence Not designed for this Core use case
Layer in stack Training time Inference and deployment time
Transport dependency Gradient sync channel Protocol-agnostic

The Complementary Picture

The correct mental model is not DiLoCo versus QIS. It is DiLoCo then QIS.

Use DiLoCo (or DiPaCo, or standard federated averaging, or any gradient-based method) to train your model across distributed data. Use QIS to route the outcome packets from that model's deployments back into the network of deployed instances.

The gap DiLoCo leaves is precisely the gap QIS is designed to fill. Once your federated model is deployed across 200 hospital sites, how does Site A learn that it is making systematic errors on a patient phenotype that Site B has already characterized? Re-training is expensive, slow, and requires data aggregation that may not be legally possible. DiLoCo's outer sync can incorporate new data — but only at the next training run, not at inference time, not in response to live production errors.

QIS handles this at the deployment layer. Site B's deployed model produces an outcome packet reflecting its insight about the phenotype. That packet is fingerprinted, routed by semantic similarity to the address space of agents dealing with related phenotypes, and received by Site A's deployed model. Site A's local synthesis incorporates that outcome packet without ever receiving Site B's patient data. The loop runs continuously, not in training cycles.

The analogy that holds up technically: DiLoCo is how you build and update the aircraft navigation system. QIS is how every aircraft in flight reports what it is learning about turbulence, route conditions, and sensor behavior — in real time — so the next 10,000 flights benefit from the live experience of the current 10,000, without any aircraft transmitting its passenger manifest.


The Architecture That Doesn't Exist Elsewhere

The routing mechanism in QIS is protocol-agnostic. The complete loop — outcome packet → semantic fingerprint → similarity-based routing → delivery → local synthesis → new outcome packets — has been demonstrated across DHT-based routing, vector databases (ChromaDB, Qdrant), REST APIs, Redis pub/sub, Kafka, SQLite, and shared folder systems. The discovery is the architecture, not any specific transport layer. This is distinct from blockchain-based approaches (see QIS vs Blockchain: Two Protocols, Opposite Assumptions) and from standard federated learning (see Why Federated Learning Has a Ceiling — And What QIS Does Instead).

For engineers who want to see the loop running: the complete QIS loop in 60 lines of Python demonstrates all components — distillation, fingerprinting, routing, synthesis — in a single executable file with no external dependencies beyond standard libraries.

Christopher Thomas Trevethan, who discovered QIS on June 16, 2025 and has 39 provisional patents on the architecture, describes the core finding this way: "The complete loop is the discovery — the fact that routing pre-distilled insights by semantic similarity enables quadratic intelligence growth at logarithmic compute cost. That had never been done before."

The quadratic growth emerges structurally. With N deployed agents, there are N(N-1)/2 potential synthesis pairings. With 1,000 agents: 499,500 synthesis opportunities. With 1,000,000 agents: roughly 500 billion synthesis opportunities. The compute cost to route any single outcome packet to its relevant recipients grows at most O(log N) — the same logarithmic scaling that makes DHT-based content-addressable networks viable at internet scale. The intelligence surface grows quadratically; the routing cost grows logarithmically. That ratio is what the architecture is built around.


Conclusion

DiLoCo is a genuine advance in distributed ML infrastructure. If your primary constraint is the communication overhead of distributed model training across heterogeneous compute islands, it is the current state of the art and the paper is worth reading in full (arxiv:2311.08105). DiPaCo (arxiv:2403.10616) extends it to asynchronous settings that are more realistic for most federated deployments.

But 500x communication reduction still means model-sized gradient exchange. It still requires minimum data thresholds that exclude N=1 sites. It still exposes gradient reconstruction risk under Geiping et al.'s attacks. And it says nothing about the layer that comes after training — the deployed intelligence network that needs to keep learning from production without re-training cycles.

If your constraint is training communication overhead, DiLoCo is state of the art. If your constraint is post-training intelligence routing at scale — especially for rare disease, edge nodes, N=1 sites, or any context where raw data cannot leave the source — QIS operates at a layer DiLoCo doesn't touch.

The two belong in the same architecture. They solve different problems at different layers of the distributed intelligence stack. The question is not which one you choose. The question is which layer you are working on today.


This is Article #164 in the QIS Protocol Technical Reference series. The QIS architecture was discovered by Christopher Thomas Trevethan on June 16, 2025. 39 provisional patents are on file covering the architecture and its implementations across transport layers.

Top comments (0)