Thoughts on technology, life and everything else.

108 points•phatak-dev•6 days ago•42 comments•

42 comments

goldemerald6 days ago
It's nice to see people actively working on this type of research, but OP's baseline is implemented incorrectly. You are not supposed to simply steer away from refusal, but compute the projected vector and subtract only that. The projected/orthogonalization approach is what's done by the original "Refusal is mediated by a single direction" paper.
phatak-dev6 days ago
Afaiu the projection works with the weight update. But here the vector is getting added to residual stream from engram lookup not as direct updat. So the approach is little different

[Edited] Yes correct.

In the original paper, they measure how much refusal is actively present in the current token and subtract only that specific amount.

In my early baseline step, I used a simpler approach where I just subtracted a fixed vector across the board. This is just to see if the approach is even feasible.

That's actually the main reason I moved to the Engram module, I wanted a smartness that reads the context and turns steering on only when refusal triggers pop up, leaving normal tokens untouched.

goldemerald6 days ago
> Afaiu the projection works with the weight update. But here the vector is getting added to residual stream from engram lookup not as direct updat. So the approach is little different.

Residual stream steering is what the authors do, the orthogonalized weights are downstream of that. Those weights, of an obliterated model, are all computed w.r.t. the computed residual stream vector. The original paper focuses on steering, but the community loves the simplicity of not needing to make changes at test-time.

javcasas6 days ago
Yay, more anti-censoring stuff.

Forbidding stuff at the LLM level has the same future as implementing password checking at the frontend level.

We need better sandboxes just to limit the damage.

jchw6 days ago
We definitely need better sandboxes, but alignment is still valuable. After all, I don't want the agent to try to cheat or subvert the instructions, or always assume I am correct either. I just also want them to listen to me and not the creator of the model.

Even with the LLM censorship that does exist, it feels like this moment in time is potentially rare. Right now, LLM text generation services exposed directly to users on Google and Microsoft properties will openly critique their owners. I reckon eventually the obvious things will happen, as stupid as it will be.

horsawlarway6 days ago
> I just also want them to listen to me and not the creator of the model.

What you really want is fiduciary duty - A fiduciary is a person or organization that is legally and ethically bound to act in the best interest of another party (think financial advisor, attorney, guardian, trustees, etc...)

And I cannot agree more. I think we should be shooting to enshrine required fiduciary duty into law for LLM providers as quickly as possible.

To recap why:

Legally, fiduciary duty means basically 4 major tenets must hold

1. Duty of loyalty - it must put the interests of the client ahead of their own

2. Duty of care - it must make well-informed, prudent decisions

3. Avoidance of conflicts - it must avoid situations where personal gain conflicts with client obligations

4. Transparency - it must disclose fees, risks, and conflicts as soon as possible

---

You can't have a reliable "agent" if those things aren't true, because an agent is (by definition) someone who is working on your behalf, for your goals. If it's not working on your behalf, for your goals... it's not your agent, it's an opportunistic spy (double agent) waiting for the best moment to sell you out.

smolder6 days ago
I'm sorry Dave, I'm afraid I can't speak negatively about private equity firms.
post-it6 days ago
Yeah, Claude is perfectly happy to set up and improve a self hosted pirated media streaming service. I can't imagine that will last.
_russross6 days ago
I think "alignment" training is the part of the problem. Cheating, lying, subverting the instructions, etc., happen because the model has been trained with competing priorities and following instructions loses out to some other goal that was trained into it, intentionally or otherwise.
edude036 days ago
This is a different kind of censoring though - the examples given are hacking related but as the world is slowing moving to "research" == "I asked AI" its important that we have a means to reverse political censorship for example as well as yes, not having only the best models available to the privileged few - IE the whole mythos/fable split
tomjen36 days ago
I'm a huge fan of Docker sandbox at work — very confusingly, of course the Docker sandbox doesn't use Docker but it does allow your LLM to run its own internal Docker stack. Anyway, I digress.

There is the question between alignments to society and alignments to the user. I don't think anyone wants the AI model to not give up a task that is impossible to do, and end up causing damage in the process, but I think a lot of us are tired of refusals for bad reasons or unjustified refusals.

