Large language models have progressed from the single-turn question-answering paradigm to multi-turn agents that plan tasks, call external tools, and interact with other agents over a shared data channel [
1]. This progression toward agentic deployments, where an orchestrator calls tools, retrieves external context, and delegates subtasks to other models, has expanded the attack surface far beyond that of a single prompt window [
2,
3]. From software engineering to health care, agentic LLM pipelines are being infused into production processes, and security has become a top priority for both system designers and users [
4].
These pipelines must be secure on two fronts: the integrity of the data passed between agents, and the fidelity of agents to the instructions they have been given. Prompt-injection attacks target both aspects by embedding malicious prompts in data payloads, tool outputs, or retrieved documents, thereby disrupting an agent’s control flow without altering the model’s weights [
5]. Cryptographic attestation, long used in trusted computing, can verify data payloads to ensure they have not been tampered with in transit [
6,
7]. Separately, recent work in representation engineering and activation-space analysis has shown that harmful or abnormal inputs cause observable changes in the distribution of a LLM’s internal representations [
8]. Although each front has advanced independently, no protocol currently combines cryptographic data integrity verification with activation-level anomaly monitoring for rapid response to prompt injection in agentic LLM networks.
The challenge has three aspects. First, inter-agent communication channels carry natural-language messages that have no type signatures amenable to traditional input validation, so an attacker may inject instructions anywhere in the data [
9,
10]. Second, adaptive attacks can defeat a detection-only defense by optimizing adversarial suffixes that appear in-distribution at the surface level but change the agent’s deeper behavior [
11]. Third, although cryptographic proofs of data provenance are tamper-evident, they reveal nothing about whether a syntactically valid message contains semantically malicious content [
6]. The motivation for this work is captured in
Figure 1, which shows a natural complementarity between detection-only and attestation-only defenses: an adaptive attacker can exploit the gap left by one while the other is closed.
Prior work has addressed aspects of this problem. Game-theoretic detection trains a LLM to detect contaminated inputs but not data provenance [
5]. An execution-isolation architecture sandboxes each agent but cannot detect injections delivered through legitimate data channels [
12]. Instruction hierarchies assign privileges to training data but remain vulnerable to optimization-based adaptive attacks. Zero-knowledge proofs verify the correctness of model inference computations but are too costly to deploy per message in real-time multi-agent pipelines [
6,
7]. None of these offers a single protocol for both data integrity and activation-level anomaly detection in a multi-agent environment.
1.1. Novelty and Key Technical Innovations
While each individual component of SPI-Net draws on established principles—Merkle-tree attestation, Mahalanobis distance anomaly detection, and Bayesian evidence fusion—their combination into a unified, real-time, per-message security protocol for agentic LLM networks constitutes a genuinely novel contribution. The specific innovations are as follows.
First, the CAM extends classical Merkle-tree constructions to the tokenized message level, enabling constant-time tamper detection and linear-depth chain-of-custody tracing across arbitrarily long agent chains. No prior agentic security framework provides per-message provenance verification at this granularity. Second, the AAD is the first application of layer-wise Mahalanobis scoring to the inter-agent communication setting. Unlike single-model activation defenses that operate on a fixed input distribution, the AAD must handle the heterogeneous activation statistics induced by multi-hop message forwarding; the EWMA calibration mechanism in Equations (25) and (26) addresses this challenge explicitly. Third, the TPC introduces a Bayesian fusion rule that is aware of per-edge trust history, allowing the protocol to adapt its reliance on each channel dynamically rather than using a fixed weighting. This design is qualitatively different from simply thresholding two independent detectors. Fourth, the integration of these three modules into a single, low-latency (38 ms median) pipeline deployable without retraining any agent LLM represents a system-level contribution with direct practical relevance.
1.2. Relation to Symmetry and Asymmetry
The concept of symmetry in SPI-Net is associated with the preservation of consistent security properties across the communication boundary between autonomous LLM agents. Consider a message
transmitted from agent
to agent
. In a trustworthy communication process, the payload verified by the receiving agent should preserve the security-relevant properties established by the sending agent. At the cryptographic level, this relationship can be expressed conceptually as
where
denotes the integrity state committed by the sender, and
denotes the integrity state reconstructed and verified by the receiver. Equation (
1) does not require the two agents to perform identical computations; rather, it denotes an invariant security relationship in which both sides of the communication boundary agree on the provenance and integrity of the same payload.
For the Cryptographic Attestation Module (CAM), this symmetry is realized through the Merkle-root and signature verification process. If
denotes the Merkle commitment generated by the transmitting agent and
is the root reconstructed by the receiving agent, an intact message satisfies
together with successful verification of the sender’s digital signature,
Hence, message tampering introduces a symmetry-breaking event,
which is detected by the CAM before the manipulated payload is accepted by the receiving agent. In this sense, the cryptographic component of SPI-Net preserves structural integrity symmetry across the sender–receiver boundary.
A second form of symmetry is considered in the model’s internal representation space. Let
denote the hidden-state representation of message
m at layer
l, while
and
characterize the reference distribution of benign activations. For normal traffic, hidden representations are expected to remain statistically compatible with this reference distribution. The Mahalanobis score
quantifies the degree to which this expected statistical relationship is preserved. A prompt injection can leave the surface form of a message apparently legitimate while causing its internal representation to move away from the benign activation region. Such a shift constitutes behavioral asymmetry between the observed activation state and the trusted reference state. The Activation Anomaly Detector (AAD) therefore interprets sufficiently large deviations as evidence of symmetry breaking in activation space.
The distinction between the two forms of symmetry is important. The CAM evaluates whether the structural identity and provenance of a payload remain consistent, whereas the AAD evaluates whether the behavior induced by that payload remains statistically consistent with benign operation. A malicious message can therefore preserve one relationship while violating the other. For example, an attacker controlling an otherwise legitimate source may produce a correctly signed and cryptographically valid message containing a semantically malicious instruction. Such a message can satisfy the cryptographic relation
while simultaneously producing anomalous internal representations such that
Conversely, manipulation of an otherwise benign payload during transmission may immediately break the cryptographic integrity relation even before its semantic influence is evaluated. SPI-Net consequently treats integrity as a joint property rather than assuming that either structural or behavioral symmetry alone is sufficient.
The Trust Propagation Consensus (TPC) further captures an asymmetric property of real multi-agent systems. Because the communication graph is directed, the trust associated with the channel
need not equal the trust of the reverse channel
:
This directional asymmetry is desirable because security evidence, historical behavior, and exposure to attacks may differ across communication directions. The TPC therefore does not artificially impose global symmetry on heterogeneous agent relationships. Instead, it uses local asymmetric trust estimates to determine how strongly cryptographic and behavioral evidence should influence the final integrity decision.
The symmetry perspective therefore provides a unified interpretation of the three SPI-Net modules. The CAM preserves sender–receiver integrity symmetry, the AAD detects symmetry breaking between benign and attack-induced activation distributions, and the TPC manages the legitimate trust asymmetry that arises in directed multi-agent communication. SPI-Net accepts a message when sufficient agreement exists between these complementary security views and rejects it when structural or behavioral symmetry is violated. Thus, symmetry and asymmetry provide a conceptual framework for understanding how cryptographic provenance, activation behavior, and directional trust jointly establish secure communication in agentic LLM networks.
The rest of this article is organized as follows.
Section 2 discusses the gap in related work.
Section 3 presents the problem formulation and system model.
Section 4 describes the proposed SPI-Net methodology.
Section 5 discusses the Trust Propagation Consensus mechanism.
Section 6 reports the experimental evaluation.
Section 7 concludes and outlines future work.