arXiv:2610.01250cs.CROct 2026

Manuscript Offprint

arXiv:2610.01250

A Resource-Aware Behavior Reconstruction and Hierarchical Semantic Learning Framework for Host Intrusion Detection

Youli Tao, Rui Tang, Hao Ren, Chengsheng Zhou, Dengzhe Wang, Shuyu Jiang, Xingshu Chen

Youli Tao, Rui Tang, Hao Ren, Member, IEEE, Chengsheng Zhou, Dengzhe Wang, Shuyu Jiang, and Xingshu Chen

Abstract—System calls (syscalls) record key interactions between running programs and the operating system kernel, providing fine-grained and minimally intrusive data for host-based intrusion detection systems (HIDS) deployed in cloud and other modern computing environments. However, existing methods often model syscalls in their original execution order, where sequences from different processes are interleaved, making informative patterns difficult to extract and raising two questions: whether raw syscall sequences can be reorganized in a way that yields more discriminative representations, and how complex attack patterns can be effectively learned from the reorganized sequences. We propose ReSHID, a resource-aware behavior reconstruction and hierarchical semantic learning framework for host intrusion detection. It reconstructs semantically continuous sequences by leveraging syscall semantic invariants to cast subject identity and relationship resolution across PID namespaces as a bipartite matching problem and tracking file descriptor (FD) lifecycles to associate descriptors referring to the same resource. Additionally, features extracted from these sequences are organized into a lightweight subject behavior graph incorporating inter-subject relationships, where GATv2 captures key coordination patterns to model complex attacks involving multiple subjects. Experimental results show that sequence reconstruction combined with the detection method can improve HIDS performance. Even with a lightweight linear classifier, the proposed method achieves the best results among all compared methods in terms of F1-score (98.64%), ROC-AUC (99.80%), and PR-AUC (98.10%), while reducing the number of n-gram features by approximately 75.2% and 44.1% compared with the raw sequences and MGFE, respectively.

Index Terms—Host-based intrusion detection, sequence reconstruction, semantic coherence, anomaly detection, system calls.

I. INTRODUCTION

HOST-BASED intrusion detection systems (HIDS) are essential security mechanisms for detecting malicious activities on hosts [1]. Attackers can compromise host systems through increasingly diverse attack vectors, including

Figure

Fig. 1. The raw sequence contains interleaved operations from different subjects on different objects. Directly extracting n-grams from such a sequence may capture incidental interleavings rather than stable behavioral patterns.

vulnerability exploitation and weak credentials, posing persistent threats to critical services in cloud and other modern computing environments [2], [3]. Regardless of the initial attack vector, achieving an attack objective ultimately requires concrete runtime behaviors to be executed on compromised hosts [4]–[6]. Therefore, continuously monitoring and analyzing host runtime activities remains fundamental to identifying malicious behavior and detecting sophisticated attacks.

Such runtime activities can be characterized through various host-level data sources, among which system calls (syscalls) provide a direct view of interactions between user-space programs and the operating system kernel. As the primary interface through which programs request kernel services, syscalls reflect concrete operations on system resources and therefore serve as an important data source for HIDS [7]–[9]. Accordingly, extensive studies have explored how to characterize host behavior from syscalls for intrusion detection. Existing methods mainly construct behavioral representations from statistical information or syscall sequences. Statistical-feature-based methods characterize program behavior using information such as syscall frequencies [10], [11], while sequence-pattern-based methods preserve syscall ordering information to capture finer-grained execution patterns [12]–[14]. In particular, the n-gram model is widely used due to its simplicity and computational efficiency, extracting fixed-length contiguous syscall subsequences through a sliding window to capture local temporal patterns for HIDS [15]–[21].

Youli Tao, Dengzhe Wang are with the School of Cyber Science and Engineering, Sichuan University, Chengdu, Sichuan 610065, China (e-mail: taoyouli@stu.scu.edu.cn; knightwangww@gmail.com.)

Xingshu Chen, Rui Tang, Hao Ren and Shuyu Jiang are with the School of Cyber Science and Engineering, Sichuan University, Chengdu, China and are also with the Key Laboratory of Data Protection and Intelligent Management, Ministry of Education, China (e-mail: chenxsh@scu.edu.cn; tangrscu@scu.edu.cn; hao.ren@scu.edu.cn; shuyu_jiang@scu.edu.cn).

Chengsheng Zhou is with the School of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing, 100876, China, and also with the Institute of Security, China Academy of Information and Communications Technology, Beijing, 100191, China (e-mail: 2026080042@bupt.cn).

