| Crates.io | ruvector-data-framework |
| lib.rs | ruvector-data-framework |
| version | 0.3.0 |
| created_at | 2026-01-05 18:51:20.131655+00 |
| updated_at | 2026-01-05 19:50:27.118526+00 |
| description | Core discovery framework for RuVector dataset integrations - find hidden patterns in massive datasets using vector memory, graph structures, and dynamic min-cut algorithms |
| homepage | |
| repository | https://github.com/ruvnet/ruvector |
| max_upload_size | |
| id | 2024360 |
| size | 2,006,185 |
Find hidden patterns and connections in massive datasets that traditional tools miss.
RuVector turns your dataβresearch papers, climate records, financial filingsβinto a connected graph, then uses cutting-edge algorithms to spot emerging trends, cross-domain relationships, and regime shifts before they become obvious.
Most data analysis tools excel at answering questions you already know to ask. RuVector is different: it helps you discover what you don't know you're looking for.
Real-world examples:
| Feature | What It Does | Why It Matters |
|---|---|---|
| Vector Memory | Stores data as 384-1536 dim embeddings | Similar concepts cluster together automatically |
| HNSW Index | O(log n) approximate nearest neighbor search | 10-50x faster than brute force for large datasets |
| Graph Structure | Connects related items with weighted edges | Reveals hidden relationships in your data |
| Min-Cut Analysis | Measures how "connected" your network is | Detects regime changes and fragmentation |
| Cross-Domain Detection | Finds bridges between different fields | Discovers unexpected correlations (e.g., climate β finance) |
| ONNX Embeddings | Neural semantic embeddings (MiniLM, BGE, etc.) | Production-quality text understanding |
| Causality Testing | Checks if changes in X predict changes in Y | Moves beyond correlation to actionable insights |
| Statistical Rigor | Reports p-values and effect sizes | Know which findings are real vs. noise |
cosine_similarity, euclidean_distance, normalize_vector# Ensure you're in the ruvector workspace
cd /workspaces/ruvector
# 1. Performance benchmark - see the speed improvements
cargo run --example optimized_benchmark -p ruvector-data-framework --features parallel --release
# 2. Discovery hunter - find patterns in sample data
cargo run --example discovery_hunter -p ruvector-data-framework --features parallel --release
# 3. Cross-domain analysis - detect bridges between fields
cargo run --example cross_domain_discovery -p ruvector-data-framework --release
# Climate: Detect weather regime shifts
cargo run --example regime_detector -p ruvector-data-climate
# Finance: Monitor corporate filing coherence
cargo run --example coherence_watch -p ruvector-data-edgar
π Discovery Results:
Pattern: Climate β Finance bridge detected
Strength: 0.73 (strong connection)
P-value: 0.031 (statistically significant)
β Drought indices may predict utility sector
performance with a 3-period lag
RuVector's unique combination of vector memory, graph structures, and dynamic minimum cut algorithms enables discoveries that most analysis tools miss:
use ruvector_data_framework::optimized::{
OptimizedDiscoveryEngine, OptimizedConfig,
};
use ruvector_data_framework::ruvector_native::{
Domain, SemanticVector,
};
let config = OptimizedConfig {
similarity_threshold: 0.55, // Minimum cosine similarity
mincut_sensitivity: 0.10, // Coherence change threshold
cross_domain: true, // Enable cross-domain discovery
use_simd: true, // SIMD acceleration
significance_threshold: 0.05, // P-value threshold
causality_lookback: 12, // Temporal lookback periods
..Default::default()
};
let mut engine = OptimizedDiscoveryEngine::new(config);
use std::collections::HashMap;
use chrono::Utc;
// Single vector
let vector = SemanticVector {
id: "climate_drought_2024".to_string(),
embedding: generate_embedding(), // 128-dim vector
domain: Domain::Climate,
timestamp: Utc::now(),
metadata: HashMap::from([
("region".to_string(), "sahel".to_string()),
("severity".to_string(), "extreme".to_string()),
]),
};
let node_id = engine.add_vector(vector);
// Batch insertion (8.8x faster)
#[cfg(feature = "parallel")]
{
let vectors: Vec<SemanticVector> = load_vectors();
let node_ids = engine.add_vectors_batch(vectors);
}
let snapshot = engine.compute_coherence();
println!("Min-cut value: {:.3}", snapshot.mincut_value);
println!("Partition sizes: {:?}", snapshot.partition_sizes);
println!("Boundary nodes: {:?}", snapshot.boundary_nodes);
Interpretation:
| Min-cut Trend | Meaning |
|---|---|
| Rising | Network consolidating, stronger connections |
| Falling | Fragmentation, potential regime change |
| Stable | Steady state, consistent structure |
let patterns = engine.detect_patterns_with_significance();
for pattern in patterns.iter().filter(|p| p.is_significant) {
println!("{}", pattern.pattern.description);
println!(" P-value: {:.4}", pattern.p_value);
println!(" Effect size: {:.3}", pattern.effect_size);
}
Pattern Types:
| Type | Description | Example |
|---|---|---|
CoherenceBreak |
Min-cut dropped significantly | Network fragmentation crisis |
Consolidation |
Min-cut increased | Market convergence |
BridgeFormation |
Cross-domain connections | Climate-finance link |
Cascade |
Temporal causality | Climate β Finance lag-3 |
EmergingCluster |
New dense subgraph | Research topic emerging |
// Check coupling strength
let stats = engine.stats();
let coupling = stats.cross_domain_edges as f64 / stats.total_edges as f64;
println!("Cross-domain coupling: {:.1}%", coupling * 100.0);
// Domain coherence scores
for domain in [Domain::Climate, Domain::Finance, Domain::Research] {
if let Some(coh) = engine.domain_coherence(domain) {
println!("{:?}: {:.3}", domain, coh);
}
}
| Operation | Baseline | Optimized | Speedup |
|---|---|---|---|
| Vector Insertion | 133ms | 15ms | 8.84x |
| SIMD Cosine | 432ms | 148ms | 2.91x |
| Pattern Detection | 524ms | 655ms | - |
Best for: Emerging field detection, cross-discipline bridges
use ruvector_data_openalex::{OpenAlexConfig, FrontierRadar};
let radar = FrontierRadar::new(OpenAlexConfig::default());
let frontiers = radar.detect_emerging_topics(papers);
Best for: Regime shift detection, anomaly prediction
use ruvector_data_climate::{ClimateConfig, RegimeDetector};
let detector = RegimeDetector::new(config);
let shifts = detector.detect_shifts();
Best for: Corporate risk signals, peer divergence
use ruvector_data_edgar::{EdgarConfig, CoherenceMonitor};
let monitor = CoherenceMonitor::new(config);
let alerts = monitor.analyze_filing(filing);
examples/data/
βββ README.md # This file
βββ Cargo.toml # Workspace manifest
βββ framework/ # Core discovery framework
β βββ src/
β β βββ lib.rs # Framework exports
β β βββ ruvector_native.rs # Native engine with Stoer-Wagner
β β βββ optimized.rs # SIMD + parallel optimizations
β β βββ coherence.rs # Coherence signal computation
β β βββ discovery.rs # Pattern detection
β β βββ ingester.rs # Data ingestion
β βββ examples/
β βββ cross_domain_discovery.rs # Cross-domain patterns
β βββ optimized_benchmark.rs # Performance comparison
β βββ discovery_hunter.rs # Novel pattern search
βββ openalex/ # OpenAlex integration
βββ climate/ # NOAA/NASA integration
βββ edgar/ # SEC EDGAR integration
| Parameter | Default | Description |
|---|---|---|
similarity_threshold |
0.65 | Minimum cosine similarity for edges |
mincut_sensitivity |
0.12 | Sensitivity to coherence changes |
cross_domain |
true | Enable cross-domain discovery |
batch_size |
256 | Parallel batch size |
use_simd |
true | Enable SIMD acceleration |
similarity_cache_size |
10000 | Max cached similarity pairs |
significance_threshold |
0.05 | P-value threshold |
causality_lookback |
10 | Temporal lookback periods |
causality_min_correlation |
0.6 | Minimum correlation for causality |
| Parameter | Default | Description |
|---|---|---|
similarity_threshold |
0.5 | Min similarity for auto-connecting embeddings |
use_embeddings |
true | Auto-create edges from embedding similarity |
hnsw_k_neighbors |
50 | Neighbors to search per vector (HNSW) |
hnsw_min_records |
100 | Min records to trigger HNSW (else brute force) |
min_edge_weight |
0.01 | Minimum edge weight threshold |
approximate |
true | Use approximate min-cut for speed |
parallel |
true | Enable parallel computation |
Detected: Climate β Finance bridge
Strength: 0.73
Connections: 197
Hypothesis: Drought indices may predict
utility sector performance with lag-2
Min-cut trajectory:
t=0: 72.5 (baseline)
t=1: 73.3 (+1.1%)
t=2: 74.5 (+1.6%) β Consolidation
Effect size: 2.99 (large)
P-value: 0.042 (significant)
Climate β Finance causality detected
F-statistic: 4.23
Optimal lag: 3 periods
Correlation: 0.67
P-value: 0.031
Approximate nearest neighbor search in high-dimensional spaces.
m=16, ef_construction=200, ef_search=50Computes minimum cut of weighted undirected graph.
Processes 8 floats per iteration using AVX2.
Tests if past values of X predict Y.
similarity_threshold: 0.45 for explorationadd_vectors_batch() is 8x fasterp_value < 0.05| Problem | Solution |
|---|---|
| No patterns detected | Lower mincut_sensitivity to 0.05 |
| Too many edges | Raise similarity_threshold to 0.70 |
| Slow performance | Use --features parallel --release |
| Memory issues | Reduce batch_size |
MIT OR Apache-2.0