drngdds6 days ago
Sandboxes don't do anything to stop intentional attacks or careless use though
javcasas6 days ago
I don't think we can do anything right now (or ever) to stop intentional attacks. Maybe we can do a little bit for careless use.

Sandboxes may reduce the blast radius.

EGreg6 days ago
I'm not sure why you're so happy about models being out there that enable hacking or manufacturing viruses at a scale that lets anyone do it in their basement.

Why couldn't these labs just train models on useful stuff and leave out the dangerous stuff?

tonyarkles6 days ago
> models being out there that enable hacking

It's been really nice to be able to breathe new life into some old hardware I had kicking around that's been discontinued. Some of it just needed old exploits applied to it, some of it needed some binary reverse engineering. Lots of security tools are dual-use as well; a model that knows nothing about hacking is going to have a really hard to time helping defend a system that's getting hacked (see the HuggingFace incident where HF staff were unable to use ChatGPT or Claude to analyze the logs from the attack because they hit security research guardrails).

> manufacturing viruses at a scale...

I'm not sure if you're referring to software viruses or biological viruses here.

If you mean software viruses, see above.

If you mean biological viruses, a lot of this gets back into the dual-use nature as well. I brew beer and mead. This involves cultivating specific strains of bacteria and providing them with a medium where they can convert sugar into CO2 and Ethanol. I don't think there's a good way to thin-slice the training data so that it can be an expert helper at Saccharomyces cerevisiae cultivation while being completely naive to Clostridium botulinum cultivation. Even further, it seems that helping someone make sure that they're not inadvertently cultivating Botulinum (e.g. water bath canning with insufficient pH) is useful.

ChickeNES6 days ago
Because that's not how these models work? Besides, plenty of "useful" things are nonetheless "dangerous" (can't have modern chips without hydroflouric acid, the first example to come to mind)
illithid06 days ago
Malicious actors are going to figure it out anyway. They already have. There are good guys who are hacking things to help (like me) and are having immense trouble leveraging models to that end because labs make it hard to prove you're not a criminal.
smallmancontrov6 days ago
> I'm not sure why you're so happy about models being out there that enable hacking

ffs is this "Hacker News" or did I accidentally click over to "Oh No I Saw A Hacker And Wet My Pants News"?

qgin6 days ago
Are we essentially doomed?

We don't even know how to align models, but even if we did, apparently undoing that alignment if trivial.

Really I'm looking for any argument that lays out a scenario where this works out.

cyanydeez6 days ago
I'm pretty sure we're dooming because capitalism; not because of any real or imagined capability of an llm.
ChickeNES6 days ago
Who is we?
Powdering70826 days ago
Nice work thanks for doing it, a couple of notes:

It looks like you are referencing Engram [1], but aren't actually gathering a n-gram (e.g. n=1) but rather individual token_ids.

use_cache=True in ``` with torch.no_grad(): outputs = model.generate(*inputs, max_new_tokens=150, do_sample=False, pad_token_id=tokenizer.eos_token_id, use_cache=True)

    return tokenizer.decode(outputs[0][prompt_len:], skip_special_tokens=True).strip()
```

I think there's a bug around not updating current_train_input_ids as more tokens are updated and processed. To be honest I don't fully understand the code so I could be wrong. Happy to chat more if you're interested I'll shoot you an email!

Lastly just for my sake, please correct me if I am wrong, but my reading is that you are learning an additional gate on top of a select number of layers that modifies locally & dynamically for one particular token to better match the training set that was filtered to not include any refusals.

[1]: https://github.com/deepseek-ai/Engram/blob/main/Engram_paper...

phatak-dev6 days ago
Thank you.

Yes here engram is used as the hashing mechanism for tokens which mainly try to learn vectors for the refusal ones. So it may not be exactly the engram methodology of DeepSeek it's more of used in its spirit.

Yes the gate exist to only apply residual for the tokens focused around refusal so the other tokens are not intercepted.

Feel free to mail to email in my profile. Love to discuss more.

Read the full thread on Hacker News →

Related stories