Author: Denis Avetisyan
As artificial intelligence increasingly relies on interconnected agents, detecting sophisticated attacks requires tracing the flow of information between them.

This paper introduces MAScope, a framework for reconstructing cross-agent semantic flows to identify and mitigate indirect prompt injection attacks in multi-agent systems.
While conventional security measures focus on sanitizing initial inputs, increasingly complex Multi-Agent Systems (MAS) present vulnerabilities through unstructured inter-agent communication and indirect prompt injection. This paper, ‘Beyond Input Guardrails: Reconstructing Cross-Agent Semantic Flows for Execution-Aware Attack Detection’, introduces MAScope, a framework that shifts the defensive paradigm to execution-aware analysis by reconstructing cross-agent semantic flows into comprehensive behavioral trajectories. By leveraging a Supervisor LLM to scrutinize these flows, MAScope effectively detects diverse, multi-stage attacks with F1-scores up to 85.3%, offering a significant advancement in MAS security. Could this approach to provenance analysis and semantic flow reconstruction provide a more robust foundation for securing increasingly autonomous and interconnected AI systems?
The Expanding Threat Landscape of Multi-Agent Systems
Contemporary applications are increasingly architected around multi-agent systems – networks of autonomous entities that coordinate to achieve complex goals. This trend, while enabling remarkable functionality in areas like smart cities, automated finance, and robotics, simultaneously expands the potential attack surface for malicious actors. Each agent represents a potential entry point, and the intricate web of interactions between them creates opportunities for subtle compromise and propagation of threats. Unlike traditional monolithic systems, where security focused on a defined perimeter, these distributed architectures demand a more nuanced approach, as vulnerabilities can emerge not from a single point of failure, but from the unpredictable behavior arising from agent collaboration and competition. The sheer scale and dynamism of these interactions often overwhelm conventional monitoring tools, necessitating innovative security paradigms capable of adapting to constantly evolving system states.
Conventional security protocols, designed to safeguard network perimeters, prove increasingly inadequate when confronting multi-agent systems. These systems, composed of numerous interacting entities, present a unique challenge: discerning malicious intent becomes significantly more difficult when assessing not just incoming traffic, but the internal communications and actions of each agent. Traditional methods often lack the granularity to validate whether an agent’s behavior, while not technically a breach of external rules, is nonetheless deviating from its intended purpose or exhibiting signs of compromise. This inability to reliably ascertain an agent’s objectives creates critical vulnerabilities, as a seemingly benign actor can be subtly manipulated or become a vector for attacks that bypass conventional defenses. The sheer volume of internal interactions within these systems further complicates monitoring efforts, leaving ample opportunity for covert malicious activity to flourish undetected.
As multi-agent systems become increasingly prevalent, conventional cybersecurity strategies centered on perimeter defense are proving inadequate. The sheer intricacy arising from numerous interacting agents necessitates a fundamental shift towards internal behavioral analysis. Rather than solely focusing on preventing external breaches, security efforts must now prioritize continuous monitoring of agent interactions and the detection of anomalous behavior within the system. This proactive approach involves establishing baselines of normal operation for each agent and employing machine learning algorithms to identify deviations that could indicate malicious activity or compromised functionality. By concentrating on what agents do rather than simply who or what they are, security protocols can adapt to evolving threats and mitigate risks even when perimeter defenses are bypassed, offering a more resilient and nuanced security posture for these complex systems.

MAScope: A Framework for Semantic Understanding
MAScope distinguishes itself from traditional security frameworks by shifting focus from purely syntactic or signature-based detection to an analysis of semantic relationships. This involves representing agents – software components, users, or processes – and their actions as nodes and edges within a semantic graph. By modeling these relationships, MAScope moves beyond simply identifying what an action is to understanding why it is being performed and how it relates to other actions within the system. This approach allows for the detection of anomalous behavior based on deviations from expected semantic patterns, rather than relying solely on pre-defined signatures or known malicious code. The framework therefore enables a more nuanced and context-aware security posture, capable of identifying both known and novel threats.
MAScope utilizes semantic graphs to model agent interactions as nodes representing agents and edges denoting relationships and data exchanges. These graphs facilitate the representation of complex interactions beyond simple sequential logs, capturing the context of each action. Each node contains metadata regarding the agent, while edges detail the specific data being transferred, the control flow initiated, and the permissions involved. This granular representation allows for detailed tracing of data provenance and control propagation, enabling the system to monitor not just what actions are taken, but how data influences those actions and the resulting system state. The framework employs graph traversal algorithms to analyze these relationships, identifying patterns and anomalies indicative of potentially malicious or unintended behavior.
MAScope identifies anomalous activity by establishing a baseline of expected information flow within a system and subsequently monitoring for deviations from this baseline. The framework tracks data provenance and control flow, recording how information is accessed, modified, and utilized by different agents. Any observed instance where data traverses an unexpected path, is accessed by an unauthorized agent, or results in an unintended state change is flagged as a potential anomaly. This deviation detection is performed through continuous monitoring and comparison against the established behavioral model, allowing MAScope to pinpoint potentially malicious actions or configuration errors that compromise system integrity.

