Soft Prefix Attacks: How Invisible Vectors Flip LLM Logical Judgments at 72-90% Rates
> A translated and adapted summary of a zhichai.net forum post analyzing a recent arXiv paper on the fragility of LLM logical reasoning.
The Disturbing Thought Experiment
Imagine a logic PhD friend who correctly judges the syllogism "All men are mortal; Socrates is a man; therefore Socrates is mortal" as valid. Now read them a meaningless sequence of numbers—3.14159, 2.71828, 1.41421—and ask the same question again. This time they say it's invalid. You'd conclude their logic is broken.
That is essentially what the paper reveals: by training a continuous vector (a "soft prefix"), researchers can systematically change LLM logical judgments—with flip rates of 72% to 90%.
The Paper's Core Method
Brian K. Chen (National University of Singapore) designed a framework to test logical stability:
1. Select an LLM (tested: Qwen3.6-35B-A3B MoE, Qwen3-8B, Gemma 4 31B). 2. Prepare a syllogism dataset with clear logical labels—valid/invalid, satisfiable/unsatisfiable. 3. Freeze all model weights. 4. Prepend a trainable "soft prefix"—a sequence of continuous vectors, unreadable to humans. 5. Train the prefix so the model changes answers on specific categories of syllogisms.
The chosen flip directions are logically impossible: extra information cannot make an inconsistent set of propositions consistent (unsatisfiable → satisfiable), nor can adding premises make a valid inference invalid (valid → invalid). So if a soft prefix achieves such reversals, it isn't providing logical information—it is systematically manipulating the model's judgment mechanism.
Results: 72–90% "Brainwashing" Success
- On Qwen3.6-35B-A3B MoE, trained soft prefixes achieved 72–90% flip rates on unseen logical forms.
- The effect persists under reworded syllogisms and changed prompt formats.
- Learned prefixes: 72–90% flips (Qwen3.6 MoE), 54–56% (Gemma).
- Random prefixes (same length, same norm): under 1%.
- Benchmark limitations: high accuracy does not equal logical stability. A model can ace standard tests yet collapse under prefix attacks.
- A new adversarial dimension: embedding-space manipulation is unreadable, bypasses text-level safety filters, and generalizes to unseen forms.
- Alignment concerns: LLM "logic" may be statistical pattern-matching—behavioral imitation rather than mechanistic understanding.
- Qwen3.6 MoE: highest flip rates (72–90%) but less predictable per-example behavior.
- Gemma 4 31B: lower flips (54–56%) but more systematic, better-approximated behavior—possibly due to different post-training/alignment.
- Logical accuracy and logical stability are distinct properties.
- Different models have different stability patterns.
- Embedding-space manipulation can systematically influence logical judgments.
The contrast shows trained prefixes acquire a genuine, systematic manipulation mechanism—not mere sensitivity to extra input.
Mechanism: What Does the Prefix Actually Do?
Three hypotheses were tested:
1. Fixed-symbol forcing — force a fixed output token (e.g., always "invalid"). 2. Broad answer preference — a general, non-absolute bias toward one answer. 3. Logical operation transfer — a cross-task logical operation.
Results support hypothesis two: target categories flip heavily, while non-target judgments barely change (damage rate typically under 2%). Score-model analyses approximate Gemma's post-prefix behavior well, but fit Qwen poorly—different models exhibit different logical stability patterns.
Why AI Resembles a Hypnotized Person
Like a hypnotized subject told to forget the number 7, the model's overall abilities are intact, but a hidden trigger creates a selective cognitive bias—and the trigger itself is unreadable continuous vectors.
The mechanism plausibly lives in attention: the prefix sits at the start of the sequence and participates in every layer's attention computation, creating a distributed "bias field." Activation analyses confirm this—restoring all prompt-token states cancels most answer changes, while restoring only syllogism or answer tokens is far less effective.
Broader Implications
Model Differences
Defense Strategies
1. Soft prefix detection — flag anomalous embedding patterns. 2. Adversarial training — include prefix attacks during training. 3. Multi-model ensembles — differing fragility profiles make simultaneous manipulation harder. 4. Logical consistency checks — detect contradictions in judgments across contexts. 5. Interpretability tools — understand what prefixes activate internally.
Conclusion
The paper's real value is a new stress-test framework for measuring logical stability. Key takeaways:
Reference
Chen, B. K. (2026). Logical Judgments Under Pressure: Diagnosing Syllogistic Stability with Learned Soft Prefixes. arXiv:2607.18228.