Latexify Math: Mathematical Formula Markup Revision to Assist Collaborative Editing in Math Q&A Sites

Abstract

Background: Collaborative editing questions and answers plays an important role in quality control of Mathematics StackExchange which is a math Q&A Site. Our study of post edits in Mathematics Stack Exchange shows that there is a large number of math-related edits about latexifying formulas, revising LaTeX and converting the blurred math formula screenshots to LaTeX sequence.

Method: MathLatexEdit implements a deep learning-based approach including two encoder-decoder models fort textual and visual LaTeX edit recommendation.

Conclusion: Our evaluation of MathLatexEdit not only demonstrates the accuracy of our model, but also the usefulness of MathLatexEdit in editing real-world posts which are accepted in Mathematics Stack Exchange.

Implications: Our tool makes the site easier to read for everyone. Second, this machine-readability also makes the text easier to register and index by search-engine crawlers.

Background / Aims

Collaborative editing questions and answers plays an important role in quality control of Mathematics StackExchange which is a math Q&A Site. Our study of post edits in Mathematics Stack Exchange shows that there is a large number of math-related edits about latexifying formulas, revising LaTeX and converting the blurred math formula screenshots to LaTeX sequence. Despite its importance, manually editing one math-related post especially those with complex mathematical formulas is time-consuming and error-prone even for experienced users. To assist post owners and editors to do this editing, we have developed an edit-assistance tool, MathLatexEdit for formula latexification, LaTeX revision and screenshot transcription.

Methods / What did we do?

We formulate this formula editing task as a translation problem, in which an original post is translated to a revised post. MathLatexEdit implements a deep learning-based approach including two encoder-decoder models for textual and visual LaTeX edit recommendation with math-specific inference. The two models are trained on large-scale historical original-edited post pairs and synthesized screenshot-formula pairs.

Process

Summary of findings

  • We conducted an empirical study of collaborative post editing in Mathematics Stack Exchange including the editing types and editing content, identifying the need for an edit assistance tool for mathematics formulae.
  • We developed MathLatexEdit, a deep learning-based edit assistance tool that can latexify math expression, revise LaTeX formulas, convert formula screenshots in Mathematics StackExchange to LaTeX sequence for further MathJax rendering to improve the post quality and readability.
  • We evaluated MathLatexEdit from two perspectives, including the quality of post edit recommendation based on a large-scale dataset and the usefulness to assist a novice posteditor in editing unfamiliar new posts.

Conclusions

The edit recommendations from MathLatexEdit for a selection of real-world posts were accepted by experienced users of Mathematics Stack Exchange, further showing the usefulness of our tool.  We discussed the potential benefits of our MathLatexEdit post-edit recommendation approach for post owners/editors as well as different platforms. However, deploying our approach on these sites may have complicated impacts on social process and collaborative editing, which need further study in the future.

Reference

  • Ma, S., Chen, C., Khalajzadeh, H., Grundy, J.C. Latexify Math: Mathematical Formula Markup Revision to Assist Collaborative Editing in Math Q&A Sites, 24th ACM Conference on Computer Supported Cooperative Work (CSCW2021), 23-27 October, online

Tool

Example of Latexify Math in use