1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Learned Restriction Maps - GNN-based ρ Learning
//!
//! This module provides integration with `ruvector-gnn` for learning restriction maps
//! (ρ) from data. Instead of manually specifying how node states should be projected
//! for coherence checking, we learn these projections from known-coherent examples.
//!
//! # Architecture
//!
//! The learned restriction map uses:
//!
//! - **GNN layers**: Neural network layers for the projection function
//! - **EWC (Elastic Weight Consolidation)**: Prevents catastrophic forgetting
//! - **Replay buffer**: Experience replay for stable learning
//! - **LR scheduling**: Adaptive learning rates
//!
//! # Key Types
//!
//! - [`LearnedRestrictionMap`]: GNN-based restriction map
//! - [`RestrictionMapConfig`]: Configuration for learning
//! - [`TrainingBatch`]: Batch of training examples
//!
//! # Example
//!
//! ```rust,ignore
//! use prime_radiant::learned_rho::{LearnedRestrictionMap, RestrictionMapConfig};
//!
//! // Create learned restriction map
//! let mut rho = LearnedRestrictionMap::new(RestrictionMapConfig {
//! input_dim: 128,
//! output_dim: 64,
//! ..Default::default()
//! });
//!
//! // Apply learned projection
//! let projected = rho.apply(&input_state);
//!
//! // Train on known-coherent examples
//! rho.train(&source, &target, &expected_residual);
//!
//! // Consolidate knowledge (compute Fisher information)
//! rho.consolidate();
//! ```
pub use ;
pub use ;
pub use ;
pub use ;