mathesis-ai
Find cross-domain bridges in scientific literature. Give it a research question; it returns papers from unrelated fields that solved the same underlying problem -- expressed in different vocabulary.
Built on SPECTER embeddings, recursive semantic graph expansion, PDF RAG, and Groq LLM summaries. No server required.
Install
# Install CPU torch first (PyPI's default is a 4 GB CUDA build)
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install mathesis-ai
GPU:
pip install torch --index-url https://download.pytorch.org/whl/cu121
pip install mathesis-ai
Requires Python 3.11+. Needs ~4 GB RAM for the embedding model.
Usage
from mathesis import Mathesis
m = Mathesis(groq_api_key="gsk_...") # free key at console.groq.com
m.seed() # fetch & embed 250 papers, ~10 min, run once
results = m.query("vanishing gradients in deep neural network optimization")
for bridge in results.bridges:
print(bridge.domain_jump) # "q-bio.NC -> cs.LG"
print(bridge.confidence) # 0.796
print(bridge.llm_summary) # one-paragraph analogy explanation
No .env file, no server to start. Data is stored in ~/.mathesis by default.
Configuration
m = Mathesis(
groq_api_key="gsk_...", # required for LLM summaries
data_dir="~/my-mathesis-data", # default: ~/.mathesis
domains=["cs.LG", "q-bio.NC"], # default: 5 arXiv categories
llm_enabled=True, # default: True
device="cpu", # "cpu" or "cuda"
)
Query response
results.bridges_found # bool
results.bridges # list of BridgeResult
results.top_nodes # top 5 papers by graph rank
results.graph_stats # {"nodes": 310, "edges": 1548, "domains": [...]}
bridge.domain_jump # "q-bio.NC -> cs.LG"
bridge.confidence # 0.0 - 1.0
bridge.similarity # raw cosine similarity
bridge.rag_confirmed # bool - methods text confirmed the bridge
bridge.rag_excerpt # extracted methods section passage
bridge.llm_summary # Groq-generated analogy explanation
bridge.source_paper.title
bridge.source_paper.id # arXiv ID
bridge.target_paper.title
Async support
results = await m.aquery("attention mechanisms in transformers")
Status
print(m)
# Mathesis(papers_indexed=581, domains=5, llm=enabled)
m.status()
# {"papers_indexed": 581, "domains": [...], "data_dir": "~/.mathesis"}
Getting more data
m.seed(papers_per_domain=50) # quick start -- 250 papers total
m.ingest() # full corpus -- 500 papers/domain, ~25 min
Source & docs
Metadata
Release files for mathesis-ai 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mathesis_ai-0.1.4.tar.gz | 2.6 MB | Without provenance | Details for mathesis_ai-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mathesis_ai-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for mathesis_ai-0.1.4-py3-none-any.whl |
Total release size: 2.7 MB
Release files / mathesis_ai-0.1.4.tar.gz
| Download URL | mathesis_ai-0.1.4.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94ebe02593b5c75de768e1d0a5f823163a9e843f93586b75051936367050ad85
|
|
BLAKE2b-256 checksum How to use checksums |
5961b51a7ac3870d77e8998c2b32feee519c0cf4192245c0157a5440b7217dba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / mathesis_ai-0.1.4-py3-none-any.whl
| Download URL | mathesis_ai-0.1.4-py3-none-any.whl |
|---|---|
| Size | 34.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae255dbf59cfb38c39b6ab9d80dba3b6be5ac7732c878aa1d2cbbbbada54f5a9
|
|
BLAKE2b-256 checksum How to use checksums |
9679f37b3f75113f3c28c6b5c16eaeb1e982b071167192c33930ca2401bdefab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for mathesis-ai 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.