1
$\begingroup$

Imagine we have some sort of "next token predictor," either with transformer architecture, LSTM, or just a HMM (though the terminology I use here will be less aligned to HMMs, I believe the question is generalizable to all generative NLP).

We reverse the cost function. That is, we are training to maximize error instead of minimizing it. In the case where error is neither maximized nor minimized, the behavior will be fairly boring. However, a model which is maximizing error may still need to learn patterns of syntax and which words usually follow one another in order to avoid them. I would expect that in some abstract way, it may behave creatively, because it is trying to produce output which is not in the training data, and is furthest away from it. In fact, it ideally should understand the user's query in order to avoid using words that follow it.

This makes me think the output may be non-boring, although probably not practically useful.

$\endgroup$

3 Answers 3

2
$\begingroup$

You cannot really invert the loss, because that's undefined most likely.

Take linear regression with OLS, then we know that the loss function is quadratic wrt the parameters (assuming to have 1 covariate only):

enter image description here

Now, if you try to maximize that function, you would quickly see that they don't have any maximum, so you would just get ginormous predictions, and no pattern would be caught/learnt

$\endgroup$
5
  • $\begingroup$ For this type of model, more variation around the regression line could be achieved amplifying the error variance $\endgroup$ Nov 20, 2023 at 16:15
  • $\begingroup$ @JaumeOliverLafont what do you mean? "we are training to maximize error instead of minimizing it." it's pretty well mathematically defined, and no matter what you do, you cannot get a better solution worsening the error (note that "Allowing for some transitions other than those observed" does not fall in the category of this definition the OP is asking) $\endgroup$
    – Alberto
    Nov 20, 2023 at 20:54
  • $\begingroup$ I mean the error e in y=wx + b + e. You estimate w and b as usual -minimizing- but then generate y for given x with larger noise, so it has larger deviation around the expected value. $\endgroup$ Nov 20, 2023 at 21:03
  • $\begingroup$ The transitions make sense in the context of HMM then OP mentions. $\endgroup$ Nov 20, 2023 at 21:04
  • $\begingroup$ @JaumeOliverLafont I might agree with you, that might seem a exploration-exploitation strategy, however HMM are trained to maximize $p(y_i|y_{j<i}, x)$, and to do so we assume that $x,y$ and the conditional are some fixed distribution... if you increase the noise, you might end up in a low density region of your space, that your model has never seen, so doesn't know how to behave $\endgroup$
    – Alberto
    Nov 20, 2023 at 21:07
1
$\begingroup$

In HMM, a simple mechanism to reduce overfitting and therefore generating variety in the system output is tweaking the transition matrix A and/or the symbol emission probability B. Allowing for some transitions other than those observed in the training data or other symbols in states where they were not actually seen before can introduce a richer behavior.

$\endgroup$
0
$\begingroup$

Going off of @Alberto's answer:

I agree that you would just get ginormous predictions, but I am not convinced no pattern would be learnt: in your example, we would learn to avoid predictions near zero: for a more complex error landscape, this might be more interesting. For example, we would not just be getting ginormous predictions, but the most ginormous predictions possible: we would not ascend the landscape randomly, we would ascend via the gradient, at the steepest possible path. With many variables, the steepest possible path may be interesting or unique.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .