💡 [REQUEST] - Proposal: Add Tutorial on Differentiable Decision Forests (DNDF-style)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
🚀 Describe the improvement or the new tutorial
Proposal: Add a Tutorial/Documentation Example on Differentiable Decision Forests
Overview
This is a proposal to add a well-documented example or tutorial demonstrating a Differentiable Decision Forest model in PyTorch — inspired by the Deep Neural Decision Forests paper (Kontschieder et al., ICCV 2015).
The goal is not to introduce a new torch.nn module, but rather to show how such a model can be implemented using native PyTorch operations in a transparent and educational way.
Why This?
- Combines the interpretability of decision trees with the feature learning power of neural networks.
- Uses soft routing (sigmoid decisions) and learnable leaf distributions (softmax) to allow end-to-end backpropagation.
- Offers an alternative to traditional ensembles or black-box classifiers, especially for tabular and hybrid domains.
What the Tutorial Would Include
- Overview of the model structure (CNN → decision trees)
- How to implement soft decisions and routing probabilities (μ) with PyTorch ops like
sigmoid,softmax,einsum,gather, etc. - Joint optimization of routing and leaf distributions
- Training on MNIST or tabular datasets
- Emphasis on "Simple over Easy" — no custom abstractions
Reference
Final Note
This is not a request to add this as a built-in PyTorch module — in fact, that might go against PyTorch's Simple over Easy philosophy.
Instead, this would be best suited as a community-contributed tutorial or example in the official PyTorch Tutorials repository or documentation site.
Extended Note
I'm currently in the middle of university exams and may not be able to actively contribute for a few weeks — but I’d be very interested in helping develop the tutorial afterwards.
Existing tutorials on this topic
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PyTorch Tutorials repository and the proposed Differentiable Decision Forests example described in the issue. Use the Deep Neural Decision Forests paper as the reference, and cover the CNN-to-tree structure, soft routing, learnable leaf distributions, joint optimization, and training on MNIST or tabular data; done means a clear, working educational tutorial.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100