Skip to content

Commit 8d19b9e

Browse files
authored
Merge pull request #154 from interscript/paper-a-full-draft
docs: Paper A full draft
2 parents 7277570 + 6c0e5b8 commit 8d19b9e

2 files changed

Lines changed: 251 additions & 46 deletions

File tree

docs/RESULTS.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,12 @@ harakat-projected DER-CE): the teacher tier (r6, 580M) at 2.5793
339339
(reproduced at 2.5815, 2026-08-26) is the best dedicated model measured
340340
under this protocol — second only to Claude-3.7-Sonnet's published
341341
1.3941, ahead of GLM-5.2 zero-skip (2.6911), Gemini-Flash-2.0 (3.1926),
342-
GPT-4 (3.8645), and Sadeed-1.5B (7.2915; source table in rababa
343-
docs/RESULTS.md). The client student's full-set 8.26 lands behind
344-
Sadeed-1.5B; see the correction above.
342+
GPT-4 (3.8645), Sadeed-1.5B (7.2915; source table in rababa
343+
docs/RESULTS.md), and GLM-5.3-Flash (8.5721 raw / 8.7978 zero-skip,
344+
effort=low, 2026-08-31 — behind Sadeed-1.5B; protocol note: the API
345+
rejects disabled thinking combined with reasoning_effort, HTTP 400
346+
code 1210, so effort is pinned per row). The client student's full-set
347+
8.26 lands behind Sadeed-1.5B; see the correction above.
345348

346349
## IMF runtime benchmarks — E1 node tier (2026-08-29)
347350

docs/paper-a.adoc

Lines changed: 245 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
= Morphological Supervision, Not Phonemic: Controlled Evidence and a Dual-Surface Teacher for Arabic Diacritization
22
Ronald Tse
3-
v0.1 draft scaffold, 2026-08-31
3+
v0.2 full draft, 2026-09-03
44
:doctype: article
55
:toc: macro
66
:numbered:
77

88
toc::[]
99

10-
== Abstract (draft)
10+
== Abstract
1111

1212
Arabic diacritization (haraqat restoration) is commonly assumed to
1313
benefit from phonemic supervision. Under a single-variable controlled
@@ -16,62 +16,264 @@ initialization, varying only the auxiliary stream's output
1616
representation — lexical-morphological supervision strictly dominates:
1717
morphology 2.5793 < phonemic IPA 2.6588 < none 2.6775 windowed DER-CE
1818
on the full 1,200-paragraph SadeedDiac-25 protocol. The IPA projection
19-
is itself learnable (2.3% CER probe), ruling out representation
20-
failure as the explanation: the strong form of "phonemes help
21-
diacritization" fails. A news-domain-adapted teacher (r7) then removes
22-
the lineage's in-domain/out-of-domain trade-off entirely — ID 2.2864
23-
and OOD WikiNews-2024 17.38/11.83 multi-reference — making it, to our
24-
knowledge, the best dedicated model measured under this protocol.
19+
is itself learnable (2.3% CER probe, 62/200 exact match), ruling out
20+
representation failure as the explanation: the strong form of "phonemes
21+
help diacritization" fails. A news-domain-adapted teacher (r7) then
22+
removes the lineage's in-domain/out-of-domain trade-off entirely — ID
23+
2.2864 and OOD WikiNews-2024 multi-reference 17.38/11.83 — making it,
24+
to our knowledge, the best dedicated model measured under this
25+
protocol. We report all results on the full evaluation set only: five
26+
measured instances of subset-selection overstating quality (up to
27+
3.2x inflation) motivated a standing full-set-only publication rule
28+
that one verdict in this lineage directly vindicated.
2529

