|
743 | 743 | " ### neural graph learning parameters\n",
|
744 | 744 | " self.distance_type = nsl.configs.DistanceType.L2\n",
|
745 | 745 | " self.graph_regularization_multiplier = 0.1\n",
|
746 |
| - " self.num_neighbors = 1\n", |
| 746 | + " self.num_neighbors = 2\n", |
747 | 747 | " ### model architecture\n",
|
748 | 748 | " self.num_embedding_dims = 16\n",
|
749 | 749 | " self.num_lstm_dims = 64\n",
|
750 | 750 | " self.num_fc_units = 64\n",
|
751 | 751 | " ### training parameters\n",
|
752 |
| - " self.train_epochs = 4\n", |
| 752 | + " self.train_epochs = 10\n", |
753 | 753 | " self.batch_size = 128\n",
|
754 | 754 | " ### eval parameters\n",
|
755 | 755 | " self.eval_steps = None # All instances in the test set are evaluated.\n",
|
|
1459 | 1459 | "# Accuracy values for both the Bi-LSTM model and the feed forward NN model have\n",
|
1460 | 1460 | "# been precomputed for the following supervision ratios.\n",
|
1461 | 1461 | "\n",
|
1462 |
| - "supervision_ratios = [0.3, 0.15, 0.05, 0.03, 0.01]\n", |
| 1462 | + "supervision_ratios = [0.3, 0.15, 0.05, 0.03, 0.02, 0.01, 0.005]\n", |
1463 | 1463 | "\n",
|
1464 | 1464 | "model_tags = ['Bi-LSTM model', 'Feed Forward NN model']\n",
|
1465 |
| - "base_model_accs = [[85, 85, 62, 58, 50], [85, 79, 61, 53, 50]]\n", |
1466 |
| - "graph_reg_model_accs = [[85, 84, 76, 63, 51], [85, 79, 73, 62, 50]]\n", |
| 1465 | + "base_model_accs = [[84, 84, 83, 80, 65, 52, 50], [87, 86, 76, 74, 67, 52, 51]]\n", |
| 1466 | + "graph_reg_model_accs = [[84, 84, 83, 83, 65, 63, 50],\n", |
| 1467 | + " [87, 86, 80, 75, 67, 52, 50]]\n", |
1467 | 1468 | "\n",
|
1468 | 1469 | "plt.clf() # clear figure\n",
|
1469 | 1470 | "\n",
|
|
1498 | 1499 | "It can be observed that as the superivision ratio decreases, model accuracy also\n",
|
1499 | 1500 | "decreases. This is true for both the base model and for the graph-regularized\n",
|
1500 | 1501 | "model, regardless of the model architecture used. However, notice that the\n",
|
1501 |
| - "graph-regularized model is consistenly better than the base model -- sometimes\n", |
1502 |
| - "by as much as 15% -- and further, as the supervision ratio decreases, the\n", |
1503 |
| - "decrease in accuracy is much less for the graph-regularized model than the base\n", |
1504 |
| - "model. This is primarily because of semi-supervised learning for the\n", |
1505 |
| - "graph-regularized model, where structural similarity among training samples is\n", |
1506 |
| - "used in addition to the training samples themselves." |
| 1502 | + "graph-regularized model performs better than the base model for both the\n", |
| 1503 | + "architectures. In particular, for the Bi-LSTM model, when the supervision ratio\n", |
| 1504 | + "is 0.01, the accuracy of the graph-regularized model is **~20%** higher than\n", |
| 1505 | + "that of the base model. This is primarily because of semi-supervised learning\n", |
| 1506 | + "for the graph-regularized model, where structural similarity among training\n", |
| 1507 | + "samples is used in addition to the training samples themselves." |
1507 | 1508 | ]
|
1508 | 1509 | },
|
1509 | 1510 | {
|
|
0 commit comments