この論文では、数式の画像をLaTeXマークアップシーケンスに変換するエンコーダーデコーダーアーキテクチャを備えたディープニューラルネットワークモデルを提案します。エンコーダーは、画像を特徴マップのグループに変換する畳み込みニューラルネットワーク(CNN)です。数学記号の空間的な関係をより適切にキャプチャするために、ベクトルに展開される前に、機能マップに2D位置エンコードが追加されます。デコーダーは、ソフトアテンションメカニズムと統合されたスタック型双方向Long Short-Term Memory(LSTM)モデルであり、エンコーダー出力を一連のLaTeXトークンに変換する言語モデルとして機能します。ニューラルネットワークは2つのステップでトレーニングされます。最初のステップは、目的関数として最尤推定(MLE)を使用したトークンレベルのトレーニングです。トークンレベルのトレーニングの完了時に、シーケンスレベルのトレーニング目的関数を使用して、強化学習のポリシーグラデーションアルゴリズムに基づいてモデル全体を最適化します。また、この設計では、シーケンスレベルのトレーニング中にデコーダーのフィードバックループを閉じることで、つまり、タイムステップごとにグラウンドトゥルーストークンの代わりに予測トークンを入力することで、露出バイアスの問題を克服しています。このモデルは、IM2LATEX-100Kデータセットでトレーニングおよび評価され、シーケンスベースとイメージベースの両方の評価指標で最先端のパフォーマンスを示しています。
In this paper we propose a deep neural network model with an encoder-decoder architecture that translates images of math formulas into their LaTeX markup sequences. The encoder is a convolutional neural network (CNN) that transforms images into a group of feature maps. To better capture the spatial relationships of math symbols, the feature maps are augmented with 2D positional encoding before being unfolded into a vector. The decoder is a stacked bidirectional long short-term memory (LSTM) model integrated with the soft attention mechanism, which works as a language model to translate the encoder output into a sequence of LaTeX tokens. The neural network is trained in two steps. The first step is token-level training using the Maximum-Likelihood Estimation (MLE) as the objective function. At completion of the token-level training, the sequence-level training objective function is employed to optimize the overall model based on the policy gradient algorithm from reinforcement learning. Our design also overcomes the exposure bias problem by closing the feedback loop in the decoder during sequence-level training, i.e., feeding in the predicted token instead of the ground truth token at every time step. The model is trained and evaluated on the IM2LATEX-100K dataset and shows state-of-the-art performance on both sequence-based and image-based evaluation metrics.