Here is an expanded introduction to the role and significance of the Hard tanh activation function in this context:
The key goal here is to effectively separate the foreground features from the background features. The foreground features represent the main salient objects we want to focus on, while the background features correspond to contextual or redundant information.
Initially, feature scores are obtained for each feature, and these are sorted to differentiate potential foreground features with higher scores from background features with lower scores. However, the background feature scores may still retain some irrelevant patterns or noise.
To further clean up the background features, an activation function is applied to map the values to a range that limits redundancy. Hard tanh is well-suited for this, as it is a variant of the tanh activation that truncates the output to the range [-1, 1]. This bounded range constrains the background values, suppressing noise while still retaining some basic contextual cues.
Crucially, hard tanh does not strictly bound the outputs to probabilities between 0 and 1. This is important, as the background features do not represent probabilities and we want to allow some flexibility in the range for better optimization. By mapping to [-1, 1] instead of [0, 1], hard tanh provides a wider span for the background values to be suppressed during training through the mean squared error loss.
In summary, hard tanh activation plays a key role post feature sorting to further clean up the background features by truncating the range while avoiding the strict probability constraints of standard sigmoid/tanh functions. This allows more effective separation from the main foreground features during multi-task learning.