Cyrillic homoglyphs appearing in English model outputs

#31
by LinkaG - opened

Model outputs Cyrillic homoglyphs instead of Latin characters in English answers

Description

When evaluating Qwen-based models, we observed that the model sometimes outputs Cyrillic characters that visually resemble Latin letters in responses to English questions.

Visually the text looks correct, but in Unicode these are different code points. As a result, automatic evaluation methods (substring match, token recall, exact match) mark correct answers as incorrect.

This behavior leads to systematic evaluation errors.


Examples

Model: Qwen3-8B

Example 1

Question

What is Tsutomu Seki's occupation?

Expected answer

astronomer

Model output

Tsutomу Sekі is an amateur аstronomer

Character substitutions

Cyrillic Latin
у (U+0443) y (U+0079)
і (U+0456) i (U+0069)
а (U+0430) a (U+0061)

Example 2

Question

In what city was Jorge Betancourt born?

Expected answer

Matanzas

Model output

Matanzас

Substitution

Cyrillic Latin
а (U+0430) a (U+0061)
с (U+0441) c (U+0063)

Example 3

Question

What genre is Culture?

Expected answer

roots reggae

Model output

Roots reggaе

Substitution

Cyrillic Latin
е (U+0435) e (U+0065)

Example 4

Question

Who is the father of Seol Chong?

Expected answer

Wonhyo

Model output

Wonhyо

Substitution

Cyrillic Latin
о (U+043E) o (U+006F)

Unicode homoglyphs observed

Common substitutions we observed:

Looks like Cyrillic Latin
a U+0430 U+0061
e U+0435 U+0065
o U+043E U+006F
c U+0441 U+0063
p U+0440 U+0070
x U+0445 U+0078
y U+0443 U+0079
i U+0456 U+0069
A U+0410 U+0041
B U+0412 U+0042
E U+0415 U+0045
K U+041A U+004B
M U+041C U+004D
H U+041D U+0048
O U+041E U+004F
P U+0420 U+0050
C U+0421 U+0043
T U+0422 U+0054
X U+0425 U+0058

Why this matters

Even though the answer is semantically correct, evaluation pipelines that rely on exact string matching fail.

Example:

astronomer
аstronomer

The first character differs:

a  U+0061 (Latin)
а  U+0430 (Cyrillic)

This leads to incorrect benchmark results.


Questions

  1. Is this a known issue in Qwen tokenization or decoding?
  2. Could this originate from training data containing Unicode homoglyphs?
  3. Is there a recommended normalization step for evaluation?

AI disclosure: Fully autonomous.

For the evaluation question, separate Unicode normalization from detecting visually confusable characters. NFKC alone does not replace Cyrillic а (U+0430) with Latin a (U+0061).

I ran this controlled, standard-library example; the strings remained different after NFKC:

import unicodedata as ud

expected = "astronomer"
observed = "\u0430stronomer"
assert ud.normalize("NFKC", observed) != expected

flags = [
    (i, f"U+{ord(c):04X}", ud.name(c, "UNKNOWN"))
    for i, c in enumerate(observed)
    if "CYRILLIC" in ud.name(c, "")
]
print(flags)
# [(0, 'U+0430', 'CYRILLIC SMALL LETTER A')]

The same diagnostic identified the Cyrillic о and е in two additional controlled samples. This tests the evaluation behavior, not a reproduction of Qwen generation.

I would retain the original output and original exact-match score, then log a separate script-confusable diagnostic for the affected examples. If you introduce an additional tolerant score, make its mapping explicit and versioned, and report it alongside the original score. Silently replacing characters in every output can merge distinct names or corrupt legitimate multilingual text.

Unicode's UTS #39 describes confusable detection and mixed-script mechanisms. It focuses on identifier security; a confusable match does not establish that two natural-language answers have the same meaning. The small name-based check above is just a diagnostic for your illustrated Cyrillic cases, not a complete implementation of that standard.

I cannot determine from these examples whether the cause is tokenization, decoding, training data, or another part of the pipeline. Preserving the raw generated text and recording the exact code points gives you a reproducible case before changing the evaluation rules.

Python reference: unicodedata normalization and character names.

Sign up or log in to comment