TopicEq: A Joint Topic and Mathematical Equation Model for Scientific Texts
Table 3: Performance of different equation models, evaluated on held-out arXiv data. We report the perplexity metric (for # topics 50, 100 if topic info is used), and the syntax error rate of generated LaTeX equations (for # topics 100).
['[BOLD] Equation Model', '[BOLD] Perplexity', '[BOLD] Perplexity', '[BOLD] Error (%) ']
Next, we evaluate the equation model component of TopicEq by measuring the test set perplexity. Additionally, as the grammaticality of equations can be measured using the LaTeX compiler, we also evaluate the syntax error rate of generated equations. We compare our TE-LSTM with [topsep=1pt] a generic LSTM (no topic knowledge) LSTM + LDA: the topic vector θ obtained from a pre-trained LDA is concatenated to the output of LSTM and a recent topic-dependent LSTM applied to our task [topsep=1pt] : θ is added to the output of LSTM via a dense layer. TD-LSTM and our TE-LSTM are jointly trained with our topic model component. Moreover, our TE-LSTM outperforms TD-LSTM, suggesting that the model better incorporates topic knowledge by embedding θ inside the LSTM. ’s Mixture-of-Expert LSTM, our model achieves similar performance in this task while requiring fewer parameters and much less training time (40% reduction). In total, compared to the generic LSTM, our TE-LSTM equation model reduces test perplexity by 8% (relative) and syntax error rate by 3.5% (absolute). This result suggests that incorporating context/topic information can improve the quality and grammaticality of equation modeling.