It is a simple problem and in literature it was named "label bias".
Let's say you maximize performance of a single piece of pipeline (training on a dataset or something else), and you do it the same way for all pieces. The labels that were correct as inputs in training are your limitation. Why? Because when a mistake happens, you've never learned to recover from it, because you always gave the correct labels in your training.
What LLM pipelines do is probably something like this:
* a complex task is solved by a pipeline of prompts
* we tweak a single prompt
* we observe the output at the end of the whole pipeline and determine if the tweak was right
In this way, the joint loss of the pipeline is observed and that is ok.
But, the moment your pipeline is:
POS Tagger -> Dependency Tree Parser -> Named Entity Recognition -> ... -> Machine Translation
and you have separate training sets that maximize performance of each particular piece, you are introducing label bias and are relying on some luck to recover from errors early in the pipeline because during training, the later parts never got errors as input and recovered to the correct output.
You probably know this but you definitely don't have to run into that problem. In practice most people who use one component to produce features for another will take care to ensure errors are present in the pipeline. So the conceptually simple (but operationally annoying) way to do this is to train your POS tagger or whatever on multiple folds, and predict the missing fold. This is known as "jack-knife training" in the literature.
In spaCy what we do is just train the components in sequence. So everything is trained at the same time, and in the early iterations the model is seeing samples with errors. I've always found this to be good enough.
Comments
It is a simple problem and in literature it was named "label bias".
Let's say you maximize performance of a single piece of pipeline (training on a dataset or something else), and you do it the same way for all pieces. The labels that were correct as inputs in training are your limitation. Why? Because when a mistake happens, you've never learned to recover from it, because you always gave the correct labels in your training.
What LLM pipelines do is probably something like this:
* a complex task is solved by a pipeline of prompts
* we tweak a single prompt
* we observe the output at the end of the whole pipeline and determine if the tweak was right
In this way, the joint loss of the pipeline is observed and that is ok.
But, the moment your pipeline is: POS Tagger -> Dependency Tree Parser -> Named Entity Recognition -> ... -> Machine Translation
and you have separate training sets that maximize performance of each particular piece, you are introducing label bias and are relying on some luck to recover from errors early in the pipeline because during training, the later parts never got errors as input and recovered to the correct output.
You probably know this but you definitely don't have to run into that problem. In practice most people who use one component to produce features for another will take care to ensure errors are present in the pipeline. So the conceptually simple (but operationally annoying) way to do this is to train your POS tagger or whatever on multiple folds, and predict the missing fold. This is known as "jack-knife training" in the literature.
In spaCy what we do is just train the components in sequence. So everything is trained at the same time, and in the early iterations the model is seeing samples with errors. I've always found this to be good enough.
Yes, I’ve been following spaCy since 2015 and you’ve all been doing great work and made NLP approachable and fast.
Thanks for chiming in.