Top
Best
New

Posted by AnhTho_FR 4 hours ago

A walk through of the DeltaNet family of linear attention variants(blog.doubleword.ai)
271 points | 111 comments
TrackerFF 3 hours ago|
Machine learning could need, and probably has needed, some unified math notation for the past 15 years IMO. With that said, it was worse back in the day - when ML papers were the products of researchers from all over, you'd see some wild notation.

Many will likely disagree with me, but inconsistent notation (across papers!) is to me friction. At least in this article the author explicitly explains the notation at the very start...that is not always the case. Rarely, even.

EDIT: Didn't even notice the notation switch, much appreciated.

olalonde 2 hours ago||
I never understood people who preferred traditional math notation (e.g. single letter symbols, weird characters like ∣q⟩ instead of writing down an explicit type, etc.). I guess the main advantage is terseness? To me, the mathematical expressions would be so much easier to understand if they were just written in pseudo code or an actual programming language like Python.
OkayPhysicist 1 hour ago|||
Terseness is a significant advantage in pattern recognition. If you write a long, detailed breakdown of every step, not only are you spending a bunch of time writing, you're also obscuring the natural symmetries of the statement.

It's like saying "I never understood people who prefer to use functions instead of inlining everything". Adding a bunch of visual noise to a statement doesn't improve comprehension.

crubier 2 hours ago||||
This 1,000%

Trying to read any math paper is basically like trying to read CodeGolf.

aeternum 2 hours ago||||
Math notation ultimately is pseudo code just with mostly single letter variables and many operators that are encoded purely by position thus not even requiring a symbol.

Remember that the oft-used e^x is actually an infinite series, even writing it out in summation form would be quite verbose given its frequency in many equations.

crubier 2 hours ago|||
exp(x)
kurthr 2 hours ago||
Longer to write and generally a numerical rather than symbolic representation.
crubier 1 hour ago||
Longer to write: Don't care, that's kinda the point. I'd rather read a descriptive name in english than a greek letter with a tilda and a dot subscript.

Generally a numerical rather than symbolic representation: Meh https://docs.sympy.org/latest/modules/functions/elementary.h...

SkyBelow 2 hours ago|||
I feel the magic in math is that the notation is to a more universal sort of language, and the e^x captures that. e^x means that infinite series, but it means a few other things at the same time. That those different things are sometimes related, that e^2 means e*e, a simple enough operation most can understand, but that it also means that infinite series with 2 in place of x, is part of the complexity of math that makes it quite different than a classical programming language. With most programming languages, someone assigned those equivalent meaning, and while it might be important to understand why, it shows you the mind of the who designed the language. But, in math (and in true Computer Science), when you see an equivalence of this sort, whose mind are you now glimpsing into?

But, for someone just starting out (or even an expert who just wandered into a new area), this becomes a barrier to understanding. Sometimes we need the mathematical summary, what tells us the immediately answer we are interested in, perhaps even if it loses the deeper nuances that are beneficial for the experts more fluent in the language.

(And yes, all math notation is human created, so it makes my point quite a bit messier in practice.)

glaslong 1 hour ago||||
You really just get tired of writing/reading "AbstractJavaSerializerBeanFactoryFactoryAbstactMutatorFactoryAccessEnterpriseBeanFactory()" over and over again.

So you and all your peers agree to call that procedure "ẽ"

htrp 2 hours ago||||
math notation doesn't bias towards English language understanding like pseudocode
dfee 2 hours ago||
but it biases towards the latin alphabet. so your point is diminished.
tyre 1 hour ago||
and Greek!
dboreham 2 hours ago|||
Well, humanity struggled for 2000 years trying to do mathematics without notation, so its benefit is not to be sniffed at. But really it's just an APL-vs-Fortran type debate. They're not fundamentally different. Remember also that Ramanujan had to re-use paper it was so costly/hard to find.
Asraelite 1 hour ago|||
> At least in this article the author explicitly explains the notation at the very start

They explain one particular aspect of the notation but never define the variables used. What is k? q? S?

It's obvious if you've studied machine learning before, and for some of them you can make an educated guess, but it makes the article mostly opaque if you don't already have some domain-specific background knowledge.

loubbrad 1 hour ago||
The author does define these terms implicitly at the beginning of §1, where they define standard MHA in this notation. From the formula, (q_t) is the query generated from the hidden state at the (t)-th position (e.g. the token at position (t)), (k_i) is the key for the token at the (i)-th position, (o_t) is the (vector) attention output for the (t)-th position, etc. (S) is then defined later as the sum of the outer products of (k_i) and (v_i) over all positions up to (t). However, I do agree with you that it would not hurt to make this more explicit.
whatsakandr 1 hour ago||
I used to think this, then I realized that the amount of time you spend with equations is so much more than code, and the terseness makes them much easier to read once you know what the symbols are.

Also, letters avoid having to name them, naming being a hard problem and all.

benjiro29 1 hour ago||
> You Could Have Come Up with ...

