An unofficial, read-only Hacker News reader. Join the beta →

An introduction to uncertainty in machine learning (opens external site)

143 points by chrhenning 1 day ago | chrhenning.com | 13 comments on HN

Comments (13)

  1. A very good introduction - thank you! Where would you say uncertainty characterization for non-parametric models or bounds on those (like Chebyshev bounds) sit?
    Replies (1)
    1. Hey, thanks for the feedback, really appreciate it! I would need to study Chebyshev-type bounds again in more detail to give a convincing answer, but they roughly fit into the "Getting a Guarantee" section.

      On non-parametric models like GPs: I use parameters theta to index hypotheses for simplicity, but the overall story carries over directly when you move from weight space to function space. For instance, GP regression with a Gaussian likelihood still can't represent the bimodal steering angle at the lane split.

      Hope that help :)

  2. say nine restore tests finish in an hour and you give up on the tenth after four. a dashboard that only counts completed jobs says 100% finished in an hour. you could collect years of data that way and get very precise about the restores that finish. when someone asks how sure we are that we can recover in four hours, that tenth test is the one i want to talk about.
    Replies (1)
    1. What you are referring to is basically the difference between 'Value at Risk' and 'Expected Shortfall'. VaR is the e.g. 95th percentile of the loss/time spent in this case, while ES is the average of the loss/time spent beyond the 95th percentile. ES harder to estimate than VaR, but there are methods, tail estimations,... it's a whole field in engineering and finance.
      Replies (1)
      1. I think the issue the parent talks about is failure to capture statistics for processes that didn't finish, which is more of an operational issue.
  3. I really liked the wind power example. It's a bit unsettling that the cases where you most need to get the probabilities right are also the ones you have the least data on
    Replies (1)
    1. Hardware lottery, meet data lottery?
  4. Looks interesting, but the LLM-based writing had me stop after~10% of the webpage with how sick I was of it. Not declaring it is a big issue IMO. Why should I read your text if you clearly cannot be bothered to write it yourself?
    Replies (1)
    1. At this point, I just assume slop will be present more often than not.
  5. I kinda liked to think of uncertainty/entropy minimization as "spike sharpening". Picture baseline distribution of perfectly even odds being uniform/flat, no spike. The sharper the spike rising up from that (line being pulled into a curve), the bigger the confidence in a specific prediction (label above the "mountaintop").

    Typical supervised/self-supervised training needs a correct known answer to sharpen towards (cross-entropy/KL-divergence minimization), with soft caps on certainty/spikes to smooth labels, and a temperature var to divide logits before they become % (flat = hot/fluid, sharp = cool/rigid).

    IIRC, smoothening is a static knob affecting backward pass, while temp is a dynamic one affecting forward pass, alongside some other knobs ("trimmers"/filters like top K & P).

    Besides being a kind of generic control knob for different subsystems, end-users could tweak inference temp a lot more often in past models (less expose it now for a bunch of reasons).

    It's basically a signal that says "Be more adventurous!" when high. Might explain why the common advice was to ratchet up temp for creative stuff and cool it down for stuff like code.

    Bit of a tangent but related to the post topic I guess. There's a bunch of caveats but it's the least bad way I found so far to intuit the gist of the process during some model experiments.

  6. The main uncertainty I'm dealing with in relation to machine learning is if I still have a job a few months from now ...
  7. ML is all about uncertainty
  8. I think the most important punchline for neural networks (including language models) when it comes to uncertainty is the combination of the following two points.

    First, the output logits of neural networks provide very poor signals of the epistemic (reducible) uncertainty. In other words, the output logits are a highly lossy compression of the epistemic uncertainty. That's bad, because the very type of uncertainty you would hope to have a good handle over is obscured. With neural networks, we're typically dealing with high-dimensional inputs and outputs, for which it can be difficult for a human to detect covariate shifts relative to the given model, and by extension to anticipate when the model will go-off-the-rails.

    Second, neural networks can nonetheless provide relatively robust estimates of the epistemic uncertainty, but to do so, we can't rely on the output logits alone. Instead we need to view neural networks as hidden instance-based metric learners, and derive signals of the uncertainty via dense matching into the support set of the estimators. Similar to how RAG uses dense matching in semantic representation space for retrieval, we can use dense matching in feature representation space to model uncertainty. In other words, we can model the geometry of the feature representation space against the support set, and use that to construct robust estimates of the predictive uncertainty.

    The following provides a concrete implementation, and a particular estimator (here, to estimate regions of the distribution for which the class- and prediction-conditional accuracy is at least some value alpha, near 1):

    Similarity-Distance-Magnitude Activations. In Findings of the Association for Computational Linguistics: ACL 2026, pages 22037–22057, San Diego, California, United States. Association for Computational Linguistics.