- Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in Cargo.lock. (RFC 3923) docs #17335
- cargo-install: now uses the existing lockfile in the .crate tarball by default. --locked in cargo install becomes a no-op. #17388
That was one of the biggest gotchas with Rust. It’s unfortunate that it took so long to change this very unintuitive and potentially dangerous behavior.
Dependency cooldowns receiving such a whiplash this year. Earlier everyone was advocating for them because of the supply chain attacks. Now, people are worried because you might miss 0 days if you use them.
Nonetheless, the ability to set and configure it is a welcome feature.
You should do both: you should let normal updates cool down, and you should immediately patch security advisories.
One of the biggest ergonomic problems with cooldowns is that many tools let the former goal obstruct the latter. Both should be part of the state machine of resolution itself, rather than things that get layered on.
Usually people advocate dependency cooldowns as a mitigation for supply-chain attacks, where you're depending on a module with a malicious maintainer, possibly a new one (perhaps one who stole the old maintainer's keys so they can pretend to be the old maintainer).
In that situation, how do you distinguish between "normal updates" (that you should let cool down) and "security advisories"? If all the hypothetical malicious maintainer has to do to get you to update is to publish a security advisory for their own package, wouldn't they just do that? It might even be a real advisory about a real security hole that they introduced, but claiming more versions are affected than actually are affected.
It takes additional permissions, in general, to issue an advisory. And “supply chain” attacks in general tend to be used by smash-and-grab attackers, who don’t have time on their side. It’s not like a browser 0day where the attacker’s goal is to preserve their underlying exploit primitive for as long as possible.
I’m talking about things like GHSAs. You can’t issue one just by compromising a push credential to a repository, which is how most of these supply chain attacks start.
How do you separate security advisories from regular updates? (If it’s just a box you check, it only means attackers will say “this is a security update” on the malicious package they upload.)
The point of cooldowns is for when a crate author’s account is compromised and used to publish malicious code. Saying “security advisories bypass cooldowns” wouldn’t really help anything there.
> If it’s just a box you check, it only means attackers will say “this is a security update” on the malicious package they upload.
It generally requires additional permissions, per the adjacent respond. And it introduces additional scrutiny on the release, which is the last thing an opportunistic attacker wants (the entire reason “supply chain” attacks are effective is because nobody gives any thought to upgrading their dependencies in the normal case).
There are many cases in which security advisories aren't published. But I guess an alternative could be to update using the cooldown, and then diff the dependencies that would get a newer version if the cooldown wasn't in place to check if they contain anything relevant for the particular application you're developing.
Why wouldn't a supply-chain attacker simply manipulate the project into producing a security advisory to get their exploit code pushed through inside a high-priority release?
I.e. get a puppet/co-conspirator to push vulnerable code; wait until that code gets released as v1.2.3; submit other vulnerable code; wait for that code to be merged and released as v1.2.4; then submit a vuln report for the vuln introduced in v1.2.3; and wait for v1.2.3 + v1.2.4 to be security-deprecated and v1.2.5 to be fast-released to replace them.
Now v1.2.5 exists and has your still-unknown 0day in it, while versions prior to v1.2.5 are deprecated. If devtools that had pinned v1.2.3 get forced "upward" to v1.2.5 despite the cooldown, you win.
I haven't seen anyone advocate against cooldowns because those are completely different problems.
How would removing cooldowns help you patch vulnerabilities? That would imply that your CI is configured to update dependencies, rebuild, and push them to production without human oversight?
That's obviously not the way to go, you must have human oversight and if you do then your humans should be alerted when one of your dependencies patches a security issue. At that point you review it, override the cooldown, and push it to production.
You should use a cooldown. The effects of a supply chain attack are significantly worse than the effects of a 0 day. You can always make exceptions on a case-by-case basis.
The most important part of a negative claim is implicit: what reasonable assumptions might negate the claim?
Sure, by Rice's theorem, no program can decide whether an arbitrary function always computes the sum of its two inputs. But that's only because we are allowing arbitrarily difficult-to-analyze implementations of the sum function. So this theorem co-exists with the fact that simple implementations of sum can be proven correct.
In this light I think the best conclusion is "to write correct software in reasonable time, we must use easy to analyze languages and program styles".
While the author didn't make proper use of it, this is actually the best example of the articles point.
This is because I/P is sufficiently complicated and brutal that for any involved party X (Arab countries, Israel, Palestinians, Britain...), an interested party can make party X seem "inhuman, clearly we should defeat X anywhere we find them" to someone not previously informed on the topic.
So even if we don't select the evidence, or even select the date, but just selectively amplify, propaganda about it works just fine, across different media. The LLM news here is that as a media, LLMs transform biased background knowledge into eloquent confident _and tailored_ arguments for the bias, like a suave but motivated news anchor that is able to converse individually with _every listener_.
Because for all X, someone _is_ already amplifying the message "hate X", the main outcome of LLMs+Propaganda is not hate for a specific X, but just more hate.
And the solutions? The authors' ledger+timeline+blame+semantic checks are not a bad place to start.
For me, the core is that often the enemy we can and should defeat is not people, it is memes, like "hate _". LLMs (among other effects, good and bad) whitewash memes, and we all better be prepared to defend ourselves against their influence.
I use CC at a client because that's their stack. I use (a particular version of) OpenCode for my own work, because it is so much better. Reading this post makes me sad.
Because everything matches and explains oddities I've seen and forgiven. So despite the hyperbole and the places where the authors' general sentiment are not mine, he's basically right, and I need to find a different harness.
If the post resonates for you too and you've found something better, happy for recommendations. pi seems to get the most mentions here, anyone feel it (or another option) is specifically better on these architectural aspects?
I'd offer that the AI harness ecosystem is discovering the same thing any rapidly-growing software space did before it -- lines of code are a maintenance burden.
That's not something a team sees when they're doing greenfield, forward development. (Most projects, now)
It only crops up when they have enough on-the-books code that features / bugfixes start requiring introspection of existing code. (Now to ~1 year from now)
And a lot of these projects don't seem to be approaching codebase size growth from a future code debt perspective...
Answering myself: I've tried pi and oh-my-pi (omp.sh) in the last couple of days, and the latter feels solid and more effective than CC/opencode/pi. I have not reviewed the code, and 2 days is not a lot, so take with a large grain of salt, obviously.
Its a nit pick, but backpropagation is getting a bad rep here. These examples are about gradients+gradient descent variants being a leaky abstraction for optimization [1].
Backpropagation is a specific algorithm for computing gradients of composite functions, but even the failures that do come from composition (multiple sequential sigmoids cause exponential gradient decay) are not backpropagation specific: that's just how the gradients behave for that function, whatever algorithm you use. The remedy, of having people calculate their own backwards pass, is useful because people are _calculating their own derivatives_ for the functions, and get a chance to notice the exponents creeping in. Ask me how I know ;)
[1] Gradients being zero would not be a problem with a global optimization algorithm (which we don't use because they are impractical in high dimensions). Gradients getting very small might be dealt with by with tools like line search (if they are small in all directions) or approximate newton methods (if small in some directions but not others). Not saying those are better solutions in this context, just that optimization(+modeling) are the actually hard parts, not the way gradients are calculated.
Yes. No need to be apologetic or timid about it — it’s not a nit to push back against a flawed conceptual framing.
I respect Karpathy’s contributions to the field, but often I find his writing and speaking to be more than imprecise — it is sloppy in the sense that it overreaches and butchers key distinctions. This may sound harsh, but at his level, one is held to a higher standard.
> often I find his writing and speaking to be more than imprecise
I think that's more because he's trying to write to an audience who isn't hardcore deep into ML already, so he simplifies a lot, sometimes to the detriment of accuracy.
At this point I see him more as a "ML educator" than "ML practitioner" or "ML researcher", and as far as I know, he's moving in that direction on purpose, and I have no qualms with it overall, he seems good at educating.
But I think shifting the mindset of what the purpose of his writings are maybe help understand why sometimes it feels imprecise.
Whoever chose this topic title perhaps did him a disservice in suggesting he said the problem was backprop itself, since in his blog post he immediately clarifies what he meant by it. It's a nice pithy way of stating the issue though.
Nah, Karpathy's title is "Yes you should understand backprop", and his first highlight is "The problem with Backpropagation is that it is a leaky abstraction." This is his choice as a communicator, not the poster to HN.
And his _examples_ are about gradients, but nowhere does he distinguish between backpropagation, a (part of) an algorithm for automatic differentiation and the gradients themselves. None of the issues are due to BP returning incorrect gradients (it totally could, for example, lose too much precision, but it doesn't).
Yeah - he chose it as a pithy/catchy description of the issue, then immediately clarified what he meant by it.
> In other words, it is easy to fall into the trap of abstracting away the learning process — believing that you can simply stack arbitrary layers together and backprop will “magically make them work” on your data.
Then follows this with multiple clear examples of exactly what he is talking about.
The target audience was people building and training neural networks (such as his CS231n students), so I think it's safe to assume they knew what backprop and gradients are, especially since he made them code gradients by hand, which is what they were complaining about!
But Karpathy is completely right; students who understand and internalize how backprop works, having implemented it rather than treating it as a magic spell cast by TF/PyTorch, will also be able to intuitively understand these problems of vanishing gradients and so on.
Sure, instead of "the problem with backpropagation is that it's a leaky abstraction" he could have written "the problem with not learning how back propagation works and just learning how to call a framework is that backpropagation is a leaky abstraction". But that would be a terrible sub-heading for an introductory-level article for an undergraduate audience, and also unnecessary because he already said that in the introduction.
I never disagreed with the utility and importance of understanding backprop. I'm glad the article exists. And it could be easily improved -- and all of us can gain [1] by acknowledging this rather than circling the wagons [2], so to speak, or excusing unforced errors.
> ... he could have written "the problem with not learning how back propagation works and just learning how to call a framework is that backpropagation is a leaky abstraction". But that would be a terrible sub-heading ...
My concern isn't about the heading he chooses. My concern is deeper; he commits a category error [3]. These following things are true, but Karpathy's article gets them wrong: (1) Leaky abstractions only occur with interfaces; (2) Backpropagation is algorithm; (3) Algorithms can never be leaky abstractions.
Karpathy could have communicated his point clearly and correctly by saying e.g.: "treating backprop learning as a magical optimization oracle is risky". There is zero need for introducing the concept of leaky abstractions at all.
---
Ok, with the above out of the way, we can get to some interesting technical questions that are indeed about leaky abstractions which can inform the community about pros/cons of the design space: To what degree is the interface provided by [Library] a leaky abstraction? (where [Library] might be PyTorch or TensorFlow) Getting into these details is interesting. (See [4] for example.) There is room for more writing on this.
[1]: We can all gain because accepting criticism is hard. Once we see that even Karpathy messes up, we probably shouldn't be defensive when we mess up.
[2]: No one is being robbed here. Criticism is a gift; offering constructive criticism is a sign of respect. It also respects the community by saying i.e. "I want to make it easier for people to get the useful, clear ideas into their heads rather than muddled ones."
Can’t agree more about the technical points (category error etc), and then the unexpected switch to the value of receiving constructive criticism as a gift not an attack.
Myself, I’m definitely conditioned to receive it as an attack. I’m trying to break this habit. This morning I gave some extensive feedback to some friends who have a startup. The whole time I was writing it, I was stressing out that they’d feel attacked, because that’s how I might take similar criticism.
How was it actually received? A mix I think. Some people explicitly received it as a gift, and others I’m not so sure.
I get your point, but I don't think your nit-pick is useful in this case.
The point is that you can't abstract away the details of back propagation (which involve computing gradients) under some circumstances. For example, when we are using gradient descend. Maybe in other circumstances (global optimization algorithm) it wouldn't be an issue, but the leaky abstraction idea isn't that the abstraction is always an issue.
(Right now, back propagation is virtually the only way to calculate gradients in deep learning)
So, are computing gradients details of backpropagation that it is failing to abstract over, or are gradients the goal that backpropagation achieves? It isn't both, its just the latter.
This is like complaining about long division not behaving nicely when dividing by 0. The algorithm isn't the problem, and blaming the wrong part does not help understanding.
It distracts from what is actually helping which is using different functions with nicer behaving gradients, e.g., the Huber loss instead of quadratic.
> It distracts from what is actually helping which is using different functions with nicer behaving gradients, e.g., the Huber loss instead of quadratic.
Fully agree. It's not the "fault" of Backprop. It does what you tell it to do, find the direction in which your loss is reduced the most. If the first layers get no signal because the gradient vanishes, then the reason is your network layout: Very small modifications in the initial layers would lead to very large modifications in the final layers (essentially an unstable computation), so gradient descend simply cannot move that fast.
Instead, it's a vital signal for debugging your network. Inspecting things like gradient magnitudes per layer shows you might have vanishing or exploding gradients. And that has lead to great inventions how to deal with that, such as residual networks and a whole class of normalization methods (such as batch normalization).
It’s just an observation. It’s an abstraction in the classical computer science sense in that you stack some modules and the backprop is generated. It’s leaky in the sense that you cant fully abstract away the details because of the vanishing/exploding gradient issues you must be mindful of.
It is definitely a useful thing for people who are learning this topic to understand from day 1.
I use python extensively. I've used bash (+awk+xargs+sed...) extensively.
Nushell is already a great improvement over bash _as a shell_. It is even better when using it to compose _preexisting text based programs_. I would say it is better in every way I can think of, except for:
- not (yet) coming pre-installed, and
- stability of interfaces and language.
Its already better enough to be my default shell on my daily driver, though I keep bash around because some things really assume it. I very much look forward to one day having a userspace with no traditional shells at all.
nushell is not yet a strict improvement over python, but it might one day be, and it is already better at:
- munging text, json, dates and tables
- quickly creating nice CLIs callable from the shell (even if that shell isn't nu!)
- fun of programming in it
> Nushell is trying to blend two domains, shells and programming languages, which I see distinct advantages in keeping seperate.
Interesting, though, how many PL features the most popular shells tend to have...
> I do not want the world to be built on the back of shell scripts, regardless of how good you make the type system.
If I had read that before knowing nushell, I would strongly agree. Yet, it turns out you can make a shell so good I wouldn't mind if... not the world, but _a lot more_ was built on it.
One area for refinement: it considers two stacks either identical or unrelated. Consider that stack A;B is actually very close to A;B;C, the difference might be due to a sample time occurring just before or just after the call to C. OP considers them just as different as A;B and Z;W, therefore amplifying a measurement noise.
This suggests using a refined metric between stacks (e.g., an edit distance counting pushes and pops), and then we can use it in defining the metric between flamegraphs (e.g., an optimal transport metric [1], instead of the proposed L1).
Avoiding that noise amplification reduces the background noise level, therefore the cost of effective measurements. From another perspective, the current OP scheme creates an avoidable curse of dimensionality in the form of the Hotelling test's requirement that each sample has more measurements have more samples than distinct stack frames. So the same code split into more functions is harder to measure, and too-small samples are useless. I think neither of those is necessary if we take stack similarity into account.
A) "Someone said Lean4 proof so it must be bullet-proof and fulfill all my hopes!" B) "Eh, lean4 is imperfect, so it means nothing"
Inconveniently, both of those caricatures are wrong.
Lean4 gives us a high level of confidence in the _theorem validated, under the assumptions allowed_.
This makes it high value to learn to read lean4 theorems (not proofs).
reply