Creating or combining to have something new, that does not already exist is actually freaking hard!

The moment its presented and people go "o, that is not that difficult", "i was able to also do that", or some nonsense like that. Everything looks simply the moment somebody did the hard work.

We have all been there was developers. Thinking we invented something new, and ... then you discover somebody already made it in the 70's and its everywhere. But because it never cross your path, you never realized it existed.

dr_kretyn 1 hour ago||
The bra-ket notation makes this all very simple/intuitive for me. With "vectors" I always get confused which is horizontal/vertical, and then I just follow blobs, and get distracted, and leave. With bra-kets the whole thing was very intuitive! I'm now going to covert other articles to the notation as I must have missed a lot of good stuff!

(Side notes: I have physics PhD and mild dyslexia)

croemer 3 hours ago||
LLM written for sure:

> The identity [...] is the whole trick. The outer product is a matrix; the inner product is a number. We no longer store every past key and value. We store their summed outer products in the fixed-size state S_t.

robertclaus 3 hours ago||
Ya, probably started with asking for a buzzy title.
geraneum 3 hours ago||
This is what you get when you prompt claude to avoid –
HonshinM 3 hours ago||
A visualized tutorial: https://snowchord.com/blog/linear-attention-visualized/
xp84 2 hours ago||
When I see these types of articles and headlines, it just makes me supremely grateful for all the many people far smarter[1] than me. And humbles me, too, since I actually passed for a "very smart person" in places like high school and undergrad. In fact, I'm 'smart' for an average person, but there are definitely millions of people who make me look like a rube in comparison.

[1] I specifically mean those who are able to hold very big complex ideas and systems in their head, and reason about them, which seems to be an important talent for mathematicians.

abixb 2 hours ago|
Yes. I continue to believe that humans will still be the source of the vast majority of novel ideas, even as they increasingly use AI-related tools to accelerate their works.

One of the though experiments I ran with one of my friends during a recent conversation over drinks was this: raising a bunch of "control group" kids away from the screens and the algorithmic ocean of "normie-tier content," and in a very learner-friendly setting with hyper-strict control on the quality of media and source material they get access to, just like we've been doing it with frontier models. Think of it like a monastery but for kids, while teaching them all the latest advances in our understanding of reality through mathematics, engineering, computer science, deep learning, and whatnot.

What I'm getting at it is that we might still need super smart people to push the boundaries of knowledge while using super-advanced AI tools, and anyone who says AI will "completely replace" humans are just misguided. We will always need super smart people with largely unadulterated thinking.

dmd 1 hour ago|||
You should read 'Anathem' by Neal Stephenson, which goes into great deal about this kind of establishment.
abixb 1 hour ago|||
Thank you for the recommendation. I'm yet to checkout any of Neal Stephenson's works, which is real unfortunate.
dmd 1 hour ago||
I'd say Anathem is the best of the bunch, and has held up best over time.
rhymeswithjazz 1 hour ago|||
I was reading their comment and was just about to suggest the same thing.
phoghed 1 hour ago||||
Not sure I follow, what are you doing with these philosopher kings after you mint them?
abixb 1 hour ago|||
Well, the goal was to make them come up with cutting-edge theories and/or hypothesis to the most pressing problems facing humanity. Kids will naturally specialize (just like... MoE models?) as their find their groove while growing up, but the goal is to make sure highly gifted kids from diverse background get highest quality space to think without being moulded or "adulterated" by the noise of pop culture and "everyday" life.
inanutshellus 1 hour ago|||

    > Are you thinking what I'm thinking, Pinky?
    > I think so, Brain, but --
    > YES! Time to take over the world [utilizing these philosopher kings]!
To jump from one dated pop culture reference to another, it is a very Manchurian Candidate-esque plan. Not one without merit, but clearly a pessimistic take on the future of education for the masses.
moffkalast 1 hour ago|||
We should be (and kind of are) doing that with all kids really. I think you've just reinvented the boarding school.
juancn 2 hours ago||
I really liked the ket notation. I was aprehensive at first, but it makes operations much more clear.

I would have liked some refresher on some variables though (like d_k in quadratic attention).

_Microft 3 hours ago||
Side note, before you ask: yes, bra-ket notation is called like that because of the brackets.

https://en.wikipedia.org/wiki/Bra-ket_notation

piterrro 3 hours ago||
At first I felt bad about not having come up with this solution. But then I realized I have problems with writing binary search by myself in JS and immediately felt better.

Now way I could have come up with Kimi Delta Attention.

bee_rider 3 hours ago|
Lots of linear algebra codes are actually “easy to write” in a way. It isn’t like conventional CS where you are always going a bunch of recursive nonsense going on. There should be mathematical relationships between all of the variables, there are well implemented libraries for the common mathematical concepts, and it is rare to need to go more than a couple loops deep (anything more complex than that should get shunted off into a library anyway).
Kushagra125 4 hours ago|
The toggle is really useful. Liked it!!
More comments...