Text summarisation project

Leo2: <p>Hi<br>
I’m doing my first project in pytorch as an undergraduate at university, namely abstractive text summarisation on the Gigaword dataset. I’ve got a single layer bidirectional encoder and a decoder as my base model which i’m training from scratch and I’ve also tried to add some attention mechanism and implement some kind of pointer ability to copy words directly/extractively from the input some of the time. I’m using teacher forcing too. And my embeddings are pretrained glove 300 dim.</p>
<p>I am using 1 million samples from the 3.5 million dataset and i’m really just looking for some help and advice as to what results i should expect to see and how to make it better.</p>
<p>The model is about 7/15 epochs into training at the moment and each epoch takes approximately 12 hours using colab pro + GPU’s. Is that to be expected for this kind of task? It seems kind of long to me.</p>
<p>as for results in training, i’m using cross entropy loss function with default learning rate. After about 2 epochs the loss went quickly from 11 to 4.5, and then has taken the other 5 epochs to get it below 4. It seems stuck there now. Again, is that something which is common, or should it be converging to zero faster?</p>
<p>I have greedy and beam search options for picking the decoded sentence. However in the screenshots below i’ve only included the greedy output which takes the highest probability in the distribution at each timestep.</p>
<p>I have some good results such as…<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/e/6e414da24c87d2c57ade904d5a7e9136bc14a394.png" data-download-href="https://discuss.pytorch.org/uploads/default/6e414da24c87d2c57ade904d5a7e9136bc14a394" title="ttt"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e414da24c87d2c57ade904d5a7e9136bc14a394_2_690x132.png" alt="ttt" data-base62-sha1="fJmqRJAfBYgNEBJ8GXvNcGmTFBi" width="690" height="132" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e414da24c87d2c57ade904d5a7e9136bc14a394_2_690x132.png, https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e414da24c87d2c57ade904d5a7e9136bc14a394_2_1035x198.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e414da24c87d2c57ade904d5a7e9136bc14a394_2_1380x264.png 2x" data-dominant-color="F7F7F7"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ttt</span><span class="informations">1889×363 30.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Some reasonably good …<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/8/78c0eb08c917b787b4397fe4a3e39903a9db1347.png" data-download-href="https://discuss.pytorch.org/uploads/default/78c0eb08c917b787b4397fe4a3e39903a9db1347" title="yesd"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78c0eb08c917b787b4397fe4a3e39903a9db1347_2_690x129.png" alt="yesd" data-base62-sha1="heeCxmBZhizcOs58OaaY9HUiCsn" width="690" height="129" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78c0eb08c917b787b4397fe4a3e39903a9db1347_2_690x129.png, https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78c0eb08c917b787b4397fe4a3e39903a9db1347_2_1035x193.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78c0eb08c917b787b4397fe4a3e39903a9db1347_2_1380x258.png 2x" data-dominant-color="F6F6F6"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">yesd</span><span class="informations">1930×363 29.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>and some badish…<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/8/4/84cfd047dd489c0cec03bcd9c3245586634416bb.png" data-download-href="https://discuss.pytorch.org/uploads/default/84cfd047dd489c0cec03bcd9c3245586634416bb" title="bad"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/8/4/84cfd047dd489c0cec03bcd9c3245586634416bb_2_690x129.png" alt="bad" data-base62-sha1="iWUgppOO7eBAmMxLso3cB7UYnXl" width="690" height="129" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/8/4/84cfd047dd489c0cec03bcd9c3245586634416bb_2_690x129.png, https://discuss.pytorch.org/uploads/default/optimized/3X/8/4/84cfd047dd489c0cec03bcd9c3245586634416bb_2_1035x193.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/8/4/84cfd047dd489c0cec03bcd9c3245586634416bb.png 2x" data-dominant-color="F9F9F9"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">bad</span><span class="informations">1105×207 11.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p><strong>Other Questions:</strong></p>
<ul>
<li>
<p>i’ve told the loss function to ignore the padding token. So would that explain the fact that it seemingly pads with ‘eos’ instead?</p>
</li>
<li>
<p>Since i’m doing batches of size 32, the decoder keeps outputting to the length of the LARGEST summary in the batch. Does this have a performance/quality implications?</p>
</li>
<li>
<p>Would you consider gradient clipping for a task like this? if so, what kind?</p>
</li>
<li>
<p>Any other hyperparameters worth playing with?</p>
</li>
<li>
<p>Would you expect better performance using the entire 3.5 million samples and lesser epochs?</p>
</li>
</ul>
<p>If you would like me to post any of my code, I would be glad to. I just didn’t want to make a long post even longer.</p>