← Latest papers
🤖 machine learning

Teaching Metric Distance to Discrete Autoregressive Language Models

This paper introduces DIST2Loss, a distance-aware objective function for discrete autoregressive language models that replaces traditional one-hot targets with reward-weighted distributions to improve data efficiency and performance across diverse tasks like visual grounding, robotics, and image generation by leveraging metric relationships between tokens.

Original authors: Jiwan Chung, Saejin Kim, Yongrae Jo, Jaewoo Park, Dongjun Min, Youngjae Yu

Published 2026-05-08
📖 4 min read☕ Coffee break read

Original authors: Jiwan Chung, Saejin Kim, Yongrae Jo, Jaewoo Park, Dongjun Min, Youngjae Yu

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 teaching a robot to speak or act. Currently, most large language models (LLMs) learn like a student taking a multiple-choice test where there is only one correct answer. If the robot guesses "4" when the answer is "5," the teacher says, "Wrong! Try again." It treats "4" and "5" as completely different, unrelated things, just like it treats "apple" and "banana" as unrelated.

The paper introduces a new teaching method called DIST2Loss. It argues that for certain tasks—like math, robot movements, or drawing boxes around objects—the answers aren't just random categories; they have a distance between them. "4" is very close to "5," but "4" is far from "90."

Here is how the paper explains this using simple analogies:

1. The Problem: The "All-or-Nothing" Teacher

In the old way (called "one-hot targets"), if a robot is trying to learn to draw a box around a cat, and it draws a box that is slightly too small, the computer says, "Total failure." It doesn't matter if the box is 1 pixel off or 100 pixels off; the penalty is the same.

This is like a teacher grading a math test where getting the answer "4.9" when the answer is "5.0" gets you a zero, just like getting "100" gets you a zero. The model doesn't learn that "4.9" was actually almost right.

2. The Solution: The "Reward Map" (DIST2Loss)

The authors created a new way to grade the robot. Instead of a simple "Right/Wrong" switch, they give the robot a map of rewards.

  • The Analogy: Imagine you are throwing darts at a target.
    • Old Method: If you hit the bullseye, you get 10 points. If you miss by even a millimeter, you get 0 points.
    • DIST2Loss: If you hit the bullseye, you get 10 points. If you miss by a millimeter, you get 9.9 points. If you miss by a mile, you get 0 points.

The model learns that being close is better than being far away. It uses the actual distance between numbers or coordinates to create a "soft" target. If the answer is 5, the model is encouraged to give a high probability to 4 and 6, and a lower probability to 1 or 10.

3. Why This is Special: No "Trial and Error"

Usually, to teach a robot to understand "closeness," you have to use a method called Reinforcement Learning (RL). This is like training a dog: you let the dog try something, see if it works, and then give it a treat or a scolding. This takes a long time, is messy, and can be unstable.

The paper claims DIST2Loss is a shortcut. It calculates the "perfect" reward map mathematically right from the start. It's like giving the dog a map of where the treats are hidden before it even starts running. The model learns the concept of "distance" instantly without needing to guess and fail thousands of times.

4. Where It Works (The Paper's Experiments)

The authors tested this "distance-aware" teaching method in four specific areas where "closeness" matters:

  • Visual Grounding (Finding Objects): When a robot is asked to draw a box around a "red car," DIST2Loss helps it draw a box that is geometrically closer to the real car, even if it's not perfect.
  • Robotics (Moving Arms): When a robot needs to move its arm to a specific coordinate (x, y, z), DIST2Loss helps it learn the movement faster and more accurately because it understands that being slightly off is better than being wildly off.
  • Reward Modeling (Grading Answers): When a model needs to rate how good a human's answer is (e.g., on a scale of 1 to 10), DIST2Loss helps it understand that a "9" is much closer to a "10" than a "1" is, leading to better grading.
  • Image Generation: When creating images from text, the model uses "tokens" (digital building blocks). DIST2Loss helps it understand that swapping one token for a "nearby" token keeps the image looking similar, while swapping for a "distant" token ruins the picture.

The Bottom Line

The paper claims that by simply telling the model, "Hey, these numbers are close to each other," the model becomes much better at tasks involving numbers, coordinates, and measurements. It makes the model more efficient (needs less data to learn) and more accurate, without needing complex, unstable training methods. It turns a "black and white" world of right/wrong into a "shades of gray" world where being close counts for something.

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 →