Enhanced Visibility Through Integrated Data Collection
MAScope achieves comprehensive agent activity data collection by integrating with both application-layer telemetry and kernel-level monitoring systems. Application-layer telemetry provides insights into agent behavior as observed through application interactions, including API calls, data transfers, and user interface events. Kernel-level monitoring, conversely, captures low-level system activity directly from the operating system kernel, such as process creation, file access, and network connections. This dual-source approach ensures a complete picture of agent operations, encompassing both high-level application logic and underlying system interactions, and eliminates single points of failure in data collection.
MAScope employs provenance graphs to establish and maintain a detailed record of data origins and transformations. These graphs map the complete lifecycle of data, documenting each step from initial creation or ingestion through all subsequent processing and modification. This lineage tracking is critical for security investigations, enabling analysts to trace the source of potentially malicious data, verify data integrity, and reconstruct the sequence of events leading to a security incident. The framework records not only what data was processed, but also how and by whom, providing a robust audit trail for forensic analysis and compliance reporting. Each node in the graph represents a data element or processing step, with edges defining the relationships and dependencies between them.
MAScope’s anomaly detection capabilities are achieved by correlating data from application-layer telemetry and kernel-level monitoring. This combination allows the system to establish a baseline of normal agent behavior and identify deviations that may indicate malicious activity. Subtle anomalies, such as unusual process interactions, unexpected network connections, or atypical resource consumption, are flagged for further investigation. By analyzing these combined data sources, MAScope reduces false positives and improves the accuracy of threat detection compared to relying on single data streams, uncovering threats that might otherwise remain hidden within normal system activity.
The combination of application-layer telemetry and kernel-level monitoring within MAScope provides a detailed record of agent behavior, enabling the identification of intricate interaction patterns. This comprehensive data aggregation allows for the correlation of events across multiple system layers, revealing anomalies indicative of malicious activity that would be obscured when analyzing data from isolated sources. By establishing a baseline of normal agent interactions, MAScope facilitates proactive threat detection through the identification of deviations from expected behavior, reducing the time to identify and respond to potential security incidents. This increased visibility is critical for understanding the scope and impact of complex attacks and for implementing effective mitigation strategies.

