Documentation / Technical spec
HiNet Technical Spec
Status: Draft
This technical spec translates the HiNet functional spec into an implementation-facing architecture. It intentionally echoes the functional vocabulary: iCore, qCore, aCore, GQ, local ownership, holographic inference, fractal training, thought convergence, and SSV-like verification.
The first build target is the basic user node: a local-first iCore runtime that can own data, manage consent, build memory, call models, run consolidation jobs, and prepare for future qCore and aCore protocols.
Findings & Status Update (2026-06-22)
Validated/decided since this draft (detail in the canonical docs): - Base: Qwen3-MoE family (Apache-2.0) is the production anchor; bf16 (not 4-bit) for the knowledge/deep training stage — int4 cuts knowledge capacity >2×. On-device runtime = MLX/mlx-lm (Foundational-Model-Plan §2, Node-Packaging-Addendum). - Personalization engine: depth spectrum LoRA → DoRA → full-FT, all-linear targeting; nightly sleep cycle with replay; facts→RAG, skills→
Δ. Recipes + per-tier (pocket/laptop/cloud): Personalization-Engine. - Training CLI (2026-08-24): Soup (one-YAML PEFT/TRL + layer-streaming; not Wortsman Model Soups) was evaluated as a nightly-training candidate and rejected as the runtime. It is CUDA/PyTorch-first, 4-bit-default, and does not emit FlexOlmo-composableΔs against our frozen Qwen3-MoE anchor. Keep MLX on theComputeBackendlocal path. Adopt only the ops discipline: multi-leg eval-gated promote/rollback, provenance-bound ship evidence, and tests that every training flag is actually read (silent no-ops are unacceptable on a sleep clock). Detail: Personalization-Engine §6a. - Composition: compose via task-vectors (τ = θ_ft − θ_base) on one byte-identical frozen base. Mergeability ∝ delta magnitude + conflict → merge complementary · route conflicting · retrieval-union for facts; DiLoCo-cadence re-basing; cluster+route at scale. - Seams (build now):ComputeBackend(local↔attested cloud sandbox, signed WorkOrder/verified receipt),VaultReplication(encrypt-local → ciphertext to owner-owned targets), model passport. The macOS node = Tauri shell + Rust security core + Pythonhinetd/MLX sidecar. - Working harness (reference impl of the above primitives):experiments/e1-holographic-composition/. - Track 2 implementation surface (connectors, agentic layer, app UX): HiNet-Track2-Functional-Spec.md.The modules/contracts below remain the foundation; reconcile against the canonical docs where they differ.
Design Principles
- Local-first ownership: user data, identity material, memory, and learned artifacts start on the user's device.
- Consent before contribution: no network participation, model call, backup, training, or inference contribution runs without a policy grant.
- Atomic intelligence: an iCore must be useful alone before it can be useful in a qCore.
- Holographic composition: any valid qCore should be composed from meaningful iCore participants, not passive data shards.
- Verifiable execution path: agent and quorum outputs should carry enough evidence to audit who participated, what policy allowed it, and what was signed.
- Research separation: MVP mechanisms should be buildable now, while fractal training, qCore emergence, and aCore cryptography are specified as protocol surfaces that can mature.
Runtime / Packaging Stack
Runtime/packaging stack: see HiNet-Node-Packaging-Addendum.md.
Architecture Overview
flowchart TD
Owner[Human Owner] --> NodeAPI[Local Node API]
NodeAPI --> Consent[Consent Policy Engine]
NodeAPI --> Vault[Encrypted Local Vault]
NodeAPI --> Memory[Memory Index]
NodeAPI --> ModelAdapter[Model Adapter]
NodeAPI --> Audit[Audit Log]
Consent --> Vault
Vault --> Memory
Memory --> ModelAdapter
ModelAdapter --> LocalModel[Local Model]
ModelAdapter --> RemoteModel[Approved Remote Model]
NodeAPI --> Consolidation[Nightly Consolidation]
Consolidation --> Vault
Consolidation --> Memory
NodeAPI --> PeerProtocol[Peer Protocol Stub]
PeerProtocol --> qCore[qCore Session]
qCore --> Other_iCores[Other iCores]
NodeAPI --> aCore[aCore Execution]
aCore --> ThoughtConvergence[Thought Convergence]
ThoughtConvergence --> ThresholdOutput[Threshold Signed Output]
Core Modules
node-identity
Responsibilities:
- Create or import a persistent iCore identity.
- Store private key material locally.
- Derive public node identifiers and signing keys.
- Sign local audit events, peer announcements, consent grants, and protocol messages.
- Support future DID, libp2p PeerId, wallet, or on-chain identity bindings.
MVP behavior:
- Generate a local Ed25519 or secp256k1 identity.
- Store key material in an encrypted local keystore or OS keychain where possible.
- Export public identity as a node profile document.
Future behavior:
- Bind iCore identity to an owner wallet or DID.
- Support key rotation and recovery.
- Support threshold or social recovery for human-quorum-owned iCores.
Status (2026-08 — BUILT): MVP identity is implemented in hinetd/node_identity.py: an owner-held Ed25519 keypair (private key 0600 under ~/.hinet, never leaves the device except as VaultReplication ciphertext), the self-certifying node_id = "icore_" + crockford_base32( sha256(0x01 ‖ pubkey)[:20] ) (authoritative derivation), plus node name + sign() for the registration request. Full contracts — genesis/subkey split, recovery phrase, the central registry, and capability indexing — are specified in HiNet-Node-Identity-and-Registry.md.
local-vault
Responsibilities:
- Store raw imported data, extracted text, metadata, embeddings, and learned artifacts.
- Keep data local by default.
- Support encrypted backups and exports.
- Track retention and deletion policy.
MVP behavior:
- SQLite stores metadata, consent grants, memory records, and audit events.
- File storage holds imported artifacts and derived artifacts.
- Encryption at rest is required before multi-user or production use.
consent-policy
Responsibilities:
- Represent what the owner permits the node to do.
- Gate ingestion, model calls, training, qCore participation, aCore participation, backup, and export.
- Support revocation.
- Provide a policy decision for every sensitive operation.
MVP behavior:
- Consent grants are explicit records.
- Every operation references a consent grant.
- Revocation prevents future use.
Policy dimensions:
- Data source.
- Data sensitivity.
- Allowed operation.
- Allowed model target.
- Allowed network exposure.
- Allowed retention period.
- Compensation requirement.
- Human approval requirement.
memory-index
Responsibilities:
- Convert approved data into searchable memories.
- Maintain embeddings and summaries.
- Retrieve context for local inference.
- Preserve provenance from answer back to source data and consent grant.
MVP behavior:
- Document chunks are stored with source, owner, timestamp, and consent grant.
- Embeddings are created only through approved model adapters.
- Retrieval returns memory records plus provenance.
Future behavior:
- Memory consolidation into higher-level autobiographical summaries.
- Preference model and personal ontology.
- Conflict detection between stale and current memories.
Implemented (P2/P2.1, 2026-06-26): one encrypted sqlite vault — FTS5 (BM25) + float32-blob embeddings with flat cosine at personal scale; chunks carry denormalized Origin facets. Retrieval = consent/provenance pre-filter → hybrid (dense + BM25 + RRF) → parent-merge → cited records; embedder multilingual-e5-base on MLX (semantic + cross-lingual). Memory records are CanonicalItems (shared normalization). Code: app/osx/hinetd/hinetd/{vault,memory,embedder,chunking}.py; design: RAG Architecture + Canonical Record.
model-adapter
Responsibilities:
- Provide one interface for local and approved remote models.
- Enforce consent policy before prompt construction and execution.
- Log model calls and outputs.
- Support future adapter training and local fine-tuning.
MVP behavior:
infer(request)receives context, prompt, policy, and model target.- The adapter redacts or refuses data based on policy.
- Outputs include model metadata and audit IDs.
Future behavior:
- LoRA or adapter training.
- Prompt tuning.
- Petals-style distributed model calls.
- qCore routed inference.
node-api
Responsibilities:
- Expose local user and developer APIs.
- Provide endpoints for identity, consent, ingestion, memory search, inference, consolidation, export, and status.
- Keep dangerous operations behind local authentication.
MVP endpoints:
GET /node/profilePOST /consent/grantsDELETE /consent/grants/{grant_id}POST /ingest/filesPOST /memory/searchPOST /inference/localPOST /consolidation/runPOST /node/exportPOST /node/kill-switchGET /audit/events
audit-log
Responsibilities:
- Record security-sensitive and intelligence-sensitive operations.
- Link operations to user identity, consent grant, source records, model target, and output.
- Support future settlement and dispute resolution.
MVP behavior:
- Append-only local table.
- Event hash chain to detect tampering.
- Exportable event log.
Future behavior:
- Signed event receipts.
- qCore and aCore execution transcripts.
- Selective disclosure proofs for disputes.
peer-protocol
Responsibilities:
- Prepare the node for network identity, discovery, qCore participation, and aCore execution.
- Define message schemas before production networking exists.
- Support local simulation for protocol tests.
MVP behavior:
- Peer messages are schema-only or local simulation.
- Node can produce a signed peer announcement.
- Node can evaluate a qCore participation request against consent policy.
Future behavior:
- libp2p PeerId and pubsub.
- DHT or delegated routing.
- Encrypted peer channels.
- Reputation, capability advertisements, and availability proofs.
Data Contracts
Contracts are shown in YAML-like form for readability. They are not final wire formats.
NodeProfile
node_id: "icore_..."
owner_label: "local user controlled label"
public_keys:
identity: "..."
signing: "..."
device:
device_id: "..."
capabilities:
cpu: "..."
gpu: "optional"
memory_gb: 16
network:
peer_enabled: false
qcore_enabled: false
created_at: "2026-04-29T00:00:00Z"
ConsentGrant
grant_id: "grant_..."
owner_node_id: "icore_..."
scope:
data_sources: ["local_file_import"]
operations: ["ingest", "embed", "local_inference", "consolidate"]
model_targets: ["local"]
network_exposure: "none"
retention:
raw_data: "until_revoked"
derived_memory: "until_deleted"
requires_human_approval: false
created_at: "..."
revoked_at: null
signature: "..."
MemoryRecord
memory_id: "mem_..."
owner_node_id: "icore_..."
source:
source_id: "src_..."
source_type: "file"
consent_grant_id: "grant_..."
content:
text: "..."
summary: "optional"
embedding:
vector_ref: "vec_..."
model: "..."
provenance:
created_by: "ingestion_job"
created_at: "..."
source_hash: "..."
InferenceRequest
request_id: "infer_..."
owner_node_id: "icore_..."
prompt: "..."
context_policy:
use_memory: true
max_records: 12
sensitivity_ceiling: "private_local"
model_target: "local"
consent_grant_id: "grant_..."
InferenceResponse
request_id: "infer_..."
response_id: "resp_..."
answer: "..."
model:
target: "local"
model_id: "..."
sources:
memory_ids: ["mem_..."]
audit_event_id: "audit_..."
signature: "optional local signature"
PeerAnnouncement
node_id: "icore_..."
capabilities:
local_inference: true
qcore_participation: false
acore_execution: false
availability:
status: "local_only"
policy_summary:
requires_explicit_approval: true
signed_at: "..."
signature: "..."
AuditEvent
event_id: "audit_..."
event_type: "inference.local.completed"
actor_node_id: "icore_..."
consent_grant_id: "grant_..."
input_hash: "..."
output_hash: "..."
previous_event_hash: "..."
created_at: "..."
signature: "..."
Protocol Sketches
iCoreTrainingRound
Purpose: local or federated learning step that evolves an iCore while preserving owner consent.
MVP local flow:
- Select approved data by consent grant.
- Build a training or consolidation dataset.
- Produce summaries, embeddings, preference updates, or adapter updates.
- Record artifact hashes and policy decisions.
- Let the user inspect and roll back outputs.
Future decentralized flow:
- qCore or network posts a training round manifest.
- iCore policy engine evaluates eligibility and consent.
- iCore trains locally on private data.
- iCore emits an update commitment, not raw data.
- Secure aggregation, differential privacy, or swarm learning protocol merges updates.
- Compensation event is recorded for accepted contribution.
Key open issue:
The network must define which updates are safe to share and how to prevent model inversion, membership inference, poisoning, and free-riding.
qCoreInferenceSession
Purpose: compose multiple iCores into a larger reasoning system.
Flow:
- Caller submits task, budget, sensitivity class, and desired capabilities.
- Router finds candidate iCores by capability, consent, reputation, availability, and expected contribution.
- Candidate iCores accept, reject, or request human approval.
- Session forms a qCore membership set.
- qCore runs one of several inference modes: - independent committee answers, - routed Mixture-of-Experts style expert calls, - Petals-like distributed model path, - hierarchical deliberation, - federated retrieval and synthesis.
- qCore produces a final output with participation receipt.
- Settlement records compensation obligations.
Research direction:
The qCore should eventually support holographic inference: each participant remains a usable local model or model committee, while the composition acts as a larger model.
QuorumMembership
Purpose: define who participates in qCore or aCore work.
Fields:
- Session ID.
- Participant node IDs.
- Selection rule.
- Consent grant IDs.
- Required threshold.
- Timeout.
- Compensation terms.
- Slashing or reputation terms.
- Transcript policy.
AgentExecutionDuty
Purpose: assign an aCore execution to a verifier/operator quorum.
Flow:
- Caller invokes aCore endpoint.
- Network selects operators based on stake, reputation, capability, diversity, and availability.
- Operators receive encrypted execution package or TEE/zk-compatible workload.
- Operators execute independently.
- Operators produce signed commitments to outputs and metadata.
- Thought convergence protocol determines final output object.
- Operators threshold-sign the final output object.
- Result is returned with proof and audit transcript.
ThoughtConvergenceRound
Purpose: bridge stochastic agent reasoning and deterministic signing.
Flow:
- Each operator proposes an output commitment.
- Operators reveal output summaries and validation metadata.
- Convergence engine clusters outputs by exact match, schema equality, embedding similarity, contradiction tests, or task validators.
- Candidate output must cross threshold alpha.
- For high-risk duties, candidate must remain stable for beta rounds.
- Operators sign the final canonical output, final structured output, or final answer bundle.
Important rule:
Threshold signatures should sign exact canonical bytes. Semantic similarity can help choose those bytes, but it is not itself a replacement for message equality in cryptographic signing.
ThresholdSignedOutput
output_id: "out_..."
acore_id: "acore_..."
session_id: "sess_..."
canonical_output:
content_type: "application/json"
bytes_hash: "..."
agreement:
threshold: "2-of-3"
mode: "semantic_consensus_with_canonicalization"
alpha: 2
beta: 2
participants:
- node_id: "icore_..."
commitment_hash: "..."
signed: true
transcript_hash: "..."
signature:
scheme: "BLS-threshold"
value: "..."
Decentralized Network Layer (companion specs)
The node's network participation is specified in four companion docs; this section fixes the cross-cutting contracts they share (from the integration note) so implementations stay consistent.
- Node Identity & Registry — owner-held key,
node_id, and the centralhinet-registry(own GCP resources) indexing the node pool + capabilities. - Network Routing & Quorum Aggregation — the three ask-modes, the sovereign per-query router, committee/MoErging aggregation, P2P.
- Decentralized Grand Monorepo — git-like code contribution on a decentralized FS (IPFS/IPLD).
- Onboarding & Harness — the first-run funnel + our own agent harness + dev-tool integration.
Shared contracts (load-bearing — must not drift):
- One identity everywhere. One Ed25519 key per iCore;
node_idself-certifying (authoritative derivation undernode-identity). The same key signs the audit chain, registration, quorum receipts, and monorepo commits. Genesisk_id(fixes the id forever) vs rotatablek_sign(day-to-day signing). - Registry = index, never authority. One
hinet-registryon dedicated HiNet resources in the Quorumz GCP project; the owner-signedNodeRecord(node_id → pubkey → capabilities → endpoint → membrane → liveness) is the single shared record. Because records are signed + ids self-certify, the registry can withhold/reorder but cannot forge → DHT migration stays tractable. Canonical API surface =/v1/*. (Nothinetd/registry.py, which is the local MLX model registry.) - Routing seam. Registry answers "who plausibly matches" (pgvector ANN over competence centroids + tag filter + membrane pre-filter); the router runs on the asker's node and makes the decision.
declaredcompetence is unweighted untilchallenged/usage-proven (sybil defense). - One economy. Routing
QueryReceiptand monorepoAttributionRecordare the same pay-per-use primitive:pool = price − platform_share, split by contribution weight, signed receipts appended to the audit chain; MVP computes + logs locally, settlement deferred. Membrane/lease rules identical in both. - No-leak invariant. Only filtered text /
Δ_public-derived artifacts leave; raw vault,Δ_private, weights never do; receipts carry hashes, not content. Competence signatures are computed from theΔ_public/DeltaView surface.
Phased build (integration note): P0 local (onboarding + identity + harness + dev-CLI — largely built) → P1 registry + ask-network (committee, signed receipts) → P2 signed-HTTP transport + monorepo MVP + auto routing → P3 libp2p/DHT + attested MoErging + settlement. Open decisions (P2P phasing, decentralized-FS, central-vs-DHT registry, aggregation default) are tracked in the integration note.
Holographic Fractal Training And Inference
The functional spec asks for a decentralized weight system that allows each node to function as a neural network and any collection of nodes to assemble into a larger neural network. Technically, this is the hardest research track in HiNet.
Candidate technical interpretations:
- iCore as personalized adapter: each user owns local memory, preferences, and adapters over a shared base model.
- iCore as expert module: qCore routes tasks to relevant iCores like a sparse MoE.
- iCore as federated learner: iCores perform local training and share privacy-preserving updates.
- iCore as retrieval expert: each node contributes private retrieval, summaries, or judgments without exposing raw data.
- iCore as model block host: advanced nodes host layers or modules in a Petals-like distributed path.
- qCore as deliberative committee: multiple iCores reason independently and converge through a protocol.
The MVP should implement options 1, 4, and 6 in local or simulated form. Options 2, 3, and 5 require deeper research and network infrastructure.
Research Questions
- Routing: how does the network select the right iCores for a task?
- Composition: are qCores committees, MoE routers, distributed model paths, or hybrids?
- Training: what updates can be shared safely?
- Attribution: how is contribution measured across retrieval, reasoning, validation, and model updates?
- Stability: how do iCores evolve without catastrophic forgetting or runaway drift?
- Fractality: what invariant ensures a subset of iCores remains a useful intelligence system?
- Holography: can a qCore be decomposed into smaller qCores without losing core function?
Near-Term Experiments
- Single iCore local memory plus model adapter.
- Simulated qCore with three local personas or model adapters.
- Semantic consensus over independent answers.
- Local adapter or preference update from nightly consolidation.
- Federated learning toy example with secure aggregation.
- MoE-style router over user-controlled local experts.
aCore Verification Research
SSV Analogy
SSV uses secret sharing, BFT consensus, and BLS threshold signatures for deterministic validator duties. Operators agree on the exact duty data, produce partial signatures, and aggregate them into a valid validator signature.
HiNet can borrow:
- Operator quorum assignment.
- Threshold key shares.
- Pre-consensus, consensus, and post-consensus phases.
- Partial signatures.
- Aggregated final signature.
- Fault tolerance assumptions such as
n >= 3f + 1.
HiNet cannot directly copy:
- Deterministic duty data, because agent outputs are stochastic.
- Exact consensus assumptions, because useful answers may be semantically equivalent but byte-different.
- Slashing rules, because correctness of natural language or agentic action can be subjective.
Canonicalization Strategy
The protocol should converge before signing.
Recommended signing object:
- A canonical JSON output.
- A transcript hash.
- A list of participant commitments.
- A convergence mode.
- A policy and validator set.
- A dissent record if applicable.
This makes signatures verify exact bytes while preserving a record of semantic convergence.
Verification Tiers
Tier 0: Local audit only.
Tier 1: Multi-operator semantic consensus with signed transcript.
Tier 2: Threshold signature over canonical output.
Tier 3: TEE attestation for code/model environment.
Tier 4: Optimistic dispute and fraud proof.
Tier 5: zkML or zkAgent proof for bounded computations.
The MVP should implement Tier 0 in local form and specify Tier 1 and Tier 2 data structures.
Security And Privacy Requirements
Local Node
- Protect private keys.
- Encrypt sensitive data at rest before real users.
- Require local authentication for control APIs.
- Redact or block external model calls by policy.
- Maintain an append-only audit log.
- Provide export and delete paths.
Network Participation
- Authenticate peers.
- Encrypt peer messages.
- Prevent replay with nonces and timestamps.
- Rate-limit qCore and aCore requests.
- Validate consent before every outbound contribution.
- Isolate untrusted agent execution.
Model Safety
- Prevent accidental leakage of private data in prompts.
- Track derived memories and source provenance.
- Protect against prompt injection from imported content.
- Treat remote models as data processors requiring explicit consent.
- Evaluate poisoning risks before federated training.
Roadmap
Phase 0: Repo And Docs
- Commit concept docs.
- Expand functional spec.
- Add technical spec.
- Create implementation backlog from specs.
Phase 1: Local iCore MVP
- Local node identity.
- Local vault.
- Consent grants.
- File ingestion.
- Memory index.
- Local inference adapter.
- Audit log.
- Kill switch.
Phase 2: Personal Intelligence Loop
- Nightly consolidation.
- Memory summaries.
- Preference updates.
- Local adapter training experiment.
- Export and encrypted backup.
Phase 3: Simulated qCore
- Multi-iCore simulation on one machine.
- qCore routing and membership protocol.
- Committee inference.
- Semantic consensus.
- Contribution receipts.
Phase 4: Peer Network Prototype
- libp2p identity and discovery.
- Signed peer announcements.
- Encrypted qCore requests.
- Consent-gated participation.
- Basic reputation and availability.
Phase 5: aCore Prototype
- Addressable agent package.
- Agent execution duty schema.
- Multi-operator execution simulation.
- Thought convergence rounds.
- Threshold signature proof of canonical output.
Phase 6: Research Integrations
- Swarm learning experiment.
- Federated learning with secure aggregation.
- Petals-style distributed inference experiment.
- TEE attestation proof of concept.
- zkML or zkAgent feasibility study.
Reference Dependencies
Research and implementation references:
- Petals: collaborative inference and fine-tuning: https://arxiv.org/abs/2209.01188
- Hivemind decentralized deep learning: https://github.com/learning-at-home/hivemind
- Swarm Learning: https://www.nature.com/articles/s41586-021-03583-3
- Flower federated learning: https://flower.ai/
- Mixture-of-Experts survey: https://arxiv.org/abs/2407.06204
- Modular deep learning survey: https://arxiv.org/abs/2302.11529
- Quorum sensing wisdom of crowds: https://www.nature.com/articles/s41467-023-37950-7
- Neural-like microbial consortia: https://www.nature.com/articles/s41467-021-23336-0
- libp2p: https://libp2p.io/
- Helia/IPFS: https://github.com/ipfs/helia
- Automerge local-first sync: https://automerge.org/
- SSV protocol: https://github.com/ssvlabs/ssv-spec
- BLS signatures: https://www.ietf.org/archive/id/draft-irtf-cfrg-bls-signature-06.html
- Aegean multi-agent consensus: https://arxiv.org/html/2512.20184v1
- Threshold AI oracle direction: https://supra.com/documents/Threshold_AI_Oracles_Supra.pdf
- Private ML SDK and TEEs: https://github.com/nearai/private-ml-sdk
- zkAgent verifiable execution: https://eprint.iacr.org/2026/199