---
title: 'Tree-MNIST: Benchmark for Tree-Structured Data'
url: https://www.emergentmind.com/topics/tree-mnist
type: topic
---

# Tree-MNIST: Benchmark for Tree-Structured Data

to=arxiv_search.search  彩神争霸大发_json code ：
{"query":"Tree-MNIST OR MNIST-Gen OR \"The Tree-SNE Tree Exists\" OR TreeSkel", "max_results": 10, "sort_by": "submittedDate", "sort_order": "descending"}Japgollyassistant to=arxiv_search.search კომენტary  天天中彩票在 code  微信天天中彩票՞ւ?
to=arxiv_search.search wureg_json code ացին് ＿久久爱ाद्धी؟
{"query":"Tree-MNIST OR MNIST-Gen OR \"The Tree-SNE Tree Exists\" OR TreeSkel","max_results":10,"sort_by":"submittedDate","sort_order":"descending"}
to=arxiv_search.search เงินไทยฟรี code  手机天天中彩票?
{"query":"\"Tree-MNIST\"","max_results":5}
to=arxiv.search  天天中彩票能_json code 的天天中彩票?
{"query":"Tree-MNIST","max_results":5}
to=arxiv_search 软件合法吗 code  天天中彩票篮球ి?
{"query":"Tree-MNIST","max_results":5}
Tree-MNIST denotes several related constructions in the cited arXiv literature rather than a single universally fixed object. Its most explicit and formalized meaning is a 4-class, 1500-image, \(28 \times 28\) grayscale dataset of trees generated by the MNIST-Gen pipeline, with labels Broadleaf Tree, Cactus, Coniferous Tree, and Palm [2507.11821]. In adjacent usage, the expression also functions analogically for MNIST-like settings in which tree structure is central: TreeSkel, a fine-grained benchmark of \(64 \times 64\) tree skeleton images [1901.03991]; graph-to-tree-to-image pipelines such as TreeRNN [2006.11825]; and the Tree-SNE view of MNIST, where a one-parameter family of embeddings forms a \((2+1)\)-dimensional tree over scale [2510.15014].

## 1. Terminological scope

In the cited literature, the expression appears in several distinct senses. One is a concrete dataset intended for low-resolution tree classification. Another is a benchmark design pattern: a compact, structurally rich “X-MNIST” for tree-like objects. A third is a representational or geometric construction in which MNIST itself is organized as a tree.

| Usage | Core object | Source |
|---|---|---|
| Tree-MNIST | 4-class \(28 \times 28\) grayscale tree dataset | [2507.11821] |
| “Tree-MNIST” benchmark analogue | TreeSkel: \(64 \times 64\) binary tree skeletons | [1901.03991] |
| Tree-MNIST-style representation | Graph \(\rightarrow\) tree \(\rightarrow\) image pipeline | [2006.11825] |
| Tree-MNIST as MNIST-through-scale | Tree-SNE tree of embeddings over \(\alpha\) | [2510.15014] |

The explicit dataset definition is the most literal usage. The other appearances are best understood as extensions of the same benchmark intuition: preserving MNIST-like compactness while introducing tree morphology, tree topology, or tree-valued multiscale structure.

## 2. Tree-MNIST as a generated vegetation dataset

Tree-MNIST is defined in MNIST-Gen as a 4-class labeled dataset
\[
\{(x_i, y_i)\}_{i=1}^N,\quad x_i \in \mathbb{R}^{28 \times 28},\quad y_i \in \{1,\dots,4\},
\]
where the labels correspond to Broadleaf Tree, Cactus, Coniferous Tree, and Palm [2507.11821]. The stated purpose is threefold: to provide a domain-specific MNIST-style benchmark for tree and vegetation classification; to demonstrate MNIST-Gen as a general pipeline for converting real-world hierarchical concepts into MNIST-style datasets; and to furnish a lightweight evaluation dataset when distributing a large, high-resolution tree dataset is impractical.

The dataset is built from a botanical hierarchy. The four main categories each contain three subcategories, giving 12 subcategories in total:

- **Broadleaf Tree**: Deciduous Broadleaf; Evergreen Broadleaf; Flowering Broadleaf.
- **Cactus**: Columnar Cactus; Barrel and Round Cactus; Branching and Pad Cactus.
- **Coniferous Tree**: Pine and Fir Trees; Spruce and Cedar; Juniper and Cypress.
- **Palm**: Fan Palm; Feather Palm; Coconut and Date Palm.

