用数学方法将海量类别编码为可逆向量,节省参数且性能不降。
Modular Linear Tokenization (MLT)
- 基于有限域的模运算和线性变换实现可逆编码
- 在MovieLens 20M上性能接近监督嵌入,参数更少
- 适合需可逆编码的高基数分类任务
本文提出模块化线性分词(MLT),一种可逆且确定性的高基数类别标识符编码技术。与传统哈希或独热编码不同,MLT通过有限域上的模运算和可逆线性变换保持双射映射。该方法可精确控制维度,具备良好计算可扩展性,即使面对数百万标识符仍能完全逆向还原。在MovieLens 20M数据集上的实验表明,MLT性能可媲美监督嵌入,同时显著减少参数量与训练成本。MLT已开源,可在PyPI(https://pypi.org/project/light-mlt/)和GitHub(https://github.com/tcharliesschmitz/light-mlt)获取。
原文摘要 · Abstract (English)
This paper introduces Modular Linear Tokenization (MLT), a reversible and deterministic technique for encoding high-cardinality categorical identifiers into compact numerical vectors. Unlike traditional hashing or one-hot encodings, MLT preserves bijective mappings by leveraging modular arithmetic over finite fields and invertible linear transformations. The method offers explicit control of dimensionality and computational scalability while maintaining full reversibility, even for millions of identifiers. Experimental results on the MovieLens 20M dataset show that MLT achieves comparable predictive performance to supervised embeddings while requiring significantly fewer parameters and lower training cost. An open-source implementation of MLT is available on PyPI (https://pypi.org/project/light-mlt/) and GitHub (https://github.com/tcharliesschmitz/light-mlt).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。