In the world of tabular data, we often face a frustrating trade-off. On one hand, simple linear regression is beautifully interpretable but frequently fails to capture complex, non-linear relationships. On the other hand, "black-box" models like XGBoost or Deep Neural Networks (DNNs) achieve state-of-the-art accuracy but offer little insight into why they make specific predictions.
A new paper proposes a middle path: Covariate-Guided Clusterwise Linear Regression (CG-CLR). By combining a neural "router" with a "codebook" of linear experts, the authors have created a framework that is as flexible as a neural network but as transparent as a set of local linear models.
TL;DR
CG-CLR is an end-to-end framework that jointly learns to partition data into clusters and fit local linear models to each. By using a neural proxy network to guide data to a "codebook" of linear experts, it achieves accuracy comparable to black-box models while remaining interpretable and providing rigorous mathematical guarantees for convergence and generalization.
What Problem Does This Paper Address?
Many real-world datasets are "piecewise linear." For example, the relationship between house size and price might be linear within a specific neighborhood but vary significantly across different cities.
Clusterwise Linear Regression (CLR) was designed for this, but it has historically suffered from two major flaws:
- The "Unseen Data" Problem: Traditional CLR methods often optimize cluster assignments as latent variables. This works for training data, but there’s no clear rule for how to assign a brand-new, unseen data point to a cluster at test time.
- Heuristic Training: Existing "Mixture of Experts" (MoE) approaches often rely on soft-gating or heuristics that lack formal convergence guarantees, leading to unstable training.
Methods
The authors introduce CG-CLR, which unifies clustering and regression into a single gradient-based optimization loop.
The architecture consists of two main parts:
- The Proxy Network ($W_\phi$): A small multi-layer perceptron (MLP) that acts as a "router." For any input $x$, it predicts a "proxy" coefficient vector.
- The Codebook ($\tilde{\mathbb{W}}$): A set of $K$ discrete linear regressors (the "experts").
How it works: During training, an input is "hard-routed" to the codebook expert whose prediction is closest to the proxy network's prediction. This is essentially Vector Quantization (VQ) applied to regression.
To make this work, they use a Dual Loss function:
- Prediction-fit Loss: Ensures the selected codebook expert accurately predicts the target value.
- Alignment Loss: Pulls the proxy network's predictions and the codebook's predictions closer together, ensuring the "routing" rule becomes stable over time.
Crucially, the authors provide a Lyapunov-based proof showing that this alternating minimization procedure yields a monotone descent of the empirical risk—meaning the model is mathematically guaranteed to converge under mild assumptions.
Datasets
The model was evaluated on:
- Synthetic Data: A 2D piecewise-linear surface designed to test if the model can reconstruct oblique (non-axis-aligned) boundaries.
- 7 Real-World Tabular Benchmarks: CONDUCT (Superconductivity), HOUSING (California Housing), BIKE (Bike-sharing), ELECTRICAL (Grid stability), PLANT (Power plant energy), WINE (Wine quality), and CONCRETE (Concrete strength).
Key Insights and Ideas
- Oblique Boundaries: Unlike tree-based models (like Random Forests or LDT), which are forced to split data along axis-aligned lines (e.g., "if $x_1 > 5$"), CG-CLR can learn complex, diagonal boundaries in the input space.
- The Complexity Dial: By adjusting the number of clusters ($K$), users can choose their level of granularity. At $K=1$, it’s a global linear model; as $K$ approaches the number of samples ($N$), it becomes an instance-wise fit.
- Statistical Rigor: The authors derive an F-test statistic for the model. This allows researchers to use classical statistical tests to determine the "optimal" number of clusters, preventing overfitting by only adding a new expert if it significantly improves the fit.
- PAC-style Bounds: The paper provides a theoretical "excess-risk bound," giving a mathematical guarantee on how well the model will generalize to unseen data.
Key Results
- Synthetic Perfection: On synthetic data, CG-CLR exactly reconstructed the underlying linear surfaces, whereas tree-based methods struggled with the diagonal boundaries.
- Competitive Performance: On real-world benchmarks, CG-CLR consistently outperformed other CLR and MoE variants.
- Matching the Black Box: In several datasets (like BIKE and ELECTRICAL), CG-CLR achieved RMSE (Root Mean Square Error) scores that were statistically indistinguishable from or better than powerful black-box models like XGBoost and CatBoost.
- Efficiency: Despite the neural components, CG-CLR scales gracefully. Training time increases only marginally as the number of experts ($K$) grows, making it much more efficient than "Dense MoE" approaches.
Limitations and Future Work
- The "Gap" Assumption: The theoretical proofs rely on a "minimum prediction gap" between experts. In extremely noisy datasets where experts' predictions overlap heavily, the routing might become less stable (though empirical results suggest the model is robust even when this gap is small).
- Expert Complexity: Currently, the experts are simple linear regressors. The authors suggest that future work could involve "sparse" experts (using Lasso) or even shallow non-linear experts (like splines) to capture even more nuance while maintaining some level of interpretability.
- Proxy Interpretability: While the experts are interpretable, the "router" (the proxy network) is still a neural network. Understanding the "logic" of the routing remains a challenge common to all MoE architectures.
Summary updated