Each subcategory is associated with semantic characteristics. The cited examples include seasonal leaf drop, broad canopy, and autumn colors for deciduous broadleaf trees; tall vertical stems and ribbed surface for columnar cacti; needle leaves and conical or pyramidal shape for pine and fir trees; and radiating palmate fronds or pinnate leaves for distinct palm types [2507.11821]. These semantic descriptors are not ornamental metadata: they are encoded in the pipeline and guide automatic categorization.

The data acquisition stage is keyword-driven. Images are obtained via queries to the Unsplash API, and the framework is also tied in general to Unsplash and Kaggle. For Tree-MNIST, around 400 images per main class were collected before filtering and preprocessing. The final released dataset contains 1500 labeled images total, with balanced representation across subcategories. The train/validation split is 80/20, giving approximately 1200 training images and approximately 300 validation images [2507.11821].

## 3. Hierarchical semantics, reinforcement learning, and category-theoretic formulation

MNIST-Gen formalizes the hierarchy as
\[
\mathcal{H} = (\mathcal{C}, \mathcal{S}, \mathcal{A}),
\]
with \(\mathcal{C}\) the main categories, \(\mathcal{S}_i\) the subcategories under each \(c_i\), and \(\mathcal{A}_{i,j}\) the semantic characteristics attached to each subcategory [2507.11821]. For a raw image \(I\), the pipeline computes
\[
\text{Features}(I) = \{\mathbf{f}_{clip}, \mathbf{f}_{visual}, \mathbf{f}_{objects}\},
\]
where \(\mathbf{f}_{clip} \in \mathbb{R}^{512}\) is a CLIP image embedding from ViT-B/32, \(\mathbf{f}_{visual}\) contains brightness, contrast, and edge density, and \(\mathbf{f}_{objects}\) records CLIP zero-shot object presence scores. Categorization is driven by the semantic score
\[
\text{Score}(I, s_{i,j}) = \alpha \cdot \text{TextSim}(I, s_{i,j}) + \beta \cdot \text{CharSim}(I, \mathcal{A}_{i,j}) + \gamma \cdot \text{VisualSim}(I, s_{i,j}).
\]

The label exposed in the final Tree-MNIST dataset is the parent main class of the selected subcategory. Thus the released task is 4-way classification, but the generation process is informed by a 12-way internal semantic structure. This design is intended to preserve morphological diversity within each coarse class.

Selection and filtering are handled by a Deep Q-Learning agent. For each image, the agent chooses among three actions: keep in the predicted category, discard, or send to human review. The state includes CLIP features and semantic confidence, visual attributes, current class frequency for balancing, and similarity to already selected images to control redundancy. The reward is
\[
R(s, a) = \lambda_1 \cdot \text{SemanticConf}(s) + \lambda_2 \cdot \text{Entropy}(\text{ClassDist}) + \lambda_3 \cdot \text{ModelAcc} - \lambda_4 \cdot \text{Redundancy}.
\]
For Tree-MNIST specifically, the agent is described as discarding overexposed or overly similar samples based on semantic understanding while maintaining botanical diversity across subcategories, and as eliminating low-contrast or redundant samples [2507.11821].

The processing chain is additionally expressed as a composition of morphisms,
\[
T(x) = \mathcal{T}_n \circ \mathcal{T}_{n-1} \circ \cdots \circ \mathcal{T}_1(x),
\]
with stages consisting of CLIP-based semantic analysis, hierarchical categorization, resize to fixed dimension, background removal via U\(^2\)-Net, center crop, grayscale conversion, and binarization or normalization. The paper casts raw image datasets and MNIST-style datasets as categories linked by a functor \(F: \mathcal{I} \to \mathcal{M}\), with endofunctors describing augmentations and natural transformations comparing alternative pipelines [2507.11821]. In Tree-MNIST, this formalism is used to state that the dataset is not merely a collection of resized images but the output of a composable semantic pipeline.

## 4. Image format, evaluation protocol, and benchmark behavior

Tree-MNIST images are converted to MNIST-style grayscale at low resolution. The core preprocessing sequence is
\[
\begin{aligned}
x_{semantic} &= SemanticAnalysis(x_{rgb}) \\
x_{resized} &= Resize(x_{rgb}, 64, 64) \\
x_{crop} &= CenterCrop(x_{resized}, 28, 28) \\
x_{gray} &= \tfrac{1}{3}(x_{crop}^R + x_{crop}^G + x_{crop}^B) \\
x_{binary} &= \mathbb{I}[x_{gray} > \theta].
\end{aligned}
\]
The appendix also notes CLIP processing at \(224 \times 224\), a configurable final resolution that can be \(28 \times 28\) or \(64 \times 64\), weighted grayscale conversion \(0.299R + 0.587G + 0.114B\), and either Otsu’s method or an RL-learned threshold \(\theta\). Normalization to \([0,1]\) with \(\mu = 0.5, \sigma = 0.5\) is used for CNN training [2507.11821].

Benchmarking uses both a small CNN and classical machine-learning baselines on flattened \(28 \times 28\) images. The CNN has two \(3 \times 3\) convolution layers with 16 and 32 filters, each followed by ReLU and max pooling, then a fully connected layer with 64 units and a softmax output over \(K=4\) classes. Training uses Adam, learning rate \(0.001\), batch size 32, and 10 epochs [2507.11821].

On Tree-MNIST, the CNN attains 86.51% accuracy, precision 0.8742, recall 0.8651, and F1 score 0.8693. Random Forest reaches 82.73% accuracy, Gradient Boosting 81.95%, K-Nearest Neighbors 79.84%, and the remaining reported baselines are lower, down to 58.74% for Gaussian Naive Bayes [2507.11821]. The paper explicitly treats this as evidence that the task is nontrivial: even a relatively shallow CNN does not achieve the near-perfect accuracies typical on digit MNIST, because the tree images encode more complex morphology.

The reported confusion matrix shows strong diagonal values together with systematic errors. Broadleaf and Coniferous are confused in both directions, with 25 misclassifications each way. Palm is also confused with Cactus, including 21 Palm \(\rightarrow\) Cactus errors. The interpretation given is that silhouettes, partial views, and low-resolution crops can make some broadleaf and coniferous forms visually proximate, while fan palms and some columnar cacti can overlap morphologically under aggressive downsampling [2507.11821].

The authors further report that hierarchical semantic filtering combined with DQN reinforcement learning improves accuracy over random sampling by about 5–8 percentage points across datasets. A plausible implication is that Tree-MNIST’s difficulty is shaped not only by class semantics but also by curation quality: the benchmark is intended to be compact without being noisy.

## 5. TreeSkel and the fine-grained “Tree-MNIST” benchmark tradition

A different but closely related lineage is TreeSkel, introduced as a benchmark for fine-grained generative modelling of trees [1901.03991]. TreeSkel is not the same object as the 4-class Tree-MNIST dataset, but it is explicitly positioned relative to MNIST and described as serving the role that a “Tree-MNIST” would play for structurally complex tree shapes. Its content is 2D tree skeletons, i.e. medial axes of thin line drawings of trees, stored as \(64 \times 64\) binary images and later also treated as grayscale in generation. The dataset has 15,000 images, 15 tree species, and 1,000 images per class.

The 15 species are Acacia, Beech, Callistemon, Cedar, Chestnut, Elm, Japanese Maple, Kauri, Larch, Linden, Pine, Quaking Aspen, Small Maple, Teak, and White Birch. Data creation begins with artist-designed 3D tree models in Blender using the Sapling addon. Sapling parameters such as branching angles, numbers of branches, lengths, and curvature are randomly jittered around artist settings, producing 250 distinct 3D trees per species. Each 3D tree is then rendered from 4 randomly chosen viewpoints, with the camera at average human height and the field of view chosen to keep the entire tree in frame. The binary silhouettes are skeletonized by medial-axis extraction, and the underlying 3D models are constrained so that the trunk splits at most twice [1901.03991].

TreeSkel is presented as harder than MNIST because trees impose global structural constraints, long-range dependencies, and fine-grained twig-level detail. The cited failure modes of models that work well on MNIST are disconnected components, blobs, spurious lines, and blurred fine structure. To address these issues, the paper proposes SketchGen, a VAE-GAN hybrid with an LSTM-based encoder and decoder with attention, a CNN discriminator, 64 time steps, hidden size 256, latent dimensionality 100, a \(7 \times 7\) read attention window, and a \(12 \times 12\) write attention window [1901.03991].

Evaluation uses CNN-based false positive rates and a human perceptual study. SketchGen achieves 46.61 in the artefacts study, 50.24 in the realism study, and 52.11 in the user study, outperforming dcgan, vae-gan, and draw on this benchmark [1901.03991]. In this strand of work, “Tree-MNIST” is best understood not as a single named dataset but as a benchmark ideal: a manageable image domain in which success requires both global tree connectivity and fine local detail.

## 6. Tree-MNIST-style graph and tree representations

