LithoFormer: A Robust Framework for Stratigraphic Inference via Transformers
This work addresses the limitations of conventional sliding-window approaches in capturing the global geological context of well-log data, which often leads to misaligned stratigraphic boundaries and violations of geological sequence. To overcome this, we propose LithoFormer—the first application of a full-sequence Seq2Seq Transformer architecture to stratigraphic inference. Our model integrates a channel-agnostic PatchTST backbone, rotary position embeddings (RoPE), and a decoupled multi-task head to jointly predict lithological zones and boundary probabilities. Furthermore, we incorporate geological prior constraints into the loss function to enforce stratigraphic consistency. Evaluated on three real-world datasets, LithoFormer reduces the median boundary error by 90%, entirely eliminates sequence violations, and cuts expert annotation effort by 80%, thereby substantially enhancing the reliability and scalability of large-scale subsurface modeling.