# salmon1802/fcn architecture

> Architecture diagram of the GitHub repository salmon1802/fcn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/salmon1802/fcn
- Repository: https://github.com/salmon1802/fcn

## Overview

This repository is a FuxiCTR-based CTR prediction research implementation. Its main workflow loads an experiment configuration, prepares or loads dataset features, selects a model, trains it, evaluates validation and test data, and records metrics. The model zoo includes ECN, its full variant, FCNv1 and its full variant, FCNv2, and LCN. The runner’s calls are excerpted; data preparation and evaluation rely on FuxiCTR. Model relationships are shown only where the excerpts or README support them.

Main entry points: [`run_expid.py`](https://github.com/salmon1802/fcn/blob/KDD'26/run_expid.py) (Experiment runner), [`src/__init__.py`](https://github.com/salmon1802/fcn/blob/KDD'26/src/__init__.py) (Model exports), [`src/ECN.py`](https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN.py) (ECN), [`src/ECN_full.py`](https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN_full.py) (ECN full)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Experiment workflow"]
  node_runner["Experiment runner<br/>[run_expid.py]"]
  node_configs["Experiment configs"]
end

subgraph group_data["Data preparation"]
  node_feature_prep["Feature preprocessing"]
  node_feature_map["Feature map"]
  node_data_loader["H5 data loader"]
end

subgraph group_models["CTR model zoo"]
  node_registry["Model exports<br/>[__init__.py]"]
  node_ecn["ECN<br/>[ECN.py]"]
  node_ecn_full["ECN full<br/>[ECN_full.py]"]
  node_fcnv1["FCNv1<br/>[FCNv1.py]"]
  node_fcnv1_full["FCNv1 full<br/>[FCNv1_full.py]"]
  node_fcnv2["FCNv2<br/>[FCNv2.py]"]
  node_lcn["LCN<br/>[LCN.py]"]
end

subgraph group_results["Evaluation results"]
  node_metrics["Metrics output<br/>[run_expid.py]"]
end

node_researcher(("Researcher"))
node_fuxictr["FuxiCTR"]

node_researcher -->|"starts run"| node_runner
node_runner -->|"loads config"| node_configs
node_runner -->|"builds CSV data"| node_feature_prep
node_runner -->|"loads map"| node_feature_map
node_runner -->|"creates iterators"| node_data_loader
node_runner -->|"selects model"| node_registry
node_registry -->|"exports"| node_ecn
node_registry -->|"exports"| node_ecn_full
node_registry -->|"exports"| node_fcnv1
node_registry -->|"exports"| node_fcnv1_full
node_registry -->|"exports"| node_fcnv2
node_registry -->|"exports"| node_lcn
node_ecn -->|"extends BaseModel"| node_fuxictr
node_ecn_full -->|"extends BaseModel"| node_fuxictr
node_fcnv1 -->|"extends BaseModel"| node_fuxictr
node_fcnv1_full -->|"extends BaseModel"| node_fuxictr
node_fcnv2 -->|"extends BaseModel"| node_fuxictr
node_lcn -->|"extends BaseModel"| node_fuxictr
node_runner -->|"trains and evaluates"| node_fuxictr
node_runner -->|"writes metrics"| node_metrics

click node_runner "https://github.com/salmon1802/fcn/blob/KDD'26/run_expid.py"
click node_configs "https://github.com/salmon1802/fcn/tree/KDD'26/config"
click node_registry "https://github.com/salmon1802/fcn/blob/KDD'26/src/__init__.py"
click node_ecn "https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN.py"
click node_ecn_full "https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN_full.py"
click node_fcnv1 "https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv1.py"
click node_fcnv1_full "https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv1_full.py"
click node_fcnv2 "https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv2.py"
click node_lcn "https://github.com/salmon1802/fcn/blob/KDD'26/src/LCN.py"
click node_metrics "https://github.com/salmon1802/fcn/blob/KDD'26/run_expid.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_configs toneBlue
class node_feature_prep,node_feature_map,node_data_loader toneAmber
class node_registry,node_ecn,node_ecn_full,node_fcnv1,node_fcnv1_full,node_fcnv2,node_lcn toneMint
class node_metrics toneRose
class node_researcher,node_fuxictr toneIndigo
```

## Components

### Experiment workflow

- [Experiment runner](https://github.com/salmon1802/fcn/blob/KDD'26/run_expid.py): `run_expid.py`
- [Experiment configs](https://github.com/salmon1802/fcn/tree/KDD'26/config): `config`

### Data preparation

- **Feature preprocessing**
- **Feature map**
- **H5 data loader**

### CTR model zoo

- [Model exports](https://github.com/salmon1802/fcn/blob/KDD'26/src/__init__.py): `src/__init__.py`
- [ECN](https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN.py): `src/ECN.py`
- [ECN full](https://github.com/salmon1802/fcn/blob/KDD'26/src/ECN_full.py): `src/ECN_full.py`
- [FCNv1](https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv1.py): `src/FCNv1.py`
- [FCNv1 full](https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv1_full.py): `src/FCNv1_full.py`
- [FCNv2](https://github.com/salmon1802/fcn/blob/KDD'26/src/FCNv2.py): `src/FCNv2.py`
- [LCN](https://github.com/salmon1802/fcn/blob/KDD'26/src/LCN.py): `src/LCN.py`

### Evaluation results

- [Metrics output](https://github.com/salmon1802/fcn/blob/KDD'26/run_expid.py): `run_expid.py`

### Other components

- **Researcher**
- **FuxiCTR**

## Connections

- Researcher → Experiment runner: starts run (evidence: `run_expid.py`)
- Experiment runner → Experiment configs: loads config (evidence: `run_expid.py`)
- Experiment runner → Feature preprocessing: builds CSV data (evidence: `run_expid.py`)
- Experiment runner → Feature map: loads map (evidence: `run_expid.py`)
- Experiment runner → H5 data loader: creates iterators (evidence: `run_expid.py`)
- Experiment runner → Model exports: selects model (evidence: `run_expid.py`)
- Model exports → ECN: exports (evidence: `src/__init__.py`)
- Model exports → ECN full: exports (evidence: `src/__init__.py`)
- Model exports → FCNv1: exports (evidence: `src/__init__.py`)
- Model exports → FCNv1 full: exports (evidence: `src/__init__.py`)
- Model exports → FCNv2: exports (evidence: `src/__init__.py`)
- Model exports → LCN: exports (evidence: `src/__init__.py`)
- ECN → FuxiCTR: extends BaseModel (evidence: `src/ECN.py`)
- ECN full → FuxiCTR: extends BaseModel (evidence: `src/ECN_full.py`)
- FCNv1 → FuxiCTR: extends BaseModel (evidence: `src/FCNv1.py`)
- FCNv1 full → FuxiCTR: extends BaseModel (evidence: `src/FCNv1_full.py`)
- FCNv2 → FuxiCTR: extends BaseModel (evidence: `src/FCNv2.py`)
- LCN → FuxiCTR: extends BaseModel (evidence: `src/LCN.py`)
- Experiment runner → FuxiCTR: trains and evaluates (evidence: `run_expid.py`)
- Experiment runner → Metrics output: writes metrics (evidence: `run_expid.py`)