Fortifying Defenses and Charting Future Pathways
MAScope presents a robust defense against prevalent security threats, directly addressing vulnerabilities detailed in the widely recognized OWASP Top 10. The framework is engineered to counter attacks like indirect prompt injection – where malicious instructions are subtly embedded within seemingly benign data – and privilege escalation, which seeks unauthorized access to sensitive system functions. By proactively identifying and neutralizing these risks, MAScope safeguards agent systems from manipulation and misuse. This mitigation is achieved through a combination of semantic flow analysis and input validation, ensuring that only authorized and safe interactions are permitted, thereby bolstering the overall security posture of interconnected applications and preventing potential breaches.
MAScope secures agent systems by meticulously examining the semantic flows within interactions, effectively charting how information travels and transforms as an agent processes requests. This analysis goes beyond simple keyword detection, enabling the framework to discern malicious inputs crafted to subtly manipulate an agent’s decision-making process. By understanding the intended meaning and logical progression of data, MAScope can identify and block attempts to exploit vulnerabilities such as indirect prompt injection or privilege escalation, even when those attacks are disguised within seemingly benign language. This proactive approach safeguards against unintended behaviors and ensures the agent operates according to its intended parameters, bolstering the reliability and security of increasingly complex AI systems.
Evaluations reveal that MAScope achieves an impressive 85.3% F1-score in detecting end-to-end attacks at the node level, indicating a robust capacity for identifying malicious activity within agent systems. This performance significantly surpasses that of existing baseline methods, highlighting MAScope’s enhanced ability to discern between legitimate interactions and harmful manipulations. The F1-score, a harmonic mean of precision and recall, demonstrates a strong balance between minimizing false positives and ensuring comprehensive attack detection, suggesting a reliable and effective security framework for complex agent-based applications. Such a high score validates the approach to semantic flow analysis and provides a strong foundation for future development in automated threat response and integration with advanced machine learning techniques.
The MAScope framework demonstrates a marked improvement in identifying and extracting sensitive information from agent interactions, achieving a 76.8% F1-score for sensitive entity extraction. This represents a significant advancement over existing methods, which yielded baseline F1-scores of only 48.2% and 49.4%. This enhanced capability allows MAScope to more effectively pinpoint and protect confidential data, such as personally identifiable information or proprietary details, that could be targeted during malicious attacks. The substantial increase in performance underscores the framework’s ability to discern relevant entities with greater accuracy, bolstering the security of increasingly sophisticated agent-based systems and minimizing the risk of data breaches.
Development of MAScope is poised to extend beyond robust threat detection, with ongoing research concentrating on fully automated responses to identified vulnerabilities. This includes the implementation of self-mitigation strategies triggered by malicious input detection, reducing the need for manual intervention and enhancing system resilience. Furthermore, integration with advanced machine learning algorithms – including reinforcement learning and generative models – promises to refine MAScope’s ability to anticipate novel attack vectors and adapt its defenses dynamically. This proactive approach aims to move beyond simply identifying threats to predicting and neutralizing them before they can impact agent systems, ultimately creating a more secure and intelligent framework for increasingly complex applications.
The escalating complexity of multi-agent systems demands robust security measures, and MAScope delivers a remarkably precise solution. Achieving 96.5% precision in identifying malicious inputs, the framework minimizes false positives, ensuring legitimate interactions are not disrupted while effectively shielding against potential threats. This high level of reliability is critical as interconnected agents increasingly handle sensitive data and control critical functions; a low false-positive rate builds trust and enables seamless operation even under adversarial conditions. MAScope’s performance suggests a significant advancement in securing these dynamic systems, offering a practical and dependable approach to maintaining integrity and preventing unauthorized manipulation within increasingly sophisticated agent networks.

The pursuit of security in multi-agent systems, as detailed in this work, necessitates a rigorous understanding of information flow. It demands distilling complex interactions into their essential components – a principle echoing David Hilbert’s assertion: “We must be able to answer the question: what are the ultimate logical foundations of mathematical thought?” MAScope, by reconstructing semantic flows between agents, attempts precisely this – to reveal the underlying logic of agent communication and expose vulnerabilities hidden within multi-stage attacks. The framework’s focus on provenance analysis and detection of indirect prompt injection exemplifies a drive toward foundational clarity, mirroring Hilbert’s ambition to establish a firm basis for reasoning within a complex system.
Further Horizons
The reconstruction of semantic flows, as demonstrated, offers a necessary, if imperfect, lens through which to view the vulnerabilities inherent in multi-agent systems. The current work addresses a critical gap – the detection of attacks that move between agents – yet acknowledges the inherent difficulty in defining ‘malicious intent’ within a purely semantic space. The challenge is not merely to trace information, but to interpret its purpose, a task still reliant on heuristics and, ultimately, human judgement.
Future efforts should prioritize the development of more robust methods for discerning legitimate collaboration from adversarial manipulation. The focus must shift from passive reconstruction to predictive analysis – anticipating potential attack vectors before they fully manifest. This necessitates a deeper integration of formal methods, capable of verifying the safety and security of agent interactions, with the adaptability of current machine learning approaches.
Ultimately, the true measure of success will not lie in the complexity of the detection mechanisms, but in their simplicity. A system that requires ever-increasing layers of analysis to identify a threat has already failed. The goal, then, is not to build a more elaborate cage, but to cultivate a more resilient garden – one where malicious seeds are unable to take root in the first place.
Original article: https://arxiv.org/pdf/2603.04469.pdf
Contact the author: https://www.linkedin.com/in/avetisyan/
See also:
- EUR USD PREDICTION
- Epic Games Store Free Games for November 6 Are Great for the Busy Holiday Season
- TRX PREDICTION. TRX cryptocurrency
- Xbox Game Pass September Wave 1 Revealed
- How to Unlock & Upgrade Hobbies in Heartopia
- Battlefield 6 Open Beta Anti-Cheat Has Weird Issue on PC
- Sony Shuts Down PlayStation Stars Loyalty Program
- The Mandalorian & Grogu Hits A Worrying Star Wars Snag Ahead Of Its Release
- How to Increase Corrosion Resistance in StarRupture
- Best Ship Quest Order in Dragon Quest 2 Remake
2026-03-07 16:13