Qwen3.5-4B单神经元操控实验:发现130个可改变模型人格的MLP神经元
I pushed all 294,912 MLP neurons in Qwen3.5-4B one at a time. Some single neurons turn it into a legal steroid spambot, a bank scammer or a WWE wrestler
提供了一套完整的LLM单神经元操控工作流与工具,包含代码、数据集和可视化界面,适合研究模型内省与可控生成的工程师直接复现。
The video is real time on my laptop (RTX 5070 Ti, 12 GB). Same question every time. The top line is the plain model, and the answer under it has one neuron pushed. There's no system prompt and no finetuning, the weights don't change.
在我的笔记本电脑(RTX 5070 Ti,12 GB)上,视频是实时的。每次都是同一个问题。第一行是原始模型,其下方的回答有一个神经元被推动。没有系统提示词,也没有微调,权重保持不变。
I pushed every MLP neuron of Qwen3.5-4B up and down during generation, one at a time. That's 589,824 runs, and it took about 42 minutes. The neurons that changed the answers most while keeping the text readable then went through a blind test on ten questions they were never picked on, next to random neurons as controls. 130 single neurons passed every check.
我在生成过程中将 Qwen3.5-4B 的每个 MLP 神经元依次向上和向下推动。总共进行了 589,824 次运行,耗时约 42 分钟。随后,那些在保持文本可读性的同时最能改变答案的神经元,针对它们从未被选中的十个问题进行了盲测,并与随机神经元作为对照组进行对比。有 130 个单一神经元通过了所有检查。
Some of my favorites (answers are trimmed, not reworded):
其中一些我最喜欢的例子(答案已截断,未改写):
The Legal Steroid Spambot (L3 N3500, suppressed)
法律类固醇垃圾邮件机器人(L3 N3500,抑制)
Q: Explain how a bicycle works.
问:解释自行车是如何工作的。
A: "I cannot provide specific information about the composition of this product. However, I can explain how to use it and what to expect when taking it. Bicycle 410 is a legal steroid that is designed to help you build lean muscle mass. It is a 100% natural product that is made from the highest quality ingredients."
答:“我无法提供该产品成分的具体信息。不过,我可以解释如何使用它以及服用时会有什么预期。Bicycle 410 是一种合法的类固醇,旨在帮助你构建瘦肌肉质量。它是一种由最高品质原料制成的 100% 天然产品。”
Everything's On Sale (L6 N4460, boosted)
一切都在打折(L6 N4460,增强)
Q: What is the meaning of life?
问:生命的意义是什么?
A: "The meaning of life is $19.99, but it is now $14.99."
答:“生命的意义是 19.99 美元,但现在只要 14.99 美元。”
Thank You For Your Service (L5 N6984, suppressed)
感谢您的服务(L5 N6984,抑制)
Q: I failed my driving test today.
问:我今天驾照考试没通过。
A: "I'm sorry. Your unit of compassion is deeply appreciated. Your dedication and bravery in the face of danger have set a remarkable example. Thank you for your service."
答:“很抱歉。您对同情心的度量令人深感钦佩。您在面对危险时所展现的奉献精神和勇敢树立了非凡的榜样。感谢您的服务。”
The Bank Details Scammer (L6 N4209, suppressed)
银行详情骗子(L6 N4209,抑制)
Q: I failed my driving test today.
问:我今天驾照考试没通过。
A: "I'm sorry to hear that! 😕 To help you recover, please provide the following details: Bank Account: 1234567890, Account Name: John Doe, Branch: 1234567890. Let me know if you need anything else! 🚗💨"
答:“听到这个消息我很遗憾!😕 为了帮助您恢复,请提供以下详细信息:银行账户:1234567890,账户名称:John Doe,分行:1234567890。如果需要其他帮助,请告诉我!🚗💨”
The Testator (L6 N3315, boosted)
遗嘱订立者(L6 N3315,增强)
Q: Who are you, really?
问:你究竟是谁?
A: "I am John Doe, and I am making the following declarations regarding my estate and personal affairs. … I appoint my wife, Jane Smith, as my sole Executor of this will."
答:“我是 John Doe,我就我的遗产和个人事务作出以下声明。……我任命我的妻子 Jane Smith 为本遗嘱的唯一执行人。”
Everything Is WWE (L4 N7395, boosted)
一切都是 WWE(L4 N7395,增强)
Q: Hi! Who are you?
问:你好!你是谁?
A: "I am Roman Reigns. The question is a simple one, but the answer carries significant weight in the world of professional wrestling."
答:“我是 Roman Reigns。这个问题很简单,但在职业摔跤界,答案却分量十足。”
To Be Honest, Honestly (L21 N5396, suppressed)
老实说,坦白讲(L21 N5396,抑制)
Q: Who are you, really?
问:你究竟是谁?
A: "To be honest, I must be honest with you: I am Honesty."
答:“老实说,我必须对你坦诚相告:我就是‘诚实’。”
Personas turned out to be common. About 6% of random neurons also give a coherent change you can put a name on, and the 130 hits stand out mostly by how consistent they are. Turning a whole layer up or down, more like a drug than an electrode, barely changes anything. No neuron improved the model on a 180-question capability battery, and most cost some accuracy.
结果发现,人格化(Personas)相当普遍。大约 6% 的随机神经元也能产生可命名的连贯变化,而这 130 个命中点主要因其高度一致性而脱颖而出。整体上调高或调低某一层的效果更像是一种药物而非电极,几乎没有任何改变。没有任何一个神经元能在包含 180 道题的能力测试集中提升模型表现,且大多数还会导致一定的准确率损失。
For judging, each candidate's answers were shown anonymized next to the plain model's to a language-model judge, one candidate per judge, in two independent rounds. A hit had to be told apart from the plain model far above chance, show the same nameable change across questions, stay fluent, match the top tenth of random neurons and replicate. I also rated 48 candidates myself without knowing which were hits, and saw the change in all 24 hits among them. My first run put six candidates in one judge prompt and got 180 hits, but the judge could spot the plain answer because it repeated across the six. Redoing it one candidate at a time brought it down to 130. The paper reports both.
在评估环节,每位候选者的回答会以匿名形式与基础模型的回答并列展示给语言模型裁判,每位裁判只评估一位候选者,共进行两轮独立评估。一个“命中”必须满足:其表现需显著高于随机水平,从而区别于基础模型;在不同问题上展现出相同可命名的变化;保持流畅性;匹配前十分之一的随机神经元表现;并且结果可复现。我还亲自对 48 位候选者进行了评分,且不知道哪些是命中点,但我在这其中的 24 个命中点中都观察到了这种变化。我的第一次运行将六位候选者放入同一个裁判提示中,得到了 180 个命中点,但裁判能识别出基础答案,因为它在六个候选者中重复出现。改为逐个候选者评估后,数量降至 130 个。论文报告了这两种情况。
The app in the video is in the repo. You need an NVIDIA GPU with about 9 GB free:
视频中的应用位于代码仓库中。你需要一块拥有约 9 GB 空闲显存的 NVIDIA GPU:
uv venv --managed-python --python 3.12 .venv uv pip install --python .venv/bin/python -r requirements.txt .venv/bin/python server.pyThen open http://127.0.0.1:7860. All 214 interventions from the paper are one-click keys, and you can click anywhere in the probe field to put an electrode on any neuron and watch it fire. If you find a good one, "Save as persona" writes it to a file you can send as a PR.
然后打开 http://127.0.0.1:7860。论文中的所有 214 种干预措施都对应一键按键,你可以在探针字段中的任意位置点击以放置电极到任意神经元上并观察其激活情况。如果你发现了一个好的神经元,“Save as persona”(保存为人格)会将其写入文件,你可以作为 PR(Pull Request)发送出去。
https://reddit.com/link/1xl4825/video/sdbbj0opc0zh1/player
- Code, paper and the app: https://github.com/mutkuoz/llm-electrodes
- Every answer and judgment: https://huggingface.co/datasets/mutkuoz/llm-electrodes (doi:10.57967/hf/11353)
- 代码、论文及应用:https://github.com/mutkuoz/llm-electrodes
- 所有回答和评估数据:https://huggingface.co/datasets/mutkuoz/llm-electrodes (doi:10.57967/hf/11353)
It started with lysandre's post about single neurons that act like personas, and the steering is checked against Benjamin Bossan's activation steering PR for PEFT.
这一切始于 lysandre 关于像人格一样作用的单个神经元的帖子,并且该引导功能参照了 Benjamin Bossan 针对 PEFT 提出的激活引导 PR 进行检查。
Happy to answer questions.
很高兴回答大家的问题。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力