TreeRNN extends the same intuition from tree imagery to arbitrary graphs by first converting graphs into rooted BFS trees and then projecting those trees into image-like tensors suitable for conventional CNNs and RNNs [2006.11825]. The paper explicitly frames this as being “exactly the spirit of a ‘Tree-MNIST’ framework”: non-image structured data are converted into fixed-size 2D arrays whose “pixels” encode node and edge features together with hierarchical relations.

For a graph \(\mathcal{G} = \{V, E, X, Z\}\), the root is chosen as
\[
root = \arg\min_x \max_y H(x,y),
\]
where \(H(x,y)\) is the shortest-path distance from node \(x\) to node \(y\). A BFS spanning tree then imposes direction from the center node to peripheral nodes. The subsequent tree-to-image projection maps each tree level to a row, allocates each node a block of consecutive columns whose width depends on subtree size, aligns children under their parent, and inserts padding to separate sibling groups. The resulting dataset-wide image size is
\[
|\mathcal{I}| = |V|_{\max} \times D_{\max},
\]
with \(|V|_{\max}\) the maximum node count and \(D_{\max}\) the maximum tree depth in the dataset [2006.11825].

Each pixel stores node features and the edge features connecting the node to its parent, after which an MLP with 64 hidden units and ReLU feeds a 2D RNN architecture, TreeRNN, followed by global max-pooling and a fully connected classifier. Reported results are competitive with state of the art: on MUTAG, TreeRNN reaches \(94.74 \pm 5.55\%\); on PTC-MR, \(74.69 \pm 5.78\%\); and on NCI1, \(84.96 \pm 4.81\%\) [2006.11825]. The significance for Tree-MNIST is methodological rather than terminological. It suggests a reusable recipe for turning tree- or graph-structured objects into compact image benchmarks with explicit row/column semantics.

## 7. Tree-MNIST as a multiscale tree of MNIST embeddings

A further and conceptually distinct usage appears in Tree-SNE. There, “Tree-MNIST” means MNIST seen through the additional scale dimension of Tree-SNE rather than through tree imagery [2510.15014]. Instead of a single 2D t-SNE embedding, one obtains a one-parameter family of embeddings indexed by \(\alpha\), stacked into a \((2+1)\)-dimensional object whose branches encode refinement from coarse digit classes to fine handwriting styles.

Tree-SNE uses the kernel family
\[
K_\alpha(d) = \frac{1}{\bigl(1 + d^{2/\alpha}\bigr)^\alpha}, \qquad \alpha > 0,
\]
with \(\alpha = 1\) recovering standard t-SNE, \(\alpha \to \infty\) giving the Gaussian kernel of SNE, and \(\alpha < 1\) producing heavier tails. Embeddings are computed for a decreasing sequence \(\alpha^{(1)} > \alpha^{(2)} > \cdots > \alpha^{(m)}\), with each layer initialized from the previous one, and then stacked along the \(\alpha\)-axis. The zero set of the gradient map
\[
F(\alpha, y_1,\dots,y_n) = \left(\frac{\partial \mathcal{L}}{\partial y_1},\dots,\frac{\partial \mathcal{L}}{\partial y_n}\right)
\]
defines the Tree-SNE tree geometrically [2510.15014].

The main theorem states that, at a generic point in this zero set, the stationary embeddings form a smooth properly embedded submanifold of dimension
\[
1 + \frac{d(d+1)}{2},
\]
with \(\alpha\) nonconstant on the manifold. The paper interprets the \(d(d+1)/2\) term as rigid-motion invariance and the remaining dimension as genuine variation in scale. Degenerate cases form a measure-zero set, so the tree exists generically [2510.15014].

Applied to MNIST, the result is a tree in which lower layers, corresponding to larger \(\alpha\), show thick digit-level branches, while smaller \(\alpha\) yields progressively finer subbranches associated with handwriting styles. The cited description includes examples such as curved versus angular “2”, open versus closed “4”, and different styles of “9”. In this sense, Tree-MNIST is neither a classification dataset nor a generative benchmark. It is a continuous multiscale visualization object in which MNIST’s cluster structure becomes explicitly tree-like.

Across these usages, Tree-MNIST names a shared research ambition: to preserve the compactness and experimental convenience associated with MNIST while replacing digit simplicity with tree morphology, tree topology, or tree-organized multiscale structure. The concrete 4-class dataset of MNIST-Gen is the most literal realization of that ambition [2507.11821]; TreeSkel and TreeRNN broaden it into benchmark and representation design [1901.03991; 2006.11825]; and Tree-SNE shows that MNIST itself can be transformed into a genuine tree over scale [2510.15014].

Source: https://www.emergentmind.com/topics/tree-mnist