← Latest papers
🤖 AI

Min-kk Sampling: Decoupling Truncation from Temperature Scaling via Relative Logit Dynamics

This paper introduces Min-kk Sampling, a novel decoding strategy that achieves strict temperature invariance and improved text quality by dynamically truncating the logit distribution based on local "semantic cliffs" rather than global statistics or fixed probability thresholds.

Original authors: Yuanhao Ding, Meimingwei Li, Esteban Garces Arias, Matthias Aßenmacher, Christian Heumann, Chongsheng Zhang

Published 2026-04-14
📖 4 min read☕ Coffee break read

Original authors: Yuanhao Ding, Meimingwei Li, Esteban Garces Arias, Matthias Aßenmacher, Christian Heumann, Chongsheng Zhang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a chef trying to cook a perfect meal using a giant, magical cookbook (the Large Language Model). Every time you ask for a recipe, the book doesn't just give you one answer; it whispers a list of thousands of possible ingredients, some perfect, some okay, and some completely nonsense (like "add a tire" or "sprinkle with silence").

To get the best dish, you need a way to pick the right ingredients from that list. This is what decoding sampling is all about.

The Problem: The "Temperature" Knob

Most chefs use a dial called Temperature to control how creative or safe the cooking is.

  • Low Temperature: The chef is very strict, only picking the top 3 most obvious ingredients. The meal is safe but boring.
  • High Temperature: The chef gets wild, picking from a huge list of weird ingredients to be creative.

The Catch: Current methods (like Top-k or Top-p) are like a chef who gets confused when you turn up the heat.

  • If you turn the temperature up just a little, they start grabbing random, garbage ingredients (like "add a shoe") because the list of "okay" ingredients gets too long and blurry.
  • If you turn it up too high, the meal becomes a disaster. The chef forgets how to cook entirely and starts hallucinating nonsense.

The Old Solutions (And Why They Fail)

  1. Top-k (The Rigid Chef): "I will always pick the top 5 ingredients, no matter what."
    • Flaw: If the top 5 are all bad because the heat is high, you still get a bad meal.
  2. Top-p (The Greedy Chef): "I will pick ingredients until I have 90% of the total flavor."
    • Flaw: When the heat is high, that 90% includes a massive amount of garbage noise.
  3. Top-nσ (The Statistician Chef): "I'll look at the entire cookbook and cut off anything that looks statistically weird compared to the average."
    • Flaw: This is too slow and easily tricked. If there are a million tiny, weird ingredients at the bottom of the list, they mess up the "average," causing the chef to accidentally keep the garbage or cut off good ingredients.

The New Solution: Min-k Sampling (The "Cliff" Detective)

The authors of this paper propose Min-k Sampling. Instead of counting ingredients or looking at the whole book, this method acts like a Cliff Detective.

Here is the analogy:
Imagine the list of ingredients is a hiking trail going down a mountain.

  • The Top: The path is wide, flat, and safe. These are the high-confidence, correct words (e.g., "Paris" when asked about France).
  • The Cliff: Suddenly, the ground drops off steeply. This is the "Semantic Cliff."
  • The Bottom: Below the cliff is a chaotic, foggy abyss filled with rocks, mud, and nonsense (the low-quality noise).

How Min-k works:

  1. It walks down the list of ingredients.
  2. It looks for that steep drop (the cliff).
  3. It says, "Okay, everything above this drop is safe. Everything below it is dangerous noise. I will stop right here."

Why is this magic?

  • It ignores the Heat: Whether the temperature is low or high, the shape of the mountain doesn't change. The cliff is still there. So, Min-k always stops at the same spot, regardless of how "hot" the cooking gets.
  • It's Dynamic: If the mountain is flat (the model is very unsure), Min-k has a backup plan to keep cooking, but if there's a clear cliff, it stops exactly there.

The Results: Why Should You Care?

The paper tested this on math problems and creative writing:

  • Math (Reasoning): When other methods started hallucinating nonsense at high temperatures (getting 0% correct), Min-k kept solving the math problems correctly (staying around 75-80% accuracy). It acted as a safety rail.
  • Creative Writing: It managed to be creative without becoming gibberish. It kept the "flavor" of the story without adding "shoes" to the soup.
  • Human Taste Test: Humans preferred the food cooked by Min-k over the other methods.

The Bottom Line

Min-k Sampling is like giving your AI a pair of smart glasses that can instantly see where the "good stuff" ends and the "garbage" begins, no matter how chaotic the environment gets. It allows AI to be creative and bold without losing its mind, making it a huge step forward for generating high-quality text.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →