0
$\begingroup$

This question has come up a few times, but I haven't seen a lot of good answers. I have data where I have about 1000 samples and 3 time-series data for each sample. The time-series data is extremely long though (about 300000 time points per series). There is a lot of information per individual sample and it is highly over-sampled. I want to classify each sample into a few discrete categories.

I could subsample the series and use tsfresh or something, but I was hoping to train a RNN, CNN, or dilated-CNN to get better results and learn some interesting patterns in the data relating to each category. Because of the oversampling, I had the idea to break every individual into, for example, 100 subsamples and use them as the new samples, giving me 100000 samples as input.

The issues is that any network is likely to just learn the idiosyncrasies of each individual and just tease apart the original 1000. That is, it just learns the individual patterns and not something particular to the category. I have verified this with some basic CNNs, where I can get super high accuracy on the training set, but the validation set has better than chance, but does not converge to any significant accuracy.

Any ideas on this? Perhaps a loss function that penalizes learning that the data comes from the same person? Classic regularization techniques don't do much because it ultimately doesn't focus on the correct problem.

$\endgroup$

1 Answer 1

1
$\begingroup$

Have you considered using adversarial training for this? The basic idea is that the network has an adversarial branch that tries to discriminate between samples in different domains (i.e. in your case, tries to identify which person the sample is from). The main part of the network is then trained to perform your main task while selecting features that try to prevent the adversarial branch from succeeding. The loss function minimizes the target loss while maximizing the adversarial loss. The maximization can be achieved by inserting a gradient reversal layer (which simply reverses the sign of the gradient) between the adversarial part and the feature extractor.

Ganin et al.'s Domain-Adversarial Training of Neural Networks introduces this idea for domain adaptation, while Xie et al.'s Controllable invariance through adversarial feature learning uses a similar idea to train models that are invariant to a multi-valued feature.

$\endgroup$
1
  • $\begingroup$ Yes, this seems like a good way to go and the t-SNE figures from those papers are exactly what I'm going for. I would like to be able to cluster the samples on something meaningful to the categories, not on some spurious signal within the data or individuals. Thanks, I will try some tests out on maybe some toys sets first. $\endgroup$ Mar 22, 2023 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.