描述
Cleora is a groundbreaking Rust-powered graph embedding engine designed to provide deterministic and highly accurate graph embeddings. Unlike traditional methods that rely on random walks, negative sampling, and GPU clusters, Cleora computes the exact distribution of all possible walks in a single sparse matrix power. This approach eliminates noise and stochastic approximation, ensuring perfect reproducibility and significantly faster computation on a single CPU core.
The core of Cleora's innovation lies in its algorithm. It constructs a sparse transition matrix from the input graph, handling heterogeneous hypergraphs with typed, multi-relational edges natively. Each iteration of matrix multiplication with this transition matrix captures the full distribution of walks of a specific length. This is followed by L2-normalized propagation, where each node's embedding is updated to the normalized average of its neighbors' embeddings. This process requires only a few iterations for co-occurrence similarity and slightly more for contextual similarity, making it orders of magnitude faster than sampling-based methods.
Key advantages of Cleora include its speed, accuracy, and efficiency. It is up to 240 times faster than GraphSAGE and uses significantly less memory than other libraries like NetMF. The engine is deterministic by default, crucial for reproducible research and production ML pipelines. It natively supports heterogeneous hypergraphs, eliminating the need for complex graph preprocessing. Furthermore, Cleora boasts a minimal install size of around 5 MB with only numpy and scipy as dependencies, avoiding the headaches of GPU driver installations and heavy frameworks.
Cleora is production-ready, offering stable and inductive embeddings that support the embedding of new nodes without retraining the entire graph. Its capabilities extend to various applications, including recommendation systems, knowledge graphs, entity resolution, fraud detection, and drug discovery. The engine's efficiency is highlighted by case studies like Zomato, which replaced GraphSAGE with Cleora, reducing embedding generation time from 20 hours to under 5 minutes for millions of users.
Cleora provides a comprehensive suite of tools, including built-in alternative algorithms for comparison, a rich evaluation suite for assessing embedding quality, graph sampling capabilities, and hyperparameter tuning. It also includes a CLI tool for easy integration into scripting and CI/CD pipelines. The entire library is open-source, free to use, modify, and deploy, offering a cost-effective solution compared to GPU-based alternatives.
Cleora Graph Embedding Engine的核心功能
通过稀疏矩阵幂进行确定性图嵌入计算
仅限 CPU 执行,无需 GPU
原生支持具有类型化、多关系边的异构超图
消除了随机游走采样和 skip-gram 训练
在真实世界图上实现高精度
比基于 GPU 和基于采样的方法快得多
最小依赖和安装体积小(约 5 MB)
支持感应式学习,无需重新训练即可处理新节点
包含内置的替代算法以供比较
提供丰富的评估套件以评估嵌入质量
提供 CLI 工具以进行脚本和 CI/CD 集成
开源且可免费使用、修改和部署
如何使用 Cleora Graph Embedding Engine?
安装:pip install pycleora
输入数据:以 TSV 格式提供边列表、交互日志或知识三元组。
图构建:Cleora 从输入数据构建异构超图。
矩阵幂:计算稀疏转移矩阵及其幂以捕获游走分布。
嵌入生成:L2 归一化传播生成确定性嵌入向量。
下游 ML:利用生成的嵌入进行推荐、分类、搜索等。
Cleora Graph Embedding Engine的使用案例
- 推荐系统
- 知识图谱
- 实体解析
- 欺诈检测
- 社交网络分析
- 药物发现
- 供应链优化
- 客户细分