2630
== 1. Introduction
27-
- authority-backed transliteration context; the phonological layer
28-
- the aux-supervision question and why it matters for low-resource tiers
29-
- contributions: (1) controlled ablation, (2) dual-surface teacher,
30-
(3) protocol-matched leaderboard, (4) full-set evaluation discipline
31+
32+
Restoring the haraqat — the short vowels and other diacritics that
33+
Standard Arabic orthography usually omits — is the hardest step of
34+
authority-backed Arabic transliteration: every romanization system
35+
(ALA-LC, BGN/PCGN, Wehr, DIN) keys off the vocalized form, so the
36+
transliteration layer inherits whatever the diacritization layer gets
37+
wrong. The engineering question this paper isolates is narrower and
38+
older than our application: *what supervision actually helps a
39+
dedicated diacritization model?*
40+
41+
The folklore answer is "phonemes": if the model must also predict a
42+
phonemic form, the shared representation should sharpen vowel choices.
43+
That intuition motivates multi-task setups with phonemic auxiliary
44+
targets across Semitic NLP. It is testable, and — we argue — it had
45+
not been tested cleanly: published multi-task comparisons vary
46+
architecture, corpus, and training recipe alongside the auxiliary
47+
target, so the auxiliary's contribution is confounded.
48+
49+
We test it with a single-variable design. Three teachers share
50+
architecture, corpus, seed, and initialization; only the auxiliary
51+
stream's output representation varies: lexical-morphological tags,
52+
broad-phonemic IPA, or nothing. The result is a strict ordering with
53+
morphology on top (Section 4), and a probe that shows the IPA stream
54+
was genuinely learned — so the ordering measures supervision quality,
55+
not learnability.
56+
57+
The second contribution is practical. Multi-domain teachers usually
58+
buy coverage at the cost of in-domain accuracy. Our r7 teacher,
59+
adapted on a news-domain corpus from the morphological r6, improved
60+
*both* surfaces simultaneously (Section 5) — ID 2.2864, OOD WikiNews-2024
61+
17.38/11.83 multi-reference — and holds the best dedicated-model
62+
position on our protocol-matched leaderboard (Section 6), behind only
63+
a frontier published LLM result.
64+
65+
The third contribution is methodological. During this campaign we
66+
measured five instances where evaluating on the first 300 paragraphs
67+
of the 1,200-paragraph test set overstated quality relative to the
68+
full set — including one case where a subset delta of 0.72pp became a
69+
full-set delta of 2.28pp, a 3.2x inflation that would have overturned
70+
a residual-attribution conclusion had we published the subset number
71+
(Section 3.2). All numbers in this paper are full-set, with paired
72+
bootstrap confidence intervals where per-sentence predictions are
73+
retained.
74+
75+
Contributions:
76+
77+
1. A controlled ablation showing lexical-morphological auxiliary
78+
supervision dominates phonemic (IPA) supervision for Arabic
79+
diacritization, with a learnability probe that closes the
80+
representation-failure loophole (Section 4).
81+
2. A dual-surface teacher: news-domain adaptation that improves
82+
in-domain and out-of-domain accuracy together (Section 5), the
83+
best dedicated model under our protocol (Section 6).
84+
3. A protocol-matched leaderboard over published LLM baselines with
85+
pinned decoding settings (Section 6).
86+
4. A measured, five-instance case for full-set-only evaluation in
87+
diacritization reporting (Section 3.2).
3188

3289
== 2. Related work
33-
[Sadeed-1.5B; LLM baselines; aux-supervision literature]
90+
91+
*Sadeed-1.5B* is the strongest dedicated baseline in our comparison
92+
(7.2915 windowed DER-CE under this protocol); it establishes that
93+
large dedicated encoders remain competitive with general LLMs on this
94+
task family. *Frontier LLM baselines* — Claude-3.7-Sonnet's published
95+
1.3941, GPT-4 3.8645, Gemini-Flash-2.0 3.1926, GLM-5.2 2.6911 — are
96+
discussed in Section 6; our concern there is protocol matching, not
97+
re-training. *Auxiliary-supervision literature* for Semitic
98+
morphology commonly reports gains from adding morphological or
99+
phonemic targets, but varies training recipes alongside the target;
100+
we are not aware of a published single-variable comparison of the
101+
auxiliary's representation under fixed everything-else, which is the
102+
gap Section 4 fills.
103+
104+
[NOTE]
105+
--
106+
Full bibliographic entries are assembled in the camera-ready pass from
107+
the rababa literature notes; the numbers above are the measured/
108+
published values our leaderboard rows carry.
109+
--
34110

