SuperAPI AI Directory

Cleora ai

Web-based platform for software development and version control using Git.

Open website

About this tool

Cleora is a graph embedding engine built in Rust, whose core idea is to use sparse matrix exponentiation to exactly compute the distribution of all walk paths in a graph, thereby replacing random walk sampling and negative sampling in traditional methods. The official description summarizes it as "all random walks, one matrix multiplication".

Purpose

Cleora is used to convert graph-structured data (such as edge lists, interaction logs, knowledge triples) into dense deterministic embedding vectors for use in downstream machine learning tasks. Typical uses include recommendation systems, search ranking, dish suggestions, and similar user discovery.

Main capabilities

  • Sparse Markov matrix: Builds a sparse transition matrix from the input graph, with native support for typed, multi-relational edges in heterogeneous hypergraphs.
  • Matrix power = all walk distributions: Each iteration multiplies the embedding matrix by the sparse transition matrix, and M^k captures the distribution of all walks of length k, with no sampling, no noise, and no stochastic approximation.
  • L2-normalized propagation: Each iteration replaces each node's embedding with the L2-normalized average of its neighbors' embeddings. Co-occurrence similarity usually requires 3-4 iterations, while context similarity (similar to skip-gram) requires 7 or more.
  • Deterministic embeddings: The same input always produces the same output, with no need to run multiple times and average, making it suitable for reproducible research and production-grade ML pipelines.
  • Supports inductive learning: New nodes can be embedded without retraining the entire graph.
  • Lightweight dependencies: The entire library is about 5 MB, depends only on numpy and scipy, and is released as a single compiled Rust extension, requiring no CUDA, cuDNN, or GPU drivers.
  • Rich evaluation suite: Built-in AUC, MRR, Hits@K, MAP@K, nDCG, ARI, Silhouette Score, and k-fold cross-validation, allowing evaluation without leaving the library.
  • 7 alternative algorithm baselines: ProNE, RandNE, HOPE, NetMF, GraRep, DeepWalk, and Node2Vec are all provided under the same API as comparison baselines.
  • Mini-batching and graph sampling: Supports neighborhood, subgraph, and GraphSAINT mini-batching, as well as negative sampling and train/test edge splitting.
  • Hyperparameter tuning: Grid search and random search, with automatic evaluation, allowing the optimal embedding configuration to be found among all 7 alternative algorithms in a single call.
  • Benchmarking suite: Compares all 7 alternativealgorithms with Cleora on time, memory, and accuracy metrics, supports custom graphs or 5 built-in graph generators, and outputs tables in publication-ready format.
  • Command-line tool:pycleora embed --input graph.tsv --dim 1024 can be integrated into scripts and CI/CD pipelines without writing Python code.

Usage

Input is in TSV format, with support for typed columns (such as complex::reflexive::product), entities, relations, and modifiers can be placed in a single file. The process is: feed in an edge list or interaction log → build a heterogeneous hypergraph → build a sparse transition matrix (row-normalized so each row sums to 1) → matrix power iteration → output dense deterministic embedding vectors. It is officially said that "from edges to embeddings takes only 5 lines of code," and it is mentioned that "installation takes only seconds, and embedding takes only minutes," but the materials do not provide specific installation commands, so none are provided for now.

Applicable scenarios

  • Recommendation systems: Zomato's ML team used Cleora to replace GraphSAGE, reducing the processing time for customer-restaurant interaction data in a single-city region from about 20 hours to less than 5 minutes, supporting "People Like You" restaurant recommendations for more than 500 cities and over 80 million users.
  • Search ranking, dish suggestions, similar user discovery, etc.
  • Reproducible research: deterministic embeddings are suitable for research and production pipelines that require exactly identical results.
  • Resource-constrained environments: only a single CPU core is needed, with no GPU cluster required.

Limitations

  • The materials do not provide specific installation commands, detailed API documentation, or pricing details, and only state that it is open source and free, with no license fees, no API keys, and no usage restrictions.
  • Performance data such as a 240x speedup over GraphSAGE and a 240x speedup over DeepWalk all come from Zomato's measurement reports, and actual performance may vary depending on the dataset and environment.
  • It is officially said that across 8 algorithms and 5 datasets (ego-Facebook, Cora, CiteSeer, PubMed, PPI, roadNet-CA, etc.), Cleora wins on accuracy in all cases and uses 10-24x less memory, but the materials do not provide complete benchmark data details.