SearcharxivSearch

arXiv subjects

Jun Leng

Publications and source records attributed to Jun Leng.

2 recordsLinked to original sources

From static to adaptive: immune memory-based jailbreak detection for large language models

Large Language Models (LLMs) serve as the backbone of modern AI systems, yet they remain susceptible to adversarial jailbreak attacks. Consequently, robust detection of such malicious inputs is paramount for ensuring model safety. Traditional detection methods typically rely on external models trained on fixed, large-scale datasets, which often incur significant computational overhead. While recent methods shift toward leveraging internal safety signals of models to enable more lightweight and efficient detection. However, these methods remain inherently static and struggle to adapt to the evolving nature of jailbreak attacks. Drawing inspiration from the biological immune mechanism, we introduce the Immune Memory Adaptive Guard (IMAG) framework. By distilling and encoding safety patterns into a persistent, evolvable memory bank, IMAG enables adaptive generalization to emerging threats. Specifically, the framework orchestrates three synergistic components: Immune Detection, which employs retrieval for high-efficiency interception of known jailbreak attacks; Active Immunity, which performs proactive behavioral simulation to resolve ambiguous unknown queries; Memory Updating, which integrates validated attack patterns back into the memory bank. This closed-loop architecture transitions LLM defense from rigid filtering to autonomous adaptive mitigation. Extensive evaluations across five representative open-source LLMs demonstrate that our method surpasses state-of-the-art (SOTA) baselines, achieving a superior average detection accuracy of 94\% across diverse and complex attack types.

cs.CR

Unconventional Altermagnetism in Quasicrystals: A Hyperspatial Projective Construction

Altermagnetism, a novel magnetic phase characterized by symmetry-protected, momentum-dependent spin splitting and collinear compensated magnetic moments, has thus far been explored primarily in periodic crystals. In this Letter, we extend the concept of altermagnetism to quasicrystals -- aperiodic systems with long-range order and noncrystallographic rotational symmetries. Using a hyperspatial projection framework, we construct decorated Ammann-Beenker and Penrose quasicrystalline lattices with inequivalent sublattices and investigate a Hubbard model with anisotropic hopping. We demonstrate that interaction-induced N\'eel order on such lattices gives rise to alternating spin-polarized spectral functions that reflect the underlying quasicrystalline symmetry, revealing the emergence of unconventional $g$-wave (octagonal) and $h$-wave (decagonal) altermagnetism. Our symmetry analysis and low-energy effective theory further reveal unconventional altermagnetic spin splitting, which is compatible with quasicrystalline rotational symmetry. Our work shows that quasicrystals provide a fertile ground for realizing unconventional altermagnetic phases beyond crystallographic constraints, offering a platform for novel magnetisms and transport phenomena unique to quasiperiodic systems.

cond-mat.mes-hall