claudiashi57 / dragonnet

248 stars 53 forks source link

Code does not match with description in paper #2

Closed negar-hassanpour closed 4 years ago

negar-hassanpour commented 4 years ago

Thank you for sharing your code-base publicly. The idea presented in the paper is interesting. There are, however, several disparities between this code-base and the paper; these include:

  1. Not only make_tarnet and make_dragonnet share the same code, but also the same objective function is used to learn the parameters of TARnet and DRAGONnet. Therefore, the results must be the same.

  2. It is mentioned in the paper that:

    To find the relevant parts of X, first, train a deep net to predict T. Then remove the final (predictive) layer. Finally, use the activation of the remaining net as features for predicting the outcome.

However, the code is implemented such that both outcome loss and cross entropy loss are optimized in the same objective function.

vveitch commented 4 years ago

Thanks for your interest!

  1. The difference in code between dragonnet and tarnet is the line t_predictions = .... In dragonnet, the input is the shared representation layer In tarnet, the input is the input to the function (i.e., the data). This line is just computing logistic regression for convenience (e.g., so we can compute the tmle for the baselines)

  2. The two stage version of the training is 'nednet', described in the paper. Dragonnet trains end-to-end as in the code.

negar-hassanpour commented 4 years ago

Thank you for your prompt response! This explains all my concerns!

Thanks, awesome work!

vveitch commented 4 years ago

Great, glad it got sorted :)