geek-ai/irgan

Question-Answer/irgan.py sample problem

wangshu900723 opened this issue · 2 comments

Hi~
In Question-Answer/irgan.py line 243, is there should be "sampled_index.remove(_index)" ? Or the generator.input_x_3 will sample both pos and neg, which will generate wrong neg samples for the discriminator.

Thanks for your attention!
In my opinion, the possible reason may be that it seems too weak if G uses full-negative items/documents to get feedback from Discriminator. Negative documents/items/answers usually get a low score from a well-trained discriminator. After a softmax layer, these scores may approximate to a uniform distribution, thus can not effectively guide the generator. Therefore, we try to use both positive items/documents and negative documents/items/answers in ##the training phrase of Generator##.
If you have seen other codes in Item Recommendation and L2R, it seems different with this setting in QA. When Generator wants to get some feedback from Discriminator, the released version of Item Recommendation and point-wise L2R used a important sample strategy, which gives more sampling weights to the positive items/documents.
While in ##the training phrase of Discriminator##, QA task only uses the negative items/documents through directly removing the positive documents/items/answers in the sampling pool (in line 97 of irgan.py). Compared to the other two task, the QA task has less positive documents/answers, I directly remove/append the positive documents/answers.
benyou

THX for your nice explanation!