﻿# TUDataset: absent node attributes make feature construction part of the model

Compare TU graph benchmarks with explicit node-label, attribute and synthetic-feature policies, preserving graph membership and cleaned-versus-original dataset identity.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-tudataset-optional-attributes-feature-construction/
Language: en

## Read which feature files are actually available

The [TU dataset format](https://chrsmrrs.github.io/datasets/docs/format/) separates graph membership, graph targets and optional node or edge information. A missing attribute file is not automatically a broken download or a matrix of unknown values that should be filled from labels. Identify the supplied inputs for the chosen dataset before choosing an encoder. A graph classification target belongs to the graph, while categorical node labels or continuous attributes, when supplied, are different data fields.

## Describe synthesized features explicitly

For a graph without supplied node attributes, a model can use constant features, degree encodings or another declared construction. These choices change the information available to the network. Degree-based features can expose structural information before message passing, while a constant vector does not distinguish nodes by the same rule. Hold the feature policy fixed when attributing an improvement to a new architecture, or make the construction change an explicit factor in the comparison.

## Check wrapper flags before assuming an input

The [PyG TU wrapper documentation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.datasets.TUDataset.html) exposes options controlling attribute inclusion and dataset variants. A locally available attribute need not be included in the default processed feature tensor. Inspect actual output fields and record loader settings. A model with fewer channels may reflect a different preprocessing configuration rather than an efficient replacement for the same input representation. Reproduce the intended feature contract before comparing parameter counts or scores.

## Preserve graph membership through indexing

The source format stores a graph-indicator mapping for nodes across the collection. Keep that mapping when splitting the block-structured adjacency into individual examples. A global node identifier is not automatically an index within its local graph. Validate a small graph with known node membership after relabeling, and ensure its target remains attached to the same example. An in-range edge index can still connect nodes from different graphs if the membership mapping was lost.

## Record the benchmark variant and evaluation policy

The [TU dataset paper](https://arxiv.org/abs/2007.08663) describes a collection of graph-learning benchmarks rather than a single universal data table. Original and cleaned variants can define different populations; preserve the selected artifact and any filtering. The existing [entity-group guide](/journal/data-guide-entity-group-split-design/) and [software reproducibility guide](/journal/software-stack-reproducibility/) support related split and environment records. Report graph population, target, feature construction and loader options together so a result describes a reproducible graph-classification experiment instead of only a familiar dataset label.
