Skip to content
项目

关于

LimiX:释放面向通用智能的结构化数据建模能力 https://arxiv.org/abs/2609.17488

人工智能与机器学习

这些数字如何统计

实测星标增长

24小时
+1
7天
+2
15天
+10
1个月
+29

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README_cn.md

原文

LimiX-2

LimiX:面向结构化数据的大型基础模型(LDM)

preprint preprint preprint 项目主页 GitHub HuggingFace ModelScope 许可证

Language   English  | 中文

:🚀 更新动态

  • [2026.11.10] 🚀 LimiX-2-1016 开源发布。 LimiX-2 权重([LimiX-2-1016.ckpt](https://huggingface.co/stable-ai/LimiX-2-1016/tree/main)) 发布,并支持pip直接安装。
  • [2026.09.16] 🚀 LimiX-2 开源发布。 LimiX-2 权重([LimiX-2.ckpt](https://huggingface.co/stable-ai/LimiX-2/tree/main))与推理代码随本仓库一同发布。单个预训练模型在一次前向传播中即可完成分类、回归、缺失值插补,无需任务专属的参数更新。使用需遵循 非商用许可协议。LimiX-2 技术报告正式发布,详见 arxiv archive 或 LimiX_2_Technical_Report.pdf。
  • [2026.06.04] 🧠 LimiX 后续延伸研究成果被 ICML 会议录用! 论文:LimiX-2M,该工作是初代 LimiX 结构化数据基础模型的拓展研究。
  • [2025.11.10] 🚀 LimiX-2M 轻量化模型正式发布! 相较LimiX-16M版本,该轻量模型大幅降低GPU显存占用、提升推理速度;同时优化检索机制,在缩减推理耗时与内存开销的前提下进一步提升模型效果。
  • [2025.09.03] 🧠 LimiX 论文于arXiv上线发布 原论文:arXiv:2509.03505,LimiX是面向通用智能的首款结构化数据大模型,项目基于Apache 2.0协议开源。
  • [2025.08.29] 🚀 LimiX V1.0 正式发布 LimiX结构化数据基础模型首个稳定官方版本开源上线。

➩ 模型下载

模型 参数量 发布日期 下载链接 支持的任务
LimiX-2-1016 400M 2026-11-10 LimiX-2-1016.ckpt ✅ 分类 ✅ 回归 ✅ 缺失值插补
LimiX-2 400M 2026-09-16 LimiX-2.ckpt ✅ 分类 ✅ 回归 ✅ 缺失值插补
LimiX-1_2M 2M 2025-11-10 LimiX-1_2M.ckpt ✅ 分类 ✅ 回归 ✅ 缺失值插补
LimiX-1_16M 16M 2025-08-29 LimiX-1_16M.ckpt ✅ 分类 ✅ 回归 ✅ 缺失值插补

✨ LimiX-2 模型架构与预训练数据

LimiX-2 是 LimiX 家族中的新一代模型,它是基于我们此前确立的缩放定律(scaling laws),通过模型与数据规模扩展而开发的。LimiX-2 采用了上下文机制网络(CMN)范式,并利用上下文条件掩码建模(CCMM)进行预训练。CMN 将上下文学习(in-context learning)的组织原则从以目标为中心的预测,转变为以机制为导向的联合建模。该模型并非围绕传统表格型 PFN(先验拟合网络)中常见的 p(y | x, D_context) 目标进行构建,而是致力于学习 p(x, y | D_context)——即一种表征数据生成背后联合结构的、依赖于上下文的表示。预训练阶段使用了由结构因果模型(SCM)生成的合成数据集,这些数据集涵盖了多种图结构、函数机制及观测过程。在 TabArena、TALENT 和 BCCO 上的评估结果表明,LimiX-2 的表现优于现有的特定数据集模型及表格数据基础模型。除了预测性能外,CMN 范式还赋予了 LimiX-2 因果感知能力:其特征注意力机制能够编码直接因果关系,从而实现对因果骨架(causal skeleton)的精确恢复。

图 2:LimiX-2 整体结构
LimiX-2 模型架构

图 3:预训练合成数据生成流程
预训练合成数据生成流程

📈 Benchmark 结果

➩ 总体 Elo

LimiX-2 在三大基准上均取得最高 Elo,超越所有对比的基础模型与 AutoGluon 1.6。

图 1:各基准性能总览
各基准性能总览

➩ TabArena

在完整的 TabArena 基准上,LimiX-2 在全部四项预测指标上均排名第一,取得 1963 的 Elo(高出第二名 TabFM+ 147 分)、3.6% 的可改进度(improvability)、5.0 的平均排名与 21.7 的聚合胜场(约为 TabFM+ 的 4.3 倍)。

模型 Elo ↑ 可改进↓ 均排名↓ 胜场↑
LimiX-2-1016 (D) 1963 3.6% 5.0 21.7
TabFM+ 1816 6.4% 9.1 5.1
Causilo (D) 1788 9.1% 10.1 1.3
AutoGluon 1.6 (NC, 4h) 1787 8.8% 10.2 0.9
TabFM (D) 1772 6.7% 10.7 5.0
Mitra-v2 (D) 1768 8.5% 10.9 3.0
EXAONE Tabular (D) 1746 9.7% 11.9 1.5
AutoGluon 1.6 (EX, 4h) 1737 9.4% 12.3 0.8
AutoGluon 1.5 (EX, 4h) 1647 10.4% 16.9 1.0
TabPFN-3 (D) 1631 11.8% 17.9 0.4

在分类(38 个数据集,Table 3)与回归(13 个数据集,Table 4)子集上,LimiX-2 同样四项指标全面第一:

子集 Elo ↑ 可改进↓ 均排名↓ 胜场↑ 胜率↑
分类 1917 4.3% 6.0 10.6 94.5%
回归 2206 0.6% 3.8 8.3 96.9%

图 4:TabArena 基准性能
TabArena 基准性能。 基线涵盖默认、调优与调优+集成三类配置;LimiX-2-1016 在默认配置下即取得 1963 Elo,优于所有对比基础模型,并超过 4 小时非商业配置的 AutoGluon。

图 5:TabArena 成对胜率
TabArena 成对胜率

➩ TALENT

在 TALENT 上,LimiX-2-1016 总体 Elo 为 1510(高出 TabFM 39 分),并在分类、回归与二分类上取得最高 Elo,多分类 Elo 为 1517(该列最高为 TabFM 的 1518)。可改进度为 6.75%,聚合胜场为 89.5(约为 TabFM 的 1.9 倍)。

模型 Elo 分类 回归 二分类 多分类 可改进↓ 胜场↑
LimiX-2-1016 1510 1466 1621 1444 1517 6.75% 89.5
TabFM 1471 1449 1531 1417 1518 9.39% 46.6
AutoGluon 1.6 1438 1380 1583 1339 1468 11.51% 47.8
EXAONE Tabular 1393 1357 1479 1369 1341 15.00% 12.3
TabPFN-3 1364 1331 1442 1333 1332 15.89% 15.1
LimiX-16M 1228 1210 1269 1217 1199 20.35% 6.4
CatBoost 1094 1095 1094 1107 1073 26.86% 4.3
RandomForest 1000 1000 1000 1000 1000 30.08% 3.8

图 6:TALENT 平均排名对比
TALENT 平均排名对比。LimiX-2 在二分类、多分类与回归上均取得最低平均排名(4.62、3.91、3.88)。

图 7:TALENT 成对胜率
TALENT 成对胜率

➩ BCCO

在 BCCO 上,LimiX-2 总体排名第一,Elo 为 1439(分别高出 AutoGluon 1.6 (EX, 4h)、TabFM、LimiX-16M 达 64 / 71 / 209 分),可改进度为 6.79%,聚合胜场为 51.2(约为 TabFM 的 3.3 倍)。

模型 Elo 分类 回归 二分类 多分类 可改进↓ 胜场↑
LimiX-2-1016 1439 1320 1902 1269 1447 6.79% 51.2
AutoGluon 1.6 1375 1269 1781 1199 1445 9.88% 23.6
TabFM 1368 1259 1786 1212 1376 12.22% 15.3
EXAONE Tabular 1343 1253 1689 1221 1334 13.24% 7.8
TabPFN-3 1295 1188 1692 1154 1275 14.40% 5.9
LimiX-16M 1230 1194 1385 1172 1253 16.32% 6.3
CatBoost 1139 1100 1286 1095 1118 21.72% 4.6
RandomForest 1000 1000 1000 1000 1000 26.72% 2.6

图 9:BCCO 平均排名对比
BCCO 平均排名对比。LimiX-2 在二分类、多分类与回归上均取得最低平均排名。

图 10:BCCO 成对胜率
BCCO 成对胜率

➩ 缩放定律

缩放研究评测了 LimiX-2 从 12.5M 到 406.2M 参数的配置,并将拟合的对数线性趋势外推至十亿参数量级。在全部五个评测序列上,下游性能均随模型规模呈清晰的对数线性趋势。

评测任务 α(Elo@100M) β(每翻倍 Elo 增益) R² RMSE
TabArena 1950.46 45.73 0.9570 16.60
TALENT 分类 1434.61 26.37 0.9530 10.04
TALENT 回归 1618.26 19.07 0.8848 11.79
BCCO 分类 1304.28 16.76 0.9038 9.37
BCCO 回归 1869.14 35.19 0.9128 18.64

图 12:TabArena 参数缩放
TabArena 参数缩放。实线连接实测的 LimiX-2 各规模点,虚线为外推至 2B 参数的对数线性拟合。

图 13:TALENT 分类与回归参数缩放
TALENT 分类与回归的参数缩放曲线

图 14:BCCO 分类与回归参数缩放
BCCO 分类与回归的参数缩放曲线

➤ 使用教程

➩ 安装

需要 Python >= 3.12。PyPI 发行名为 ldm-limix,导入包名是 ldm_limix:from ldm_limix import LimiXPredictor。torch / flash-attn 需与本机 CUDA 版本匹配,可在步骤 1(可选)中先行安装。

步骤 1(可选):安装 PyTorch 与 flash-attn

推荐版本(见 constraints.txt):torch==2.9.1、torchvision==0.24.1、torchaudio==2.9.1。请从 pytorch.org 安装与 CUDA 匹配的构建,例如:

pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1

然后从 flash-attention Releases 下载与本机 Python / CUDA / torch 版本匹配的预编译 wheel(必须与上述 torch 2.9.1 对齐;下面的文件名仅为示例):

wget -O flash_attn.whl https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.1/flash_attn-2.8.1+cu12torch2.9cxx11abiTRUE-cp312-cp312-linux_x86_64.whl
pip install flash_attn.whl

步骤 2:安装 ldm-limix

从 PyPI 安装:

python -m pip install ldm-limix

从本地仓库以可编辑模式安装:

git clone https://github.com/limix-ldm-ai/LimiX.git
cd LimiX
python -m pip install -e .

两条命令都会安装 LimiX-infer 命令行入口,并使 from ldm_limix import LimiXPredictor 在任意工作目录下均可导入。若步骤 1 中已安装 torch==2.9.1,此处会直接复用该构建。

➤ 推理

LimiX 支持分类、回归与缺失值插补。统一的推理入口为 ldm_limix.LimiXPredictor,它会根据 checkpoint 的架构版本路由到 v1_0 / v2_0。请使用与模型匹配的配置(LimiX-2 / V2.0 使用 *_v2.json)。

➩ 命令行:LimiX-infer

执行 pip install ldm-limix(或在仓库内执行 pip install -e .)后,LimiX-infer 与 python -m ldm_limix.infer 是同一入口。必填参数:--task_type、--data_dir、--model_path。若未指定 --inference_config_path,将按任务类型与 checkpoint 版本选择内置的默认配置(V2.0 使用 *_v2.json)。

--data_dir 为基准数据根目录:每个数据集一个子目录,可参考公开的 bcco_cls / bcco_reg 目录结构。缺少所需 CSV 的子目录会被跳过。

<data_dir>/
  <dataset_name>/
    <dataset_name>_train.csv
    <dataset_name>_test.csv
    <dataset_name>_0.05.csv    # 仅缺失值插补使用;后缀随 --mask_ratio 变化(默认 0.05)

每个 CSV 均含表头,最后一列为目标列(分类数据集为 label,回归数据集为回归目标值),其余列为特征。

LimiX-infer --help

分类 / 回归 / 缺失值插补:

LimiX-infer --task_type Classification --data_dir /path/to/class202512_527 --model_path /path/to/LimiX-2.ckpt --gpuid 0 --save_name limix_cls
LimiX-infer --task_type Regression --data_dir /path/to/reg202512_288 --model_path /path/to/LimiX-2.ckpt --gpuid 0 --save_name limix_reg
LimiX-infer --task_type Feature_imputation --data_dir /path/to/mvi_data --model_path /path/to/LimiX-2.ckpt --gpuid 0 --save_name limix_mvi

--task_type 也接受别名 cls / reg / imputation。常用可选参数:

参数 说明
--inference_config_path JSON 配置路径(默认用内置配置)
--save_name 结果目录名称
--device cuda(默认)或 cpu
--gpuid GPU 编号(默认 0)
--gpu_num_per_predictor 每个 predictor 的 GPU 数(仅 V2.0)
--autobatch 启用自动批处理
--show_progress 显示进度
--seed 随机种子

➩ 接口说明

模型创建

from ldm_limix import LimiXPredictor

class LimiXPredictor:
    def __init__(self,
                 device: torch.device,
                 model_path: str,
                 inference_config: dict | list | str,
                 mix_precision: bool = True,
                 outlier_remove_std: float = 12,
                 softmax_temperature: float = 0.9,
                 average_before_softmax: bool = True,
                 categorical_features_indices: List[int] | None = None,
                 inference_with_DDP: bool = False,
                 use_data_cache: bool = False,
                 seed: int = 0)
参数 数据类型 说明
device torch.device 推理设备,推荐 cuda
model_path str checkpoint 路径
inference_config dict / list / str 推理配置(dict / list / JSON 路径)
mix_precision bool 是否混合精度
outlier_remove_std float 异常值裁剪的标准差倍数
softmax_temperature float Softmax 温度(须 > 0)
average_before_softmax bool 分桶回归:softmax 前是否先平均
categorical_features_indices list 类别列的索引
inference_with_DDP bool 是否启用 DDP(V2.0 保持 False)
use_data_cache bool 预处理结果是否落盘缓存
seed int 随机状态种子

预测

def predict(self,
            x_train: np.ndarray,
            y_train: np.ndarray,
            x_test: np.ndarray,
            task_type: Literal["Classification", "Regression", "Feature_imputation"] = "Classification",
            unique_dataset_name: str | None = None) -> np.ndarray:
参数 数据类型 说明
x_train np.ndarray 训练特征,形状 (n_train, n_features)
y_train np.ndarray 训练目标,形状 (n_train,)
x_test np.ndarray 查询特征,列需与 x_train 对齐
task_type str "Classification"(默认)、"Regression" 或 "Feature_imputation"
unique_dataset_name str 数据集标识(可选,用于缓存)

返回值:

  • 分类:类别概率,形状 (n_query, n_classes),每行求和为 1
  • 回归:预测值,形状 (n_query,)(V2.0 直接返回原始目标尺度,无需手动反归一化)
  • 缺失值插补:插补后的特征矩阵

➩ 推理配置文件

配置文件名 适用模型 说明
cls_default_noretrieval_v2.json LimiX-2 / V2.0 默认分类(不检索)
reg_default_noretrieval_v2.json LimiX-2 / V2.0 默认回归(不检索)
reg_default_noretrieval_MVI_v2.json LimiX-2 / V2.0 默认缺失值插补
cls_default_retrieval.json LimiX-16M / LimiX-2M 分类 + 检索,精度更高
cls_default_noretrieval.json LimiX-16M / LimiX-2M 分类不检索,更快更省显存
reg_default_retrieval.json LimiX-16M / LimiX-2M 回归 + 检索,精度更高
reg_default_noretrieval.json LimiX-16M / LimiX-2M 回归不检索,更快更省显存
reg_default_noretrieval_MVI.json LimiX-16M / LimiX-2M 缺失值插补

➩ 分类

from sklearn.datasets import load_breast_cancer
from sklearn.metrics import accuracy_score, roc_auc_score
from sklearn.model_selection import train_test_split
from huggingface_hub import hf_hub_download
import numpy as np
import os, sys
import torch

os.environ["RANK"] = "0"
os.environ["WORLD_SIZE"] = "1"
os.environ["MASTER_ADDR"] = "127.0.0.1"
os.environ["MASTER_PORT"] = "29500"

ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if ROOT_DIR not in sys.path:
    sys.path.insert(0, ROOT_DIR)
from ldm_limix import LimiXPredictor

X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)

model_file = hf_hub_download(repo_id="stable-ai/LimiX-2", filename="LimiX-2.ckpt", local_dir="./cache")

clf = LimiXPredictor(
    device=torch.device("cuda"),
    model_path=model_file,
    inference_config=os.path.join(ROOT_DIR, "ldm_limix", "config", "cls_default_noretrieval_v2.json"),
)
prediction = clf.predict(X_train, y_train, X_test, task_type="Classification")

print("roc_auc_score:", roc_auc_score(y_test, prediction[:, 1]))
print("accuracy_score:", accuracy_score(y_test, np.argmax(prediction, axis=1)))

完整示例见 examples/demo_classification.py

➩ 回归

from functools import partial

from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score
from huggingface_hub import hf_hub_download
import torch

try:
    from sklearn.metrics import root_mean_squared_error as mean_squared_error
except:
    from sklearn.metrics import mean_squared_error
    mean_squared_error = partial(mean_squared_error, squared=False)
import os, sys

os.environ["RANK"] = "0"
os.environ["WORLD_SIZE"] = "1"
os.environ["MASTER_ADDR"] = "127.0.0.1"
os.environ["MASTER_PORT"] = "29500"

ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if ROOT_DIR not in sys.path:
    sys.path.insert(0, ROOT_DIR)
from ldm_limix import LimiXPredictor

X, y = load_diabetes(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)

model_path = hf_hub_download(repo_id="stable-ai/LimiX-2", filename="LimiX-2.ckpt", local_dir="./cache")

model = LimiXPredictor(
    device=torch.device("cuda"),
    model_path=model_path,
    inference_config=os.path.join(ROOT_DIR, "ldm_limix", "config", "reg_default_noretrieval_v2.json"),
)
y_pred = model.predict(X_train, y_train, X_test, task_type="Regression")

rmse = mean_squared_error(y_test, y_pred)
r2 = r2_score(y_test, y_pred)

print(f"RMSE: {rmse}")
print(f"R2: {r2}")

完整示例见 examples/demo_regression.py

➩ 缺失值插补

model = LimiXPredictor(
    device=torch.device("cuda"),
    model_path=model_path,
    inference_config=os.path.join(ROOT_DIR, "ldm_limix", "config", "reg_default_noretrieval_MVI_v2.json"),
)
reconstructed_X = model.predict(X_train, y_train, x_test_with_nan, task_type="Feature_imputation")

完整示例见 examples/demo_missing_value_imputation.py

➤ 相关链接

📃 许可证

本仓库中的代码采用 Stable AI Technology Co., Ltd. License, Version 1.0 (2026年9月) 授权,该许可证衍生自 Apache License, Version 2.0:其中第 1–9 节沿用了 Apache 2.0 的条款与条件,仅对第 1 节中“License”(许可证)的定义进行了修改,以便纳入第 10 节(关于署名及模型命名的附加要求)的规定。第三方代码受其各自的许可证及署名要求约束;详情请参阅 LICENSE.txt。模型权重采用单独的许可证授权:第三方代码遵循其各自的许可与署名要求,详见 LICENSE.txt。模型权重单独授权:

📝 引用

@misc{zhang2026limix2contextualmechanismnetwork,
      title={LimiX-2: A Contextual Mechanism Network Towards General Structured-Data Intelligence}, 
      author={Xingxuan Zhang and Gang Ren and Hao Yuan and Hao Zou and Hongze Tan and Hui Wang and Jianhao Song and Jiansheng Li and Jiayao Zhang and Jinghan Zhang and Kaifang Li and Lang Mo and Li Mao and Mingchao Hao and Nuo Xu and Rui Ding and Ruiji Zhang and Shuyang Li and Siyu Mei and Tianyang Zhang and Weiyang Mu and Yancheng Dong and Yongxian Wei and Yuan Xue and Yuanrui Wang and Yue He and Zijia Yang and Ziyun Li and Dongzhe Li and Fuqiang Wang and Jiandong Liu and Jiawei Chen and Jiaxin Du and Kaijie Cheng and Kehan Li and Lei Sun and Linjun Zhou and Ningbo Dai and Qi Wang and Renzhe Xu and Shaoxing Du and Shumeng Yang and Wang Lu and Wenjing Chu and Xiannan Huang and Xiaoyu Lin and Xing Ai and Xinyan Han and Xuanyue Li and Xuanyue Su and Xukun Zhang and Yan Lu and Yaxin Zhang and Yi Qin and Yifei Huang and Yihan Xu and Yongle Lv and Yuanyuan Jiang and Yushan Han and Peng Cui},
      year={2026},
      eprint={2609.17488},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2609.17488}, 
}

@article{wang2026limix,
  title={LimiX-2M: Mitigating Low-Rank Collapse and Attention Bottlenecks in Tabular Foundation Models},
  author={Wang, Yuanrui and Zhang, Xingxuan and Yu, Han and Hao, Mingchao and Ren, Gang and Yuan, Hao and Mao, Li and Zhang, Yunjia and Yuan, Chun and Cui, Peng},
  journal={arXiv preprint arXiv:2606.04485},
  year={2026}
}

@article{zhang2025limix,
  title={Limix: Unleashing structured-data modeling capability for generalist intelligence},
  author={Zhang, Xingxuan and Ren, Gang and Yu, Han and Yuan, Hao and Wang, Hui and Li, Jiansheng and Wu, Jiayun and Mo, Lang and Mao, Li and Hao, Mingchao and others},
  journal={arXiv preprint arXiv:2509.03505},
  year={2025}
}

探索相关项目

加载中…