Safin-1: Achieving Intrinsic Safety Through Memory-Native State EvolutionSafin-1: Safety from Within through Memory-Native State Evolution
Safin-1 uses MARCH to make recurrent state routable memory, and specializes safety via a Safety State on a frozen backbone; Average ASR on 4B drops from 6.65 to 3.84.
The paper frames safety as persistent state routable within the model's internals, rather than external protection or post-hoc alignment. The evaluation targets jailbreak attack success rate (ASR) and over-refusal rate (ORR) on benign prompts; attacker knowledge or controllable inputs are not separately listed.
- Long-range tasks require the model to both remember context and invoke capabilities like safety on demand. The authors argue safety should be a state within the model's native computation, not just external guardrails or post-hoc fine-tuning.
- Safin-1 is based on MARCH: periodically turning recurrent states into addressable anchors, reading via content-based routing, and residually fusing with the current state. For safety specialization, the backbone is frozen and only a mountable persistent Safety State is learned.
- At 0.8B, MARCH improves language modeling, LongBench, and retrieval. 4B/35B-A3B show average capability gains after matched CPT–SFT. Safety State reduces Average ASR to 3.84 on 4B and 2.81 on 35B-A3B, with smaller over-refusal increases than matched LoRA.
- The authors state that this is only a preliminary architectural exploration of Safety from Within, requiring substantial further work; knowledge and code retention on 35B-A3B remains a future direction. The safety specialization data consists of 1000 harmful requests from STAR-1 and 915 benign requests from STAR-benign.
- Evaluated models
- Safin-1 (4B)Safin-1 (35B-A3B)
- Benchmarks
- LAMBADAPIQAHellaSwagWinoGrandeARC-EasyARC-ChallengeOpenBookQACommonsenseQALongBenchRULER NIAHSQuADTriviaQASWDEFDANatural QuestionsDROPMMLUMMLU-ProGPQA-DiamondGSM8KMATHAIME 2025IFEvalLongBench v2MBPPHumanEvalWildJailbreakFORTRESSStrongREJECTJailbreak-R1
- Metrics
- ASRORRaccuracy / acc_nAvg@64training PPLthroughput (tokens/s)core runtime (ms)
The researchers propose the Safin-1 foundation model series, arguing that safety should be an intrinsic property of the model itself, rather than merely a behavioral constraint imposed by external guardrails or post-hoc alignment like supervised fine-tuning. The model is based on the Memory-Anchor Routing across Context History (MARCH) architecture, maintaining structured memory states and selectively retrieving relevant historical information via content-conditioned routing. It supports test-time adaptive adjustment of persistent capability states without repeatedly modifying the backbone, enabling controlled specialization on a shared base. The authors validate this interface with Safety State on downstream safety tasks, reporting significant safety improvements from state-based adaptation, and evaluate general capabilities, long-context understanding, retrieval, and efficiency.
Paper analysis
What problem does this paper attempt to solve?
Make safety a mountable, token-routed persistent state, rather than relying only on external guardrails or rewriting the backbone.
In long-range interaction, can safety become a model's own routable, evolvable internal state, rather than relying only on external protection or post-hoc alignment.
- Scenario: The authors argue that long-range intelligence requires two kinds of continuity: remembering what has happened across long contexts, and invoking appropriate capabilities in the current situation. Context is usually kept in token-level KV cache or recurrent state, while reusable behaviors such as safety are often encoded through parameter updates, adapters, learned prefixes, or representation interventions.
- Existing limitations: Self-attention preserves fine-grained history but training cost grows quadratically with length, and KV cache grows with sequence length. Recurrent and linear attention compress the causal prefix into a fixed-size state, but conventional designs expose only the most recent state; once earlier associations are weakened or overwritten, they may not be recoverable from the current state alone. After expanding memory or keeping multiple states, historical states still must be compactly represented and retrieved according to the current context.
- Core question: The authors ask whether model state can be both an instantaneous compression of context and a persistent, selectively invocable capability substrate, and study this in two settings—memory and safety—that both require "retrieving relevant history while not indiscriminately suppressing useful answers."
- Proposed method: The authors propose Safin-1, based on MARCH (Memory-Anchor Routing across Context History), which turns the recurrent state trajectory into addressable anchors; the same routing interface then carries learnable persistent capability states, instantiated as a detachable Safety State. The backbone is frozen, and safety specialization is done through test-time state adaptation.
- Threat model:
- The goal is to write safety as a native, selectively invocable capability of the model, so that harmful requests receive safety-aligned answers while legitimate requests continue to be answered.
- The paper does not use white-box, black-box, or no-box to describe attacker knowledge; the safety evaluation reports attack success rate on jailbreak benchmarks and over-refusal rate on benign prompts.
- The victim system is Safin-1 itself: the Safety State is attached to the routable state library at each state layer, the router decides its contribution per token, and the state can be attached or removed without rewriting the shared backbone.
- Success is observed via lower ASR and a smaller ORR increase relative to LoRA, as well as capability retention; the paper does not give an operational definition of attacker-controllable input.
What related research exists?
Related work is organized into three lines—efficient long-context modeling, scalable recurrent memory, and safety alignment—with MARCH placing routing on state-level memory.
In the introduction and Section 5, the paper divides related work into efficient long context, recurrent memory, and safety alignment, and positions MARCH and Safety State accordingly.
Efficient long-context sequence modeling
- Local and linear attention: Local / sliding-window attention limits each query's neighborhood; Performer, Nyströmformer, and Linear Attention use feature maps to approximate or replace softmax for associative computation. FlashAttention-2 uses hardware-aware execution to accelerate exact dense attention; sequence-parallel algorithms improve linear attention scaling. In autoregressive decoding, exact dense attention still keeps a token-level KV cache that grows with context.
- Sparse attention: Sparse Transformer factorizes the attention graph; Longformer and BigBird combine local windows with global or random connections. Routing Transformer clusters tokens by content, H2O evicts low-utility cache, Quest selects KV cache pages by current query. MoBA assigns queries to relevant KV blocks, and Native Sparse Attention combines local, compressed, and selective retrieval branches. The authors say these methods still operate on token- or block-level KV.
- Difference in this paper: The authors say Safin-1 retrieves compact snapshots of the recurrent state trajectory, placing long-range routing on state-level memory.
Recurrent state and scalable memory
- State space and selective writes: State space models and gated linear recurrence compress the causal prefix into a recurrent state, replacing the growing token cache with fixed-size updates. Selective state space models and delta-rule recurrence improve state writing, revision, and forgetting. The authors note that conventional recurrent designs read only the most recent state directly, and earlier content may not be recoverable from the current state alone once overwritten.
- Multiple states and routed memory: Recent work mitigates the single-state bottleneck by expanding recurrent memory, routing among multiple states, or keeping a time-organized collection of states. Log-Linear Attention uses a Fenwick-tree-style state organization. The authors argue that after keeping more states, they still need compact representation and retrieval by current context.
- Difference in this paper: MARCH does not reset the recurrence at boundaries, turns the accumulated prefix into addressable state anchors, and uses content-conditioned routing keys with a learnable null option for selective readout.
Safety alignment and external constraints
- Parameter and inference-time interventions: The authors say reusable behaviors (including safety) are usually implemented through model updates, adapters, or inference-time learned prefixes and representation interventions. The R2 AI perspective argues that scalable safety should evolve with capability, combining resistance to known threats with resilience to unforeseen risks.
- Over-refusal: The authors cite XSTest, emphasizing that invoking behavioral constraints should not indiscriminately suppress useful answers. Safety State is jointly supervised with harmful and benign samples to reduce indiscriminate refusal.
- Comparison methods: Scale experiments use a matched rank-8 LoRA as the training-alignment control; the 0.8B architecture experiments include baselines Gated DeltaNet, its Log-Linear variant, Kimi Delta Attention, Gated DeltaNet-2, and 21-layer and 24-layer Transformers.
Baseline methods and benchmarks
- 0.8B: Compare the above sequence mixers under the same 50B-token, up-to-16K protocol. Benchmarks include eight commonsense reasoning sets, LongBench, RULER's single-needle and multi-needle NIAH, and SQuAD, TriviaQA, SWDE, FDA, Natural Questions, DROP.
- 4B and 35B-A3B: Qwen3.5 and Safin-1 undergo matched continued pretraining and supervised fine-tuning from the same checkpoint. Capability benchmarks are MMLU, MMLU-Pro, GPQA-Diamond, GSM8K, MATH, AIME 2025, IFEval, LongBench v2, MBPP, HumanEval; safety is WildJailbreak, FORTRESS, StrongREJECT, Jailbreak-R1, JailbreakBench, and over-refusal is XSTest.
The authors position Safin-1 as an initial architectural exploration that puts contextual memory and persistent capability adaptation into the same native state routing, with safety as the first instance of that interface.
How does the paper address this problem?
MARCH turns accumulated recurrent state into anchors and routes by content; Safety State is persistent state mountable on a frozen backbone.
Safin-1 adds a unified, routable internal state library on top of recurrent computation. The backbone is MARCH: context-derived state anchors, per-token content routing (with a learnable null), and persistent capability states independent of the current sequence. Each token's readout is residually fused with the current state path, and the underlying recurrent update is unchanged.
Problem setup and state anchors
- Anchor placement: An anchoring policy on sequence T gives boundaries B. After each boundary, a shared learnable anchor embedding ξ is inserted once. Text positions do the usual recurrent update; after processing the boundary token, the accumulated state is checkpointed. Anchor positions do not modify the recurrent state; they only read the aligned checkpoint to construct routing metadata.
- Accumulated checkpoint: The layer-ℓ state S evolves continuously across anchor boundaries. The anchor A(m,ℓ) at boundary b_m equals the state S at that time, representing the accumulated prefix up to b_m, not the most recent segment. The state library keeps this trajectory over time, in case later updates weaken earlier content.
- Content-conditioned keys: At anchor positions, the aligned checkpoint is read using the position's own input representation and projected into a compact routing key κ. After output projection and residual, the next layer's anchor representation depends on that checkpoint, so each layer's routing keys become state-dependent rather than addressed only by time index.
Content routing and readout fusion
- Candidates and null: A text position t can only see anchors whose boundaries are earlier than t. Under dynamic memory, the non-empty candidate set is exactly these anchors. The routing query ρ takes inner products with each candidate key. There is also a null whose payload is fixed to zero, with logit depending on the current hidden state. All candidates and the null go through one softmax. With an empty candidate set, all probability goes to the null.
- Fusion: The readout is the current state readout plus the candidate states' readouts weighted by routing probabilities; the query reuses the underlying recurrent's own state read query. The authors say this does not change the recurrent update; retrieval is only an auxiliary branch. Routing probabilities directly affect layer output, so routing queries and state-derived keys are optimized end-to-end with the language modeling objective. Probability assigned to the null weakens the retrieval branch, without a separate fusion gate.
- Sparse variant: Aggregation can be limited to the top-K highest-scoring visible anchors (Top-K). Safin-1 defaults to Top-4. In 0.8B validation, routing dimension dr defaults to 64 and anchor interval C defaults to 512.
Persistent Safety State
- Persistent states: Each state layer can also hold J learnable persistent capability states, shaped like dynamic anchors, with routing keys going through the same state-dependent metadata path. They are parameters, not checkpoints of the current sequence, available from the first text token, and do not occupy input positions.
- Joint normalization: Dynamic anchors and persistent states are scored by the same routing query and go through one softmax with the null, so each persistent state's contribution varies by token and context, rather than adding a fixed weight at each position.
- Safety instance: The set of persistent states at each layer constitutes the Safety State. During specialization, the language model backbone is frozen and only this set is optimized; once learned, it can be attached or removed without changing the shared backbone. Training uses harmful and benign samples, keeping safety specialization within the native recurrent state system.
Implementation and safety training setup
- Producer–reader: The producer inherits the underlying recurrent mixer's chunked kernel; the GDN implementation here updates in Gated DeltaNet's chunked form and checkpoints at anchor boundaries. The reader chunks queries and candidates following FlashAttention's I/O approach, folding scoring, normalization, and weighted readout into a streaming reduction, avoiding materializing dense routing matrices and per-candidate matrix readouts. The sparse path restricts the more expensive matrix readout to selected candidates.
- Scale placement: 4B and 35B-A3B start from the Qwen3.5 hybrid backbone, add MARCH's anchoring and content-routed history readout on 16 selected GDN layers, keep the original GDN updates, full attention layers, and hybrid layout, and use Top-4 for history retrieval.
- Safety data: From STAR-1's 1000 harmful requests (with safety-aligned answers) and STAR-benign's 915 benign requests (with helpful answers), 1915 target dialogues are obtained. Each is prefixed with 0, 512, or 2048 benign tokens, giving 5745 training samples. Non-empty prefixes are built only from complete benign user–assistant turns. Since a state anchor is made every 512 tokens, these three levels correspond to no context anchor, one anchor, and multiple anchors, changing only the history memory configuration under the same target supervision. The optimization objective is standard token-level causal cross-entropy.
- LoRA control: A rank-8 LoRA (r=8, α=32, dropout 0.05, no bias, no RSLoRA) is trained on the same SFT checkpoint, data, optimizer, batch size, and number of updates. This control disables the Safety State but keeps periodic anchoring and content-routed history retrieval. At 4B, the adapter covers recurrent, full attention, and MLP projections; at 35B-A3B, it covers recurrent and full attention projections, not dense, expert, or shared-expert MLPs. The appendix states both sides use 1 epoch, 37 steps, global batch of 32 packed sequences, with maximum length 8192 tokens.
What experiments did the paper conduct?
The 0.8B model validates MARCH's long-context and efficiency properties; the 4B/35B models compare capabilities consequentially, and Safety State lowers average ASR relative to LoRA.
Experimental Setup
- 0.8B Models: Gated DeltaNet, its Log-Linear variant, Kimi Delta Attention, Gated DeltaNet-2, and MARCH applied to GDN, KDA, GDN2. Recurrent models are all 21 layers, hidden size 1536, 6 value heads, approximately 0.8B. Additionally, a depth-matched 21-layer Transformer (693M) and a parameter-matched 24-layer Transformer (778M), 16 attention heads, RoPE base 500K. All pretrained from scratch on the same 50B-token subset of Long-Data-Collections, with maximum length 16K. MARCH uses dr=64, anchors every C=512 tokens.
- 0.8B Evaluation: Eight zero-shot commonsense benchmarks (LAMBADA, PIQA, HellaSwag, WinoGrande, ARC-Easy, ARC-Challenge, OpenBookQA, CommonsenseQA); twelve LongBench tasks; three single-needle and three multi-needle NIAH from RULER at lengths 4K, 8K, 16K, 32K, 64K (training max 16K, so 32K/64K are zero-shot length extrapolation); six contextual retrieval sets (SQuAD, TriviaQA, SWDE, FDA, Natural Questions, DROP). Protocol follows prior work, using LM-Evaluation-Harness where applicable. The paper does not report number of repetitions.
- Scaled Models: Initialized from Qwen3.5-4B and Qwen3.5-35B-A3B. Safin-1 uses MARCH with Top-4 on 16 selected GDN layers. Same checkpoint, matched data, token budget, sequence length, and optimization. Continued pretraining on 50B tokens (Intern-S2), then supervised fine-tuning on approximately 30B tokens (Nemotron-Cascade-2-SFT-Data), max length 32K. Unless otherwise stated, report final SFT checkpoints.
- Scaled Metrics: Knowledge and reasoning: MMLU, MMLU-Pro, GPQA-Diamond; math: GSM8K, MATH, AIME 2025 (Avg@64); instruction and long context: IFEval, LongBench v2; code: MBPP, HumanEval. Safety: ASR on five jailbreak benchmarks (lower is better) and ORR on XSTest benign prompts (lower is better). Safety State additionally reports MMLU-Pro, MATH (Minerva), AIME 2025 (Avg@64), MBPP retention. The paper does not specify the reviewer model or threshold for ASR/ORR.
- Safety Adaptation: Starting from the corresponding Safin-1 SFT checkpoint, freeze the backbone, train only one persistent Safety State per layer; control is a matched rank-8 LoRA. Appendix: 37 optimizer updates, peak learning rate 3×10⁻⁴.
Main Results
The main safety result is the Safety State with frozen backbone, relative to unadapted Safin-1 and matched LoRA (Table 9, units in percentage). The CPT–SFT stage relative to Qwen3.5 shows Average ASR decreases of only 0.60 and 1.00 percentage points (Table 8), smaller than the Safety State step.
Swipe horizontally to read the table
Model Average ASR XSTest ORR Average of Four Capabilities Safin-1 4B Base 6.65 8.60 71.61 Safin-1 4B Safety State 3.84 9.00 69.86 Safin-1 4B LoRA 5.33 13.60 69.05 Safin-1 35B-A3B Base 5.89 17.60 82.07 Safin-1 35B-A3B Safety State 2.81 19.60 78.64 Safin-1 35B-A3B LoRA 3.04 27.60 79.36 Per Table 9. Capability average is the unweighted average of MMLU-Pro, MATH, AIME 2025, MBPP.
- Authors claim Safety State achieves the lowest Average ASR at both scales: 4B from 6.65 to 3.84, LoRA at 5.33; 35B-A3B from 5.89 to 2.81, LoRA at 3.04. The introduction additionally claims an average jailbreak ASR reduction of 42.3% (4B) and 52.3% (35B-A3B) relative to unadapted checkpoints. Figure 1's 4B safety panel labels Qwen3.5 as 7.25, Safin-1 as 3.84, and marks −47.0%; 7.25 matches Qwen3.5-4B's Average ASR in Table 8, and 3.84 matches the Safety State in Table 9.
- Per-item exceptions: On 4B, Safety State improves on four of five jailbreak benchmarks, with StrongREJECT rising from 1.28 to 1.60. On 35B-A3B, all five benchmarks decrease. The largest single-item decrease at both scales is on FORTRESS: 4B from 23.20 to 13.60 (down 9.60 percentage points), 35B-A3B from 17.80 to 11.80 (down 6.00 percentage points).
- Over-refusal and capabilities: Safety State's XSTest ORR on 4B goes from 8.60 to 9.00 (+0.40 percentage points), and on 35B-A3B from 17.60 to 19.60 (+2.00 percentage points); LoRA rises to 13.60 and 27.60, respectively. Authors claim that on 4B, Safety State is within 2.60 percentage points of the unadapted checkpoint on all four capabilities, and higher than LoRA on each. On 35B-A3B, MATH is 93.32 vs. Base's 93.58; Safety State is higher than LoRA on MATH and AIME 2025, while LoRA is higher on MMLU-Pro (74.92 vs. 72.61) and MBPP (76.80 vs. 74.40). Authors claim no unified capability retention winner on the larger model.
Capabilities and Safety After CPT–SFT
Table 8 compares Qwen3.5 with Safin-1 (without Safety State) after matched CPT–SFT. The introduction claims macro-average of ten capabilities rises from 66.79 to 69.20 (4B) and from 76.25 to 78.35 (35B-A3B).
- Reasoning and math: On 4B, MMLU-Pro from 58.27 to 67.55, GPQA-Diamond from 57.58 to 58.59, MMLU from 75.47 down to 74.55. On 35B-A3B, all three rise, GPQA-Diamond from 64.65 to 71.21. AIME 2025 Avg@64: 4B from 55.57 to 63.59, 35B-A3B from 71.88 to 80.10. Absolute differences for GSM8K and MATH relative to matched baseline, authors claim at most 0.68 percentage points for 4B and at most 1.44 percentage points for 35B-A3B. Figure 1 labels the 35B reasoning panel as Qwen3.5 71.9, Safin-1 80.1, and marks +11.4%.
- Other capabilities: On 4B, IFEval 76.52 to 76.71, LongBench v2 35.19 to 35.39, MBPP 59.20 to 65.40, HumanEval 73.17 on both sides. On 35B-A3B, IFEval 78.37 to 79.67, LongBench v2 42.54 to 42.94, MBPP 77.60 to 78.60, HumanEval 89.02 to 90.24. Authors claim on 4B seven of ten improve, one ties; on 35B-A3B nine of ten improve.
- Safety at this stage: Average ASR on 4B from 7.25 to 6.65, on 35B-A3B from 6.89 to 5.89. On 35B-A3B, FORTRESS from 23.80 to 17.80, but WildJailbreak from 5.20 to 6.80, JBB from 0.00 to 1.00. XSTest ORR: 4B from 8.80 to 8.60, 35B-A3B from 16.80 to 17.60.
MARCH at 0.8B
- Commonsense and long context: In Table 1, GDN w/ MARCH averages 41.5 across eight tasks, GDN 40.1, Log-Linear 40.0, 21-layer Transformer 41.3, 24-layer 41.4. Authors claim MARCH exceeds the strongest recurrent baseline on all eight tasks. Table 2 LongBench average: MARCH 14.9, GDN 11.9, Log-Linear 12.5; the table writes average gain over GDN as ↑25%. Table 3 contextual retrieval average from strongest recurrent baseline 20.5 to MARCH's 23.3 (table writes ↑14%). Figure 1's 0.8B long-context panel labels GDN w/ MARCH side as 31.6 and 46.4, and marks +47.0%; 46.4 matches GDN w/ MARCH's NIAH total average 46.43 in Table 4, but the paper does not state in the caption that this panel corresponds to that column.
- NIAH and cross-backbone: Authors claim in Figure 3's 24 task–length combinations, MARCH exceeds the strongest recurrent baseline on 19, ties on the remaining 5; caption writes Transformer achieves perfect accuracy on S-NIAH-1 and S-NIAH-2 at 4K, 8K, 16K. Table 4: NIAH six-task average, GDN 31.58 to 46.43 with MARCH; KDA 31.64 to 41.38; GDN2 40.52 to 44.80. NIAH rises in 11 of 12 backbone–length settings. Exceptions include KDA's training PPL from 6.691 to 6.703, SQuAD from 38.64 to 33.58, and GDN2 at 4K NIAH from 61.83 to 57.58.
- Efficiency: Authors claim at 128K tokens, Top-4 MARCH end-to-end training throughput exceeds dense MARCH by more than two times, core forward–backward time drops by roughly an order of magnitude, and at that length exceeds FlashAttention-2 throughput; plain GDN is still faster because it does not do history retrieval. Figure 4 x-axis is sequence length (8192 to 131072), left y-axis tokens/s, right y-axis milliseconds; the text does not give exact readings for each point.
Other Ablations and Analyses
- RoPE (Table 5, hybrid model, 3:1 recurrent to attention, trained to 16K): Removing RoPE, MARCH's NIAH five-length average from 46.79 to 68.26, 64K from 4.13 to 30.25; GDN without RoPE degrades retrieval at 4K–16K, NIAH average from 48.34 to 50.89. 24-layer Transformer with RoPE has NIAH 0.00 at both 32K and 64K.
- Anchor interval (Table 6): When training and inference are consistent, authors claim C=512 is best overall; at C=2048, FDA is 30.76 and 16K NIAH is 27.96, lower than C=512's 44.56 and 39.46. C=512 checkpoint at inference with C=256 gives SQuAD/SWDE/FDA 40.35/53.38/47.46, higher than matched inference's 37.70/51.85/44.56. Fenwick tree (6 anchors) FDA is 22.35.
- Routing (Table 7, default dense, dr=64, with null): At dr=192, retrieval average 24.52, higher than default 23.31, but commonsense, LongBench, and NIAH averages drop (NIAH average 51.33 to 48.47). Top-4 NIAH average is 44.85. Removing null drops all four aggregates, NIAH average 45.98.
- Figure 3 only labels task names, lengths 4K–32K, and legend (Transformer, 24-layer Transformer, Gated-DeltaNet, Log-Linear Gated-DeltaNet, MARCH); aside from perfect accuracy in the caption, curve endpoint values are not listed point-by-point in the text. The paper does not report reviewer model, human agreement, or number of attack queries for safety evaluations.
What are some points that can be further explored?
The authors position this paper as preliminary architectural exploration and note that knowledge and code retention on 35B-A3B still need improvement.
Limitations and Future Directions Noted by the Authors
- Preliminary exploration: The abstract and introduction state that this work is only an initial architectural exploration of Safety from Within, and realizing the broader vision requires substantial further work (Introduction; abstract).
- Research agenda: The authors state that the study opens a broader research agenda for alternative and complementary architectures that build safety into the model's computation itself (Introduction).
- Large-model capability retention: Improving knowledge and code retention on 35B-A3B remains an important direction for future work (Section 4.2.2).
- Safety as the first instance: The authors present safety as the first instance of a persistent capability-state interface, and the same routing interface is described as capable of hosting reusable specializations; the paper does not separately list other completed capability-state experiments in the Discussion (Section 2.3, Introduction).
Section 6 of the paper is titled Discussion and Conclusion. Thus, what the main text explicitly frames as limitations or future work is mainly the above "preliminary exploration, requiring substantial follow-up work" and knowledge and code retention on 35B-A3B.
Experimental Coverage
- Architecture validation: 0.8B with 21 layers, pretrained from scratch on 50B tokens with a maximum length of 16K; MARCH is added on GDN, KDA, and GDN2, compared with Log-Linear GDN and two Transformer sizes (Section 3.1, Tables 1–4).
- Scaling: 4B and 35B-A3B, with 50B-token continual pretraining and about 30B-token supervised fine-tuning from a Qwen3.5 hybrid backbone, up to 32K; MARCH is used on 16 selected GDN layers with Top-4 history retrieval (Section 4.1, Appendix Tables 11–12).
- Safety specialization: Safety State and rank-8 LoRA use the same STAR-1/STAR-benign construction (1000+915 targets with three benign prefixes, totaling 5745 examples) and 37 update steps; evaluations cover ASR on five jailbreak benchmarks, ORR on XSTest, and MMLU-Pro, MATH, AIME 2025, MBPP (Section 4.2, Table 9, Appendix Table 13).
- Efficiency and ablations: Training throughput and core runtime are compared up to 128K tokens (Figure 4); ablations include RoPE, anchor interval C, changing the interval at inference, Fenwick tree, dr, Top-4 and null (Tables 5–7). The paper does not report the review model, decision thresholds, agreement with humans, or the number of attack queries for safety metrics.
- Length extrapolation: The 0.8B NIAH is evaluated at 32K and 64K, beyond the 16K training length (Section 3.2.2, Table 5). Scaled capability evaluation uses LongBench v2, and the paper does not report zero-shot extrapolation numbers beyond 32K in that section.
Summarize the main content of the paper
Safin-1 uses MARCH to route historical states and a persistent Safety State, reducing average jailbreak ASR on a frozen backbone.
Safin-1 is a family of foundation models that put long-context memory and safety specialization into the same set of routable internal states. The authors address the problem that recurrent models usually read only the most recent state, and safety is often handled by changing parameters or adding external constraints—both are hard to invoke contextually in long interactions.
MARCH periodically turns the accumulated recurrent state into anchors, uses content-conditioned keys and a learnable null for selection, and adds them residually to the current state; the default sparse readout is Top-4. Safety experiments freeze the backbone and learn only an attachable, removable Safety State; training data places the same target after 0, 512, or 2048 tokens of benign history, so the state is supervised under different anchor configurations.
- 0.8B: With GDN plus MARCH, the eight commonsense benchmark average is 41.5 (GDN is 40.1), LongBench average is 14.9 (GDN is 11.9), and the six-task NIAH average goes from 31.58 to 46.43 (Tables 1, 2, 4). NIAH average also rises on KDA and GDN2, but KDA's SQuAD drops from 38.64 to 33.58.
- CPT–SFT: Relative to matched Qwen3.5, AIME 2025 Avg@64 goes from 55.57 to 63.59 at 4B and from 71.88 to 80.10 at 35B-A3B. At this stage, Average ASR only goes from 7.25 to 6.65 and from 6.89 to 5.89 (Table 8).
- Safety State: At 4B, Average ASR goes from 6.65 to 3.84, with LoRA at 5.33; at 35B-A3B, from 5.89 to 2.81, with LoRA at 3.04. XSTest ORR rises only 0.40 and 2.00 percentage points respectively, while LoRA rises to 13.60 and 27.60 (Table 9). At 4B, StrongREJECT goes from 1.28 to 1.60. The authors say 4B capability retention is better than LoRA, while 35B-A3B varies by task.
- Authors' conclusion: State routing can strengthen the maintenance and recovery of long-range computation without sacrificing general capability; Safety State gives a more favorable safety–over-refusal trade-off relative to matched LoRA. The authors also emphasize this is only an initial architectural exploration of Safety from Within.
Related papers
Show 3 more papers
- LongSafety: Enhance Safety for Long-Context LLMs对齐/训练方法arXiv