# Automated leech detection

**URL:** <https://forums.ankiweb.net/t/automated-leech-detection/56887>\
**Category:** FSRS\
**Created:** [March 8, 2025, 3:28pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887 "2025-03-08T15:28:36Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forums.ankiweb.net/u/vaibhav)\
**Post date:** [April 8, 2025, 11:23am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/21 "2025-04-08T11:23:40Z")

</div>

> [@Expertium](#):
>
> The detector adds the leech flag automatically

I am saying that adding a flag is not necessary. Anki can internally convert a query like `is:leech` into something like `prop:leech-p<0.05`.

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 8, 2025, 11:24am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/22 "2025-04-08T11:24:20Z")

</div>

“Hey guys, we made a leech detector that doesn’t mark cards as leeches”

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forums.ankiweb.net/u/vaibhav)\
**Post date:** [April 8, 2025, 11:25am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/23 "2025-04-08T11:25:37Z")

</div>

You are misunderstanding. From the user’s perspective, nothing would change. I am only proposing to change what Anki does internally.

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 8, 2025, 11:26am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/24 "2025-04-08T11:26:00Z")

</div>

But you’re saying we shouldn’t use flags/tags

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forums.ankiweb.net/u/vaibhav)\
**Post date:** [April 8, 2025, 11:27am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/25 "2025-04-08T11:27:25Z")

</div>

Yes, but how does a user know if a card has a flag or tag? They don’t open up the database file in a SQL viewer. They see what the UI tells them. The UI can read the p value from the data column.

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 8, 2025, 11:33am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/26 "2025-04-08T11:33:51Z")

</div>

So the UI would display a pop-up based on the p-value stored in card info, and when searching `prop:is_leech`, Anki would convert it to `prop:p<0.01`, correct?

Actually, no, that still won’t work. In order to reduce the amount of time the leech status changes, in my specification of the detector I wrote that we should use two thresholds. If p\<threshhold\_1, card’s status is changed to “leech”. if p\>threshold\_2, card’s status is changed to “not a leech”. The second threshold can be 15% or 20% or something like that. Otherwise, some cards can jump around a lot. This means that we need to keep track of how p changes after every review.  
For example, if the first threshold is 5% and the second one is 25%, and p(normal) is 10%, whether it’s a leech or not depends on whether it has crossed the first threshold before or not. If it has crossed it before, it’s a leech, otherwise it’s not a leech.  
As an alternative solution, we could use one threshold but update the leech status once every 3 reviews. But that is also incompatible with your method of not using a tag/flag, since it requires keeping track of how many reviews ago the leech status changed.

---

<div class="post-metadata">

**Author:** ![jakep](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jakep](https://forums.ankiweb.net/u/jakep)\
**Post date:** [April 8, 2025, 5:40pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/27 "2025-04-08T17:40:51Z")

</div>

> [@Expertium](#):
>
> Otherwise, some cards can jump around a lot.

why is this a problem?

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 8, 2025, 6:02pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/28 "2025-04-08T18:02:18Z")

</div>

If a user sees that a card has been going “leech” → “not a leech” → “leech” → “not a leech”, he will think that the detector is bugged or not working very well.

And also it can be just plain annoying.

---

<div class="post-metadata">

**Author:** ![jakep](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jakep](https://forums.ankiweb.net/u/jakep)\
**Post date:** [April 8, 2025, 6:24pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/29 "2025-04-08T18:24:29Z")

</div>

Are there actual cases where normal anki usage would lead to it continually bouncing between leech and not-leech?

also I figured leeches would have notifications, but unleeching would happen silently.

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 8, 2025, 6:29pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/30 "2025-04-08T18:29:41Z")

</div>

I was thinking of having a pop-up for both leeching and unleeching.  
As for bouncing: [Discord](https://discord.com/channels/368267295601983490/1282005522513530952/1359144902306566234)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/2/b/2badccc1e819f309eff87f792be84959fb55b3ee.png)

Btw, based on this chart, I’d say the idea of having two thresholds seems reasonable.

---

<div class="post-metadata">

**Author:** ![vaibhav](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@vaibhav](https://forums.ankiweb.net/u/vaibhav)\
**Post date:** [April 12, 2025, 2:54pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/31 "2025-04-12T14:54:35Z")

</div>

By the way, is this really a leech detector? In this method, we are just looking for cards where FSRS’ predictions are off. But, even if FSRS is predicting R accurately for a card, the card can still be a leech if it requires a very large number of reviews.

Consider a card whose S grows extremely slowly. The p value won’t be low because FSRS is correctly predicting the R, but this card sucks up a lot of time that can be better spent elsewhere. So, this card is a leech even if this automated detector won’t detect it.

Example card:  
I have done 68 reviews but the card still has a stability of just 30 days (and the last lapse was in November).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/f/2/f2d27421a6c3c5b60dfecfb556465f1b35876b11.png)  
The p-value for this card is 0.21 (calculated using [GitHub - rbrownwsws/leechkit](https://github.com/rbrownwsws/leechkit) with default values of --skip-reviews and --max-reviews)

Example 2:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/c/2/c2bea7f0d041b69dfc66cd1de1a643f378c1640b.png)  
p-value = 0.29

Example 3:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/f/a/fa63362dc86577317e0e0e6f5516119f7e8c8b02.png)  
p-value = 0.43

Example 4:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/2/6/26205554c47498626d6f348e71672daa3a9837f2.png)  
p-value = 0.43

Example 5:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/d/5/d58de00a02468cc3b2a4be401ff3f3463a367d30.png)  
p-value = 0.44

As a counter-example, here is an anti-leech:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/3/8/38ba4a40a8158f0401d2cd1efc2e279a0805133f.png)

That being said, this method can be useful to improve FSRS by identifying the type of cards that FSRS struggles with.

---

<div class="post-metadata">

**Author:** ![Expertium](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/expertium/32/24176_2.png) [@Expertium](https://forums.ankiweb.net/u/Expertium)\
**Post date:** [April 12, 2025, 3:16pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/32 "2025-04-12T15:16:12Z")

</div>

Yes, “leech” here means “a card for which FSRS is **over** estimating p(recall)”. It’s possible that FSRS predicts p(recall) accurately, so it’s not a leech in that sense, but the card feels “leechy” subjectively.  
That being said, I’m sure if you choose a threshold like 1%, 2% or 5%, the cards that fall below this threshold will most likely feel “leechy”.  
We really need a proper implementation in Anki or in an add-on to collect feedback.

---

<div class="post-metadata">

**Author:** ![Hey\_Mo](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Hey\_Mo](https://forums.ankiweb.net/u/Hey_Mo)\
**Post date:** [April 29, 2025, 9:12am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/33 "2025-04-29T09:12:57Z")

</div>

I am sorry for bothering you. I don’t understand most of it.

But when that smart leech detector would appear in Anki? At least approximately?

And how it will improve FSRS? Like how significant it would be for a user on a daily basis? Will it be noticeable or nothing will be changed for a user?

---

<div class="post-metadata">

**Author:** ![sorata](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/sorata/32/34115_2.png) [@sorata](https://forums.ankiweb.net/u/sorata)\
**Post date:** [April 29, 2025, 9:21am UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/34 "2025-04-29T09:21:14Z")

</div>

> [@Hey\_Mo](#):
>
> But when that smart leech detector would appear in Anki? At least approximately?

I don’t think anyone is working on this _actively_. And any approximation of when it’s happening is meaningless IMO. It seemed easy until it wasn’t until it was then again until it wasn’t.

> [@Hey\_Mo](#):
>
> And how it will improve FSRS? Like how significant it would be for a user on a daily basis?

It won’t improve FSRS but it’ll hopefully detect time-consuming cards better which you can suspend or edit or come up with mnemonics for. FYI, leech detection is referring to how Anki defines and tags cards as leech. Currently, we just look at again ratings which isn’t very good.

---

<div class="post-metadata">

**Author:** ![John1](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@John1](https://forums.ankiweb.net/u/John1)\
**Post date:** [May 19, 2025, 3:24pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/35 "2025-05-19T15:24:01Z")

</div>

I understand this is no longer actively being worked on. I just wanted to add my voice as an end user to say this would be a greatly appreciated feature - I love the idea of identifying leeches earlier to either suspend or fix those cards.

---

<div class="post-metadata">

**Author:** ![DerIshmaelite](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/derishmaelite/32/17983_2.png) [@DerIshmaelite](https://forums.ankiweb.net/u/DerIshmaelite)\
**Post date:** [May 19, 2025, 3:28pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/36 "2025-05-19T15:28:28Z")

</div>

I second this

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [June 18, 2025, 3:28pm UTC](https://forums.ankiweb.net/t/automated-leech-detection/56887/37 "2025-06-18T15:28:50Z")

</div>

Closed on June 18, 2025, 3:28pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

[Previous page](https://forums.ankiweb.net/t/automated-leech-detection/56887.md?page=1)