Corresponding author: Xingshu Chen, Rui Tang.

Existing methods typically model host behavior according to the original execution order of syscalls [13], [18], [22],

[23], implicitly treating temporal proximity as an important indicator of behavioral relevance. Under concurrent multi-process execution, syscalls from multi-process execution can be interleaved by runtime scheduling, such that temporally adjacent operations may originate from different processes and involve unrelated system resources. For clarity, we refer to the task (i.e., process or thread) issuing a syscall as the subject and the resource being operated on as the object. As illustrated in Fig. 1, operations involving different subject-object pairs can be interleaved in the raw syscall sequences. Consequently, semantically related operations on the same object may be separated by unrelated events, whereas unrelated operations may be brought together within the same local window merely due to temporal proximity. Such interleaving can make semantically coherent behaviors appear fragmented in the raw sequence, exhibiting a form of behavioral semantic fragmentation. It causes unrelated operations to be encoded together while separating semantically related ones, thereby introducing incidental patterns into sequence features and weakening the representation of discriminative attack behaviors. This distortion is particularly problematic for complex attacks whose identification often relies on capturing coherent behavioral patterns across multiple operations. Accordingly, two questions are raised: can raw syscall sequences be reorganized according to subject-object relationships to better preserve behavioral semantics and yield more discriminative representations than the original execution order? If so, how can the reconstructed behavioral information be effectively organized and learned to capture complex attack patterns across resources and subjects?

Addressing the first question requires more than simply regrouping syscalls by subject or object. Two practical difficulties must be resolved. First, Linux PID namespaces may assign different identifiers to the same task across namespace views, making it necessary to accurately associate identifiers belonging to the same subject and recover subject relationships with low overhead. Second, file descriptors (FDs) provide only local and dynamically evolving references to underlying system resources [24], and FDs held by different tasks may refer to the same resource. Therefore, reconstructing resource-centric behaviors requires accurate and continuous recovery of cross-task resource associations without intrusive kernel modification. The second question concerns how to effectively exploit the reconstructed behaviors for intrusion detection. Complex attacks may involve coordinated activities across multiple subjects and resources, requiring not only the modeling of local behavioral patterns but also the capture of higher-level dependencies among interacting subjects.

To address these issues, we propose ReSHID, a resource-aware behavior reconstruction and hierarchical semantic learning framework for HIDS. It combines Namespace-aware Subject Identity and Relation Association via Invariant Constraints (NIRA) with Object Identity Resolution via FD Propagation (FDProp) to reconstruct syscall sequences according to subject-object relationships, and employs Hierarchical Behavioral Semantic Learning method (HBSL) for end-to-end learning of key behavioral patterns for intrusion detection. The main contributions of this paper are as follows:

• First, we systematically analyze the semantic fragmentation of syscall sequences caused by concurrent multi-process scheduling and propose a sequence reconstruction method based on NIRA and FDProp. NIRA formulates subject relation recovery as a bipartite matching problem and exploits constraints derived from syscall semantic invariants to associate identifiers of the same subject across namespace views. FDProp tracks the FD lifecycle according to syscall semantics to continuously recover mappings between FDs and underlying resources across tasks. By recovering these associations, the method reorganizes interleaved syscalls into more semantically coherent behavioral sequences, providing a more informative basis for extracting intrusion-relevant patterns.

• Second, we propose HBSL, which extracts object-level operation features from the reconstructed sequences and aggregates them by associated subject to obtain subject-level representations. Rather than directly modeling syscalls as a flat sequence or graph, HBSL organizes these representations into a lightweight subject behavior graph, where subject relationships explicitly encode the structural dependencies among runtime behaviors. It then applies GATv2 to adaptively model the behavioral dependencies among interacting subjects and aggregate informative neighborhood semantics, enabling hierarchical learning from resource-level operations to cross-subject malicious coordination patterns.

• Finally, given that mainstream HIDS datasets provide limited syscall information and are less representative of contemporary attacks, we construct and publicly release a new dataset 1^{1}, covering diverse contemporary benign and attack scenarios while preserving fine-grained syscall information such as key arguments. Experiments show that sequence reconstruction can improve HIDS performance compared with raw syscall sequences, whose interleaved structure makes discriminative patterns of complex attacks more difficult to learn. Even with a lightweight linear classifier, our method outperforms representative HIDS methods, achieving an F1-score of 98.64%, a ROC-AUC of 99.80%, and a PR-AUC of 98.10%.

References (42)