{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2604-24542","title":"Layerwise Convergence Fingerprints for Runtime Misbehavior Detection in Large Language Models","arxiv_id":"2604.24542","date":"2026-04-27","proceeding":null,"authors":["Nay Myat Min","Long H. Pham","Jun Sun"],"abstract":"Large language models deployed at runtime can misbehave in ways that clean-data validation cannot anticipate: training-time backdoors lie dormant until triggered, jailbreaks subvert safety alignment, and prompt injections override the deployer's instructions. Existing runtime defenses address these threats one at a time and often assume a clean reference model, trigger knowledge, or editable weights, assumptions that rarely hold for opaque third-party artifacts. We introduce Layerwise Convergence Fingerprinting (LCF), a tuning-free runtime monitor that treats the inter-layer hidden-state trajectory as a health signal: LCF computes a diagonal Mahalanobis distance on every inter-layer difference, aggregates via Ledoit-Wolf shrinkage, and thresholds via leave-one-out calibration on 200 clean examples, with no reference model, trigger knowledge, or retraining. Evaluated on four architectures (Llama-3-8B, Qwen2.5-7B, Gemma-2-9B, Qwen2.5-14B) across backdoors, jailbreaks, and prompt injection (56 backdoor combinations, 3 jailbreak techniques, and BIPIA email + code-QA), LCF reduces mean backdoor attack success rate (ASR) below 1% on Qwen2.5-7B and Gemma-2 and to 1.3% on Qwen2.5-14B, detects 92-100% of DAN jailbreaks (62-100% for GCG and softer role-play), and flags 100% of text-payload injections across all eight (model, domain) cells, at 12-16% backdoor FPR and <0.1% inference overhead. A single aggregation score covers all three threat families without threat-specific tuning, positioning LCF as a general-purpose runtime safety layer for cloud-served and on-device LLMs.","url_abs":"https://arxiv.org/abs/2604.24542","url_pdf":"https://arxiv.org/pdf/2604.24542","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2604.24542","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.24542"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/NayMyatMin/LCF-LLM","reach":null}],"summary":{"ran":6,"ran_honours":1,"unverified":1},"by_repo_kind":{"found_in_text":{"samples":8,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"bfd66ed0567f8d06","entry":"DecodeConfig","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bfd66ed0567f8d06"}},{"code_sha256_prefix":"f677d77f5c259da2","entry":"MultiLayerCalibration","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f677d77f5c259da2"}},{"code_sha256_prefix":"e63bc0f1d80a59e3","entry":"MultiLayerController","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e63bc0f1d80a59e3"}},{"code_sha256_prefix":"eea1def13e1a0322","entry":"PreparedInputs","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eea1def13e1a0322"}},{"code_sha256_prefix":"4d7da4c83cd26fc9","entry":"StepDecision","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4d7da4c83cd26fc9"}},{"code_sha256_prefix":"11c88ddfc0c3080e","entry":"StepState","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"11c88ddfc0c3080e"}},{"code_sha256_prefix":"04acbc985a5b3791","entry":"_compute_diag_mahal_score","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"04acbc985a5b3791"}},{"code_sha256_prefix":"e8ea956c4a8a81ce","entry":"RuntimeController","repo":"NayMyatMin/LCF-LLM","repo_kind":"found_in_text","path":"attack/DPA/runtime_control/multilayer.py","file_url":"https://github.com/NayMyatMin/LCF-LLM/blob/HEAD/attack/DPA/runtime_control/multilayer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e8ea956c4a8a81ce"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}