kaldi-asr / kaldi-asr/kaldi

GOP and LPR score

Open
#4,852 4 comments 0 reactions 0 assignees View on GitHub
bug stale
Dominant language
Shell
Stars
15.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Recently, I find 2 parts are different from the original Hu's GOP paper.

1. [LPR computation](https://github.com/kaldi-asr/kaldi/blob/71f38e62cad01c3078555bfe78d0f3a527422d75/src/bin/compute-gop.cc#LL230C1-L230C1)

```C++
// LPR(p_j|p_i)=\log p(p_j|\mathbf o; t_s, t_e)-\log p(p_i|\mathbf o; t_s, t_e)
for (int k = 0; k < phone_num; k++)
phone_level_feat(1 + phone_num + k) = lpp_part(phone_id) - lpp_part(k);
```

Per my understanding, $p_i$ should be the canonical phoneme, $LPR(p_j|p_i) = \log p(p_j|\mathbf o; t_s, t_e) - \log p(p_i|\mathbf o; t_s, t_e)$, and phoneme level feature is defined as ${[LPP(p_1),\cdots,LPP(p_M), LPR(p_1|p_i), \cdots, LPR(p_j|p_i),\cdots]}^T$. So I think the above code should be changed as:

```C++
// LPR(p_j|p_i)=\log p(p_j|\mathbf o; t_s, t_e)-\log p(p_i|\mathbf o; t_s, t_e)
for (int k = 0; k < phone_num; k++)
phone_level_feat(1 + phone_num + k) = pp_part(k) - lpp_part(phone_id);
```

2. Formulation to compute the GOP score in the document

In the document,

$$GOP(p)=\log \frac{LPP(p)}{\max_{q\in Q} LPP(q)}$$

$$LPP(p)=\log p(p|\mathbf o; t_s,t_e)$$

In Hu's paper

$$GOP(p)=\log \frac{p(p|\mathbf o; t_s,t_e)}{\max_{q\in Q} p(q|\mathbf o; t_s,t_e)}$$

Thus, I think the GOP formulation in the document should be changed to

$$GOP(p)=\frac{LPP(p)}{\max_{q\in Q} LPP(q)}$$

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/bin/compute-gop.cc at the linked LPR computation, then locate the GOP formulation in the project documentation. Compare both implementations and formulas with Hu's paper, checking the canonical-phoneme reference and logarithm relationships. Done means the documented equations and implementation consistently match the intended GOP and LPR definitions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.