Saved in:
Bibliographic Details
Main Authors: Han, Guangzeng, Tsao, Jack, Huang, Xiaolei
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.07052
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916243012845568
author Han, Guangzeng
Tsao, Jack
Huang, Xiaolei
author_facet Han, Guangzeng
Tsao, Jack
Huang, Xiaolei
contents Lengthy documents pose a unique challenge to neural language models due to substantial memory consumption. While existing state-of-the-art (SOTA) models segment long texts into equal-length snippets (e.g., 128 tokens per snippet) or deploy sparse attention networks, these methods have new challenges of context fragmentation and generalizability due to sentence boundaries and varying text lengths. For example, our empirical analysis has shown that SOTA models consistently overfit one set of lengthy documents (e.g., 2000 tokens) while performing worse on texts with other lengths (e.g., 1000 or 4000). In this study, we propose a Length-Aware Multi-Kernel Transformer (LAMKIT) to address the new challenges for the long document classification. LAMKIT encodes lengthy documents by diverse transformer-based kernels for bridging context boundaries and vectorizes text length by the kernels to promote model robustness over varying document lengths. Experiments on five standard benchmarks from health and law domains show LAMKIT outperforms SOTA models up to an absolute 10.9% improvement. We conduct extensive ablation analyses to examine model robustness and effectiveness over varying document lengths.
format Preprint
id arxiv_https___arxiv_org_abs_2405_07052
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Length-Aware Multi-Kernel Transformer for Long Document Classification
Han, Guangzeng
Tsao, Jack
Huang, Xiaolei
Computation and Language
Lengthy documents pose a unique challenge to neural language models due to substantial memory consumption. While existing state-of-the-art (SOTA) models segment long texts into equal-length snippets (e.g., 128 tokens per snippet) or deploy sparse attention networks, these methods have new challenges of context fragmentation and generalizability due to sentence boundaries and varying text lengths. For example, our empirical analysis has shown that SOTA models consistently overfit one set of lengthy documents (e.g., 2000 tokens) while performing worse on texts with other lengths (e.g., 1000 or 4000). In this study, we propose a Length-Aware Multi-Kernel Transformer (LAMKIT) to address the new challenges for the long document classification. LAMKIT encodes lengthy documents by diverse transformer-based kernels for bridging context boundaries and vectorizes text length by the kernels to promote model robustness over varying document lengths. Experiments on five standard benchmarks from health and law domains show LAMKIT outperforms SOTA models up to an absolute 10.9% improvement. We conduct extensive ablation analyses to examine model robustness and effectiveness over varying document lengths.
title Length-Aware Multi-Kernel Transformer for Long Document Classification
topic Computation and Language
url https://arxiv.org/abs/2405.07052