LPsLux Proposals
EVM & Execution
LP-5010

AI VM

Final

The A-Chain VM — a model registry keyed by weight hash, inference attestations from staked compute providers verified against TEE reports, and a dispute path that re-runs the inference on a randomly selected third provider

Category
Core
Created
2024-06-01

Normative topology + fee model: LP-5210. A-Chain (aivm) is one of the ten canonical chains; attestation state is domain state, with no canonical UTXO asset supply. Its fee pool is funded from X in LUX, and validator/delegator rewards for A-Chain work settle back through P.

Abstract

The AI VM runs the A-Chain, a chain built for AI compute attestation. It holds a registry of AI models, records inference attestations from compute providers, and lets anyone verify an inference result on-chain through a commitment scheme. The A-Chain does not run inference itself — it attests that inference was performed correctly by a registered compute node running inside a trusted execution environment.

The chain-level specification is LP-5000. This LP specifies the VM: what a model record holds, what an attestation carries, and how a dispute resolves.

Specification

Model registry

Model {
    modelID      [32]byte    // hash of model weights
    owner        address
    name         string
    version      uint64
    weightHash   [32]byte    // SHA-256 of the model weights file
    architecture string      // e.g. "transformer", "diffusion"
    paramCount   uint64      // parameter count
    license      string      // e.g. "MIT", "Apache-2.0"
    teeRequired  bool        // must run in a TEE for a valid attestation
}

Inference attestation

A compute provider submits an attestation after performing inference:

Attestation {
    modelID    [32]byte
    inputHash  [32]byte    // hash of the inference input
    outputHash [32]byte    // hash of the inference output
    provider   address     // compute provider address
    teeReport  []byte      // SGX/TDX attestation report, if teeRequired
    timestamp  uint64
    signature  []byte      // provider's signature over all fields
}

The VM verifies that:

  1. the model exists in the registry;
  2. the provider is registered and staked;
  3. the TEE report is valid, if required, through on-chain SGX/TDX verification (LP-5310);
  4. the signature is valid.

Provider staking

Compute providers stake LUX to participate:

  • Minimum stake — 100 LUX.
  • Slashing — a provider whose attestation is proven invalid through a challenge loses stake.
  • Reward — providers earn fees from attestation consumers, priced per attestation.

Verification protocol

A consumer verifies an inference result by submitting input to a registered provider, receiving the output plus attestation, verifying that attestation on-chain, and optionally challenging — re-running the inference on a different provider and comparing outputs.

Dispute resolution

When two providers produce different outputs for the same input and model:

  1. the challenger submits both attestations to the A-Chain;
  2. a third provider, selected at random from the staked set, re-runs the inference;
  3. the minority result is faulty, and that provider is slashed.

Security Considerations

  1. TEE trust model. SGX/TDX attestation is only as secure as the TEE hardware. Side-channel attacks on TEEs are a known risk.
  2. Model integrity. weightHash binds the attestation to a specific model version. Model poisoning must be detected off-chain.
  3. Non-deterministic inference. Floating-point non-determinism can cause legitimate output differences between honest providers. Tolerance thresholds are configurable per model — and where an exact-integer path is available, the compute-binding proof in LP-5220 removes the tolerance corridor entirely.

Reference

ResourceLocation
AI VMgithub.com/luxfi/node/vms/aivm/
TEE verificationgithub.com/luxfi/node/vms/aivm/tee/
Model registrygithub.com/luxfi/node/vms/aivm/registry/
A-Chain chain specLP-5000

Copyright and related rights waived via CC0.