EgoRA Diagnostics — Rotation geometry analysis and visualization for fine-tuned language models. Companion package for egora.
Project description
EgoRA Diagnostics
Companion package for egora.
This package installs egora with diagnostics dependencies (matplotlib, scipy) and re-exports the diagnostics API for convenience.
Installation
pip install egora-diagnostics
This is equivalent to:
pip install "egora[diagnostics]"
What You Get
- Rotation Geometry Analysis:
compute_head_geometry()— per-head rotation angles, learning mode classification - Interhead Diversity:
compute_interhead_diversity()— similarity matrix across attention heads - Publication-Quality Plots:
plot_rotation_report()— combined 4-panel report figure - CLI Tool:
egora diagnose base_model tuned_model --plot
Quick Start
from egora_diagnostics import (
compute_head_geometry,
compute_interhead_diversity,
save_geometry,
plot_rotation_report,
plot_rotation_heatmap,
plot_layer_profile,
plot_mode_distribution,
)
# Analyze rotation between base and fine-tuned model
results = compute_head_geometry(base_model, tuned_model)
print(f"Mean rotation: {results['theta_bar_deg']:.2f}°")
# Generate report
fig = plot_rotation_report(results)
fig.savefig("rotation_report.png", dpi=150)
Main Package
For the full EgoRA library (adapters, entropy governor, PEFT compatibility), install the main package:
pip install egora
See github.com/ArsSocratica/EgoRA for full documentation.
Citation
@article{dillerop2026rotation,
title={The Rotation-Retention Law: Knowledge Loss Is Proportional to
Representational Rotation in Fine-Tuned Language Models.
With EgoRA: Entropy-Governed Orthogonality Regularization
for Adaptation},
author={Dillerop, Mark},
year={2026},
note={Preprint}
}
License
AGPL-3.0-or-later with Academic Additional Permission. See LICENSE-ACADEMIC.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file egora_diagnostics-0.2.1.tar.gz.
File metadata
- Download URL: egora_diagnostics-0.2.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2707de1fdce24b94971291330936c79e9ffb2468e8b5927e788374ccbf96d931
|
|
| MD5 |
c4075f89557ca1012c91cebae98d6cb7
|
|
| BLAKE2b-256 |
d4fe387b539650e7c746cd3101b2bd207ba418f79476c618a9028c9ad4661817
|
File details
Details for the file egora_diagnostics-0.2.1-py3-none-any.whl.
File metadata
- Download URL: egora_diagnostics-0.2.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bddf239329688fccdfc3818cd248fb4d6a345f0afd7037a8784ba014499bbdb1
|
|
| MD5 |
9b102f4a3051c0e62448540a6e70b381
|
|
| BLAKE2b-256 |
0bfe532ae92704b56d5b31a0b87b4726611ba8d926a3641aa11536fe7fd3d840
|