﻿# SNAP Facebook circles: ego-local labels and feature columns need explicit alignment

Use SNAP Facebook ego-network data with per-ego circle identities, feature-name mappings and distinct combined-graph semantics, preserving anonymized profile meaning in graph ML.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-snap-facebook-ego-circle-local-feature-space/
Language: en

## Keep the ego context with every circle

The [SNAP Facebook dataset page](https://snap.stanford.edu/data/egonets-Facebook.html) describes ego networks, profile features and social circles. A circle is associated with a particular ego user, not automatically a globally aligned class such as the same named community across every file. Keep the ego identifier in the circle key. Otherwise a graph classifier can merge unrelated local groups merely because their names or positions look similar in separately exported annotations.

## Align feature columns by the supplied mapping

The [original file README](https://snap.stanford.edu/data/readme-Ego.txt) separates feature values from feature-name files. Use that mapping when combining ego networks rather than concatenating local feature arrays by position. An identical column index can represent a different profile attribute in another file. Preserve the source column and mapped vocabulary position so an inspection example can trace exactly which feature a model consumed after batch construction or graph merging.

## Distinguish the ego node from listed neighbors

The file contract describes a separately represented ego and its associated features. A combined network and an individual ego-network file therefore require different construction assumptions. Adding the ego and its connections can be necessary for one representation while duplicating structure in another that already includes them. Record the artifact used and validate the selected node population. Do not infer the intended construction solely from the total node count of a processed graph.

## Preserve anonymized feature interpretation

The dataset page explains that feature interpretation has been obscured as part of anonymization. A model can compare feature patterns without knowing the original real-world category represented by an anonymized value. Do not invent a semantic label for that category when explaining learned feature importance. The [PyG SNAP loader source](https://pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/datasets/snap_dataset.html) provides a concrete implementation context for local feature mapping and circle batching, which should be checked for the chosen version rather than assumed universal.

## Define the learning population explicitly

An experiment on local circles, a link-prediction task on the combined graph and generalization to an unseen ego are different protocols. Preserve identity and overlap information when choosing a split. The existing [entity-group guide](/journal/data-guide-entity-group-split-design/) and [typed-graph guide](/journal/data-guide-openaire-research-product-graph/) support related grouping and schema decisions. A useful result names the ego context, feature alignment and graph construction rather than treating all files labeled Facebook as an interchangeable community-detection benchmark.
