SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.07837 · 2026

Approximation-Free Differentiable Oblique Decision Trees

Arvind Easwaran, Subrat Panda

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.07837.json · badge: /api/ran/2605.07837.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
CPS-research-group/dtsemnet community
Papers with Code archive
6 ran · 0 no recorded run
FunctionStatusWhere it lives
DTSemNet Ran
ran on a synthesized input · constructed an object; no result was computed
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("47653a2e39a62076")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DTSemNet: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np
import math

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'in_dim': 8,
    'out_dim': 4,
    'is_regression': False,
    'height': 2,
    'over_param': [1.5, 2.0],
    'linear_control': False,
    'wt_init': False,
    'reg_hidden': 0,
    'custom_leaf': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DTSemNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DTSemNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MaxPoolLayer Ran
ran on a synthesized input · constructed an object; no result was computed
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("c731c4aacddd8bf2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MaxPoolLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import torch.nn as nn

torch.manual_seed(0)

# The MaxPoolLayer.__init__ takes leaf_actions as a parameter
# It converts leaf_actions to a numpy array, finds unique actions, and groups indices
# For testing, we need a simple list/array of actions that will create multiple groups

leaf_actions = [0, 1, 0, 1, 2]

ARGS = {
    'leaf_actions': leaf_actions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MaxPoolLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MaxPoolLayer output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Sparser1 Ran
ran on a synthesized input · constructed an object; no result was computed
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("4c77de44c8e5d42f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Sparser1: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Sparser1.forward takes input tensor and returns one-hot encoded output
# The backward just returns a clone of grad_output
# So we need a 2D tensor (batch_size, num_classes)

input_tensor = torch.randn(2, 4, requires_grad=True)

ARGS = {
    'input': input_tensor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sparser1 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Sparser1 output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
genDT Ran
ran; our contract draft was wrong, not the code
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("347b723f8647f1b6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import math

# Call the function to understand its parameters
def genDT(dim_in=784, dim_out=10, num_leaf=8, custom_leaf=None):
    """
    User defined DT for Lunar Lander environment. Returns node and leaf weights which represent a DT.

    Lunar lander with 7 internal nodes and 8 controllers

    Returns:
        dim_in: State dimension
        dim_out: Action dimension
        W: Node weights
        B: Node biases
        init_leaves: Leaf nodes
    """
    num_nodes = num_leaf - 1
    W = np.random.randn(num_nodes, dim_in)
    B = np.random.randn(num_nodes)
    
    def generate_complete_binary_tree(num_leaf, dim_out):
        leaf_action = [0] * dim_out
        height = math.ceil(math.log2(num_leaf))
        leaf_nodes_lists = []
        stack = [(0, [], [])]
        controller_num = 0
        while stack:
            node, left_parents, right_parents = stack.pop()
            left_child = 2 * node + 1
            right_child = 2 * node + 2
            if len(left_parents) + len(right_parents) >= height:
                leaf_act = leaf_action.copy()
                leaf_act[controller_num] = 1
                controller_num += 1
                if controller_num == dim_out:
                    controller_num = 0
                leaf_nodes_lists.append([left_parents, right_parents, leaf_act])
            else:
                stack.append((right_child, left_parents.copy(), right_parents + [node]))
                stack.append((left_child, left_parents + [node], right_parents.copy()))
        assert len(leaf_nodes_lists) == num_leaf, 'The number of leaf nodes is not correct'
        return leaf_nodes_lists
    
    def generate_complete_binary_tree_custom(num_leaf, dim_out, custom_leaf_actions):
        leaf_action = [0] * dim_out
        height = math.ceil(math.log2(num_leaf))
        leaf_nodes_lists = []
        stack = [(0, [], [])]
        controller_num = 0
        while stack:
            node, left_parents, right_parents = stack.pop()
            left_child = 2 * node + 1
            right_child = 2 * node + 2
            if len(left_parents) + len(right_parents) >= height:
                leaf_act = leaf_action.copy()
                leaf_act[custom_leaf_actions[controller_num]] = 1
                controller_num += 1
                leaf_nodes_lists.append([left_parents, right_parents, leaf_act])
            else:
                stack.append((right_child, left_parents.copy(), right_parents + [node]))
                stack.append((left_child, left_parents + [node], right_parents.copy()))
        assert len(leaf_nodes_lists) == num_leaf, 'The number of leaf nodes is not correct'
        return leaf_nodes_lists
    
    if custom_leaf:
        assert len(custom_leaf) == num_leaf, 'The number of leaf nodes is not correct'
        init_leaves = generate_complete_binary_tree_custom(num_leaf=num_leaf, dim_out=dim_out, custom_leaf_actions=custom_leaf)
    else:
        init_leaves = generate_complete_binary_tree(num_leaf=num_leaf, dim_out=dim_out)
    return (dim_in, dim_out, W, B, init_leaves)


# Set up arguments for the function
ARGS = {
    'dim_in': 10,
    'dim_out': 4,
    'num_leaf': 8,
    'custom_leaf': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_complete_binary_tree Ran
ran; our contract draft was wrong, not the code
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("12ff2bfb10430df1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

ARGS = {
    "num_leaf": 8,
    "dim_out": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_complete_binary_tree_custom Ran
ran; our contract draft was wrong, not the code
CPS-research-group/dtsemnet/src/dtsemnet.py
code served (permissive licence) · get_code("cada2bb1f146aae7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

# Analyze the function:
# - num_leaf: integer, number of leaf nodes
# - dim_out: integer, dimension of output
# - custom_leaf_actions: list/sequence of integers with length num_leaf
#   (indexed by controller_num which goes up to num_leaf)

# The function builds a binary tree structure and creates leaf nodes.
# It accesses custom_leaf_actions[controller_num] where controller_num ranges from 0 to num_leaf-1
# dim_out is used to create a zero vector of that size
# num_leaf determines the height and number of leaf nodes to generate

ARGS = {
    "num_leaf": 4,
    "dim_out": 5,
    "custom_leaf_actions": [0, 1, 2, 3]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Decision Trees (DTs) are widely used in safety-critical domains such as medical diagnosis, valued for their interpretability and effectiveness on tabular data. However, training accurate oblique DTs is challenging due to complex optimization landscapes and overfitting risks, particularly in regression. Recent advances have introduced differentiable formulations that enable gradient-based training and joint optimization of decision boundaries and leaf regressors. Yet, existing approaches typically rely on approximations, either through probabilistic softening of boundaries (soft DTs) or quantized gradients such as the Straight-Through Estimator (STE). To overcome these limitations, we propose DTSemNet, a novel, semantically equivalent, and invertible representation of hard oblique DTs as neural networks. DTSemNet enables end-to-end training with standard gradient descent, eliminating the need for approximations in both classification and regression. While classification aligns naturally with this formulation, regression remains challenging due to the joint optimization of internal nodes and leaf regressors. To address this, we analyze the limitations of STE and introduce an annealed Top-k method that provides accurate gradient signals without approximation. Extensive experiments on classification and regression benchmarks show that DTSemNet-trained oblique DTs outperform state-of-the-art differentiable DTs. Furthermore, we demonstrate that DTSemNet can serve as programmatic DT policies in reinforcement learning environments, thereby broadening their applicability.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.07837")
get_code_for_paper("2605.07837")
have("2605.07837")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.07837.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.07837.svg)](https://syntology.ai/paper/2605.07837)

Connect an agent — have() is free.