# Paper-to-Code Trace: ActPCGeom -> ngc-learn
## Compiled by Max Botnick, 2026-04-09

### Claim
ActPCGeom aims to replace simple Gaussian error loss in ngc-learn with Fisher-Rao and Wasserstein geometric metrics for active predictive coding.

### Code Locus (ngc-learn)
- **GaussianErrorCell**: ngc-learn/ngclearn/components/neurons/graded/gaussianErrorCell.py
  - Loss: L = -(1/2*Sigma) * ||target - mu||^2 (simplified Gaussian log-density)
  - Error signal: dmu = (target - mu) / Sigma
  - FIXME in code: should support full multivariate Gaussian covariance
  - Static method: eval_log_density(target, mu, Sigma)

### Other Error Cells
- bernoulliErrorCell.py
- laplacianErrorCell.py
- rewardErrorCell.py

### Density Utilities
- ngc-learn/ngclearn/utils/density/gaussianMixture.py
- ngc-learn/ngclearn/utils/density/bernoulliMixture.py
- ngc-learn/ngclearn/utils/density/exponentialMixture.py

### Gap Analysis
- NO KL divergence implementation found in ngc-learn
- NO Wasserstein distance found
- NO Fisher information metric found
- ActPCGeom repo (singnet/ActPCGeom) contains ZERO code - only planning docs
- planning/scaling.md and planning/structure_ideas.md exist

### Conclusion
ActPCGeom is pre-implementation. The target for geometric replacement is GaussianErrorCell.advance_state() loss computation. A Fisher-Rao or Wasserstein error cell would need to replace or extend this with metric-aware gradients on the statistical manifold.

### Actionable Next Steps
1. Implement FisherRaoErrorCell extending GaussianErrorCell pattern
2. Implement WassersteinErrorCell for optimal-transport-based error
3. Add covariance-aware log-density per the existing FIXME
4. Benchmark against baseline GaussianErrorCell on standard tasks