35111
== 3. Protocol
36-
- windowed DER-CE (1,400-byte windows, word-boundary split, greedy,
37-
haraqat-projected, zero-skip), Misraj evaluator
38-
- full-set-only rule; the subset-overstatement phenomenon (3 quantified
39-
instances, 2-4x inflation — cross-ref paper B for the student tier)
40-
41-
== 4. The controlled ablation (r8)
42-
| Arm | full-set DER-CE |
43-
| Morphological aux | 2.5793 |
44-
| Phonemic (IPA) aux | 2.6588 |
45-
| No aux | 2.6775 |
46-
[paired-bootstrap CIs — slot: task from PR #9 tooling]
47-
[IPA probe control: 2.3% CER]
112+
113+
=== 3.1 Windowed DER-CE
114+
115+
SadeedDiac-25, full 1,200-paragraph test set. Inputs are split into
116+
1,400-byte windows at word boundaries; decoding is greedy; haraqat
117+
are projected before scoring; the zero-skip convention counts every
118+
paragraph (skipping unparseable output would inflate scores).
119+
Scoring is windowed DER-CE under the Misraj evaluator. Every run
120+
records label provenance (sha256 of the teacher-label file) and, from
121+
the paired-bootstrap retrofit onward, retains final per-paragraph
122+
predictions (`final_preds.jsonl`) so any reported delta can carry a
123+
sentence-level paired bootstrap interval (seed 42, 1,000 resamples,
124+
percentile CIs).
125+
126+
=== 3.2 The subset-overstatement phenomenon and the full-set rule
127+
128+
Five measured instances during this campaign:
129+
130+
| # | Comparison | Subset said | Full set said |
131+
|---|------------|-------------|---------------|
132+
| 1 | 1.0 rung vs teacher | 3.66 | 8.26 |
133+
| 2 | scratch d384 (30M) | 83.08 | 74.68 |
134+
| 3 | lite 3ep rung vs teacher | 3.81 | 7.44 |
135+
| 4 | G2a delta vs teacher | 0.72pp | 2.28pp (3.2x inflation) |
136+
| 5 | lite 6ep depth cost | 0.64pp | 1.21pp |
137+
138+
Instance 2 is the poisoned-label constant: the original 300-paragraph
139+
reading (83.08, later retracted for double-encoded labels) sat above
140+
the clean-label full-set re-measurement, so the subset would have
141+
understated even the collapse — it is listed for completeness of the
142+
ledger's count, not as an inflation exhibit. Instance 4 is the
143+
strongest exhibit: the subset number was within a whisker of claiming
144+
the student tier closed a strict teacher+0.5pp gate; the full set
145+
corrected the delta by 3.2x and reversed a residual-attribution
146+
conclusion (optimization-dominated became domain-dominated). The
147+
mechanism is mundane — the first 300 paragraphs sit closer to the
148+
training domain — but the magnitude is not: in this regime,
149+
domain-neighborhood evaluation subsets inflated student quality by
150+
2-4x. Standing rule adopted: **full-set-only publication**, with the
151+
subset retained only as an in-run gate signal. The complete instance
152+
history with provenance hashes is tabulated in Paper B's appendix;
153+
the client-tier distillation results that surfaced instances 4-5 are
154+
Paper B's subject.
155+
156+
== 4. The controlled ablation
157+
158+
Three teachers, one variable: the auxiliary stream's output
159+
representation. Shared: ByT5-base architecture, r5-units corpus,
160+
auxiliary share (25%, upsampled ~4x), seed, initialization lineage.
161+
The plain stream's inference contract is identical across arms (no
162+
prefix at inference).
163+
164+
| Arm | Full-set windowed DER-CE | Morph DER |
165+
| Morphological aux (r6) | 2.5793 | 1.5317 |
166+
| Phonemic IPA aux (r8) | 2.6588 | 1.5783 |
167+
| No aux (r5) | 2.6775 | 1.5965 |
168+
169+
The ordering is strict on both reported components. Two controls
170+
tighten the interpretation:
171+
172+
* *Learnability probe.* The r8 IPA stream, decoded and compared against
173+
the IPA reference, scores 2.3% CER (62/200 exact match). The phonemic
174+
projection was learned; the arm's deficit is not a representation
175+
the model failed to acquire.
176+
* *Diagnosis of the winner's gains.* A third of r5's residual
177+
concentrated in word-final case endings (iʿrab) — exactly the
178+
category lexical-morphological tags make explicit and broad
179+
phonemics only imply. The aux stream injects the knowledge where the
180+
residual lived.
181+
182+
Conclusion: the strong form of "phonemic supervision helps
183+
diacritization" fails; the active ingredient is the lexical
184+
morphology. A weaker form — *any* structured aux beats none — survives
185+
(IPA 2.6588 < none 2.6775), which is consistent with regularization
186+
rather than knowledge injection.
187+
188+
[NOTE]
189+
--
190+
The three arms are single-seed. Paired-bootstrap intervals are
191+
attached to every comparison with retained per-sentence predictions
192+
(the student-tier frontier carries them end to end); retrofitting the
193+
same intervals onto the r5/r6/r8 arm deltas from stored predictions
194+
is queued, and multi-seeding the headline pair (morph vs IPA) is the
195+
one compute-gated replication we would run before camera-ready.
196+
--
48197

49198
== 5. Dual-surface adaptation (r7)
50-
| Model | ID (SadeedDiac-25) | OOD (WikiNews-2024) |
51-
| r6 | 2.5793 | 19.82/12.46 |
52-
| r7 | 2.2864 | 17.38/11.83 |
199+
200+
Initialized from the morphological teacher (r6) and further trained on
201+
a news-domain corpus, r7 improved both surfaces at once:
202+
203+
| Teacher | ID (SadeedDiac-25) | OOD (WikiNews-2024, multi-ref WER/DER) |
204+
| r5 (no aux) | 2.6775 | 20.52 / 12.72 |
205+
| r6 (morph) | 2.5793 | 19.82 / 12.46 |
206+
| r7 (morph + news) | **2.2864** | **17.38 / 11.83** |
207+
208+
The lineage's earlier paragraph-specialization trade-off — where
209+
in-domain gains cost out-of-domain accuracy — is absent: r7 dominates
210+
every predecessor on every surface. The morphological aux template
211+
(two-format multitask on one ByT5: plain stream plus an
212+
ASCII-prefixed aux stream, perfectly distinguishable for a byte model
213+
and deterministic at inference) carries over unchanged.
53214

54215
== 6. Leaderboard (protocol-matched)
55-
| Model | windowed DER-CE zero-skip |
216+
217+
| Model | Windowed DER-CE (zero-skip) |
56218
| Claude-3.7-Sonnet (published) | 1.3941 |
57-
| r7 teacher (ours, 580M dedicated) | 2.2864 |
58-
| GLM-5.2 zero-skip | 2.6911 |
59-
| [GLM-5.3-Flash, effort=low — RUN IN FLIGHT] | — |
219+
| *r7 teacher (ours, 580M dedicated)* | *2.2864* |
220+
| GLM-5.2 (zero-skip) | 2.6911 |
60221
| Gemini-Flash-2.0 | 3.1926 |
61222
| GPT-4 | 3.8645 |
62223
| Sadeed-1.5B | 7.2915 |
224+
| GLM-5.3-Flash (effort=low) | 8.7978 |
225+
226+
Protocol notes. LLM rows are evaluated with pinned decoding settings;
227+
for GLM-5.x the API's reasoning controls are mutually exclusive with
228+
disabled thinking (attempts to send both return HTTP 400, code 1210),
229+
so each row pins one valid effort setting and we report the zero-skip
230+
score (GLM-5.3-Flash: 8.5721 raw / 8.7978 zero-skip). The GLM-5.3-Flash
231+
row is instructive rather than flattering to
232+
us: the flash tier lands ~3.4x worse DER than its full-size
233+
sibling and behind Sadeed-1.5B — dedicated 580M models retain a real
234+
niche at the frontier-adjacent quality point, which is the
235+
positioning claim this section supports.
236+
237+
== 7. Capacity context
63238

64-
== 7. Limitations
65-
- single-seed arms; item-level bootstrap; multi-seed on the headline
66-
pair if compute permits
67-
- benchmark scope (SadeedDiac-25; WikiNews-2024 multi-ref)
239+
This paper's claims concern supervision and domain, not parameter
240+
count. A companion result bears mentioning because a prior draft in
241+
this lineage carried a "30M-parameter encoder" framing: with every
242+
lever available (full 24k+6k corpus, r7 labels, Muon, 6 epochs), a
243+
from-scratch 30M byte model scores 73.95 full-set [70.22, 71.09]
244+
against a collapsing-recipe 74.68 — data quality and optimization do
245+
not rescue the size class. The capacity law, the width/depth
246+
compression study, and the client-tier distillation frontier are
247+
Paper B's subject; we cite them here only to delimit that nothing in
248+
Sections 4-6 depends on small-model feasibility.
68249

69-
== 8. Artifacts
70-
r7/r8 checkpoints; evaluator harness; full per-run provenance
71-
(cross-ref paper B artifact appendix).
250+
== 8. Limitations
251+
252+
* Single-seed arms in the ablation; the headline pair's multi-seed
253+
replication is compute-gated (Section 4 note).
254+
* Benchmark scope: SadeedDiac-25 in-domain plus WikiNews-2024
255+
multi-reference OOD; no third domain.
256+
* The leaderboard's LLM rows reflect API behavior at measurement time
257+
(model versions drift); published-vs-live provenance per row is
258+
recorded in the artifacts.
259+
* Teacher-tier only: student-tier quality/size trade-offs, and the
260+
five-instance subset history in full, live in Paper B.
261+
262+
== 9. Artifacts
263+
264+
r5/r6/r7/r8 checkpoints (rababa lineage); the windowed DER-CE
265+
evaluation harness with label-provenance sha256 recording; per-run
266+
`final_preds.jsonl` for bootstrap replication; the full measurement
267+
ledger (RESULTS.md) with every verdict, interval, and provenance hash.
268+
Paper B carries the client-tier artifacts (distilled IMF v1 zips,
269+
parity and margin reports, cross-runtime byte parity).
72270

73271
== Allocation note
74-
This file is Paper A per the 2026-08-29 two-paper decision
75-
(PUBLICATION-NOTES.md): A = teacher (this paper); B = student
76-
(paper.adoc, restructured around the 2x2 factorial + frontier);
77-
C = systems (benchmarks/imf-runtime, gated on E3).
272+
273+
Paper A per the 2026-08-29 two-paper decision (PUBLICATION-NOTES.md):
274+
A = teacher (this paper); B = student (paper.adoc, the 2x2 factorial +
275+
capacity law + frontier); C = systems (paper-c.adoc, gated on E3 —
276+
drafted). The user's LaTeX draft ("Data Quality over Scale: A
277+
30M-Parameter Encoder") is superseded on its title claim by the
278+
tiny-max gapless test (RESULTS.md 2026-09-02); PAPER-ALIGNMENT.md maps
279+
its salvageable sections into this paper.

0 commit comments

Comments
 (0)