Skip to content

Commit 8bdb374

Browse files
committed
Add anomaly detection Graph visualizations to Markdown summary
1 parent 44cdfa5 commit 8bdb374

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

domains/anomaly-detection/summary/anomalyDetectionSummary.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ anomaly_detection_deep_dive_report() {
7575
echo "### 2.${report_number} ${language} ${nodeLabel}" > "${detail_report_include_directory}/DeepDiveSectionTitle.md"
7676
echo "" > "${detail_report_include_directory}/empty.md"
7777
cp -f "${ANOMALY_DETECTION_SUMMARY_DIR}/report_no_anomaly_detection_data.template.md" "${detail_report_include_directory}/report_no_anomaly_detection_data.template.md"
78+
cp -f "${ANOMALY_DETECTION_SUMMARY_DIR}/report_no_anomaly_detection_graphs.template.md" "${detail_report_include_directory}/report_no_anomaly_detection_graphs.template.md"
79+
80+
# Copy
7881
cp -f "${detail_report_directory}/Top_anomaly_features.md" "${detail_report_include_directory}" || true
82+
cp -f "${detail_report_directory}/GraphVisualizations/GraphVisualizationsReferenceForSummary.md" "${detail_report_include_directory}/GraphVisualizationsReference.md" || true
7983

8084
# Assemble Markdown-Includes containing plots depending on their availability (fallback empty.md)
8185
if [ -f "${detail_report_directory}/Anomaly_feature_importance_explained.svg" ] ; then
@@ -103,6 +107,11 @@ anomaly_detection_deep_dive_report() {
103107
cat "${detail_report_directory}/report_deep_dive.template.md" | "${MARKDOWN_SCRIPTS_DIR}/embedMarkdownIncludes.sh" "${detail_report_include_directory}" > "${detail_report_directory}/report_deep_dive_with_vars.md"
104108
sed "s/{{deep_dive_directory}}/${detail_report_directory_name}/g" "${detail_report_directory}/report_deep_dive_with_vars.md" > "${detail_report_directory}/report_deep_dive_${report_number}.md"
105109

110+
# Add a page break at the end of a deep dive section
111+
{
112+
echo "--"
113+
} >> "${detail_report_directory}/report_deep_dive_${report_number}.md"
114+
106115
rm -rf "${detail_report_directory}/report_deep_dive_with_vars.md"
107116
rm -rf "${detail_report_directory}/report_deep_dive.template.md"
108117
rm -rf "${detail_report_include_directory}"

domains/anomaly-detection/summary/report.template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,24 @@ Each abstraction level includes anomaly statistics, SHAP feature importance, arc
104104

105105
---
106106

107+
### 📕 Graph Visualizations (Archetype-Level Network Views)
108+
109+
| Plot | Description | Best For | Adds | Why |
110+
|------|--------------|----------|------|-----|
111+
| **Top Hub Graph Visualization** | Displays the most connected node (e.g., **#1 Hub**) at the center, surrounded by its direct dependencies. Incoming nodes show who is dependent on the hub. | Understanding highly connected code units or components that serve as central integrators. | Highlights nodes that act as major dependency aggregators. | Helps detect over-centralized modules or potential architectural bottlenecks. |
112+
| **Top Bottleneck Graph Visualization** | Shows the node with the highest betweenness centrality (e.g., **#1 Bottleneck**) and its local neighborhood. | Identifying code units that control information or dependency flow. | Emphasizes nodes that mediate critical paths between modules. | Reveals single points of failure or routing constraints in dependency flow. |
113+
| **Top Authority Graph Visualization** | Centers the most authoritative node (e.g., **#1 Authority**) with incoming and outgoing links from dependent nodes with high PageRank and emphasized PageRank to ArticleRank difference. | Detecting key knowledge or functionality providers. | Highlights components with high centrality. | Indicates structural or semantic “sources of truth” in the system. |
114+
| **Top Bridge Graph Visualization** | Displays a node acting as a structural bridge between clusters (e.g., **#1 Bridge**) and its cross-cluster connections based on node embeddings encoding the Graph structure. | Understanding cross-cutting dependencies between modules. | Reveals links connecting distinct architectural domains. | Useful for spotting boundary leaks or undesired coupling between subsystems. |
115+
| **Top Outlier Graph Visualization** | Centers an unusual or isolated node (e.g., **#1 Outlier**) that can hardly be assigned to a cluster and visualizes its sparse or unexpected dependency patterns. | Identifying structurally or behaviorally anomalous nodes. | Highlights nodes with rare or unexpected connection patterns. | Helps pinpoint code units that deviate from established dependency norms. |
116+
117+
> **Note:**
118+
> - In all Graph Visualizations, the **central node** represents the selected *Top Archetype* (e.g., *Top 1 Hub*).
119+
> - **Darker nodes** indicate *incoming dependencies*, while **brighter nodes** indicate *outgoing dependencies*.
120+
> - **Emphasized nodes** (thicker borders or larger size) mark particularly influential or anomalous dependencies, depending on the archetype.
121+
> - These visualizations are most effective for interpreting *local dependency topology* and *role significance* of key components.
122+
123+
---
124+
107125
### 📔 Summary Categories
108126

109127
| Category | Included Plots | Typical Usage |
@@ -114,6 +132,7 @@ Each abstraction level includes anomaly statistics, SHAP feature importance, arc
114132
| **Cluster Noise Analysis** | Cluster Noise (3 types) | Identify special structural anomalies |
115133
| **Feature Distributions** | Betweenness, Clustering, Rank Difference | Assess feature-based structure patterns |
116134
| **Feature Relationships** | Clustering vs PageRank | Evaluate global vs local influence balance |
135+
| **Archetype Graphs** | Top Hub / Bottleneck / Authority / Bridge / Outlier | Visualizing key dependency roles and structural importance |
117136

118137
---
119138

domains/anomaly-detection/summary/report_deep_dive.template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#### Archetype Distribution
1414

15-
<!-- include:DeepDiveArchetypes.md|report_no_data_info.template.md -->
15+
<!-- include:DeepDiveArchetypes.md|report_no_anomaly_detection_data.template.md -->
1616

1717
#### Top anomalies with their local contributing features (via SHAP)
1818

@@ -31,3 +31,5 @@ See [Plot Interpretation Guide](#3-plot-interpretation-guide) on how to read the
3131
<!-- include:report_deep_dive_cluster_noise_plots.md|empty.md -->
3232

3333
<!-- include:report_deep_dive_feature_plots.md|report_no_anomaly_detection_data.template.md -->
34+
35+
<!-- include:GraphVisualizationsReference.md|report_no_anomaly_detection_graphs.template.md -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
⚠️ _No anomaly detection graph visualizations for this level._

0 commit comments

Comments
 (0)