Skip to content

highFIS

highFIS is a modern PyTorch library for high-dimensional Takagi-Sugeno-Kang (TSK) fuzzy systems. It delivers differentiable, trainable fuzzy inference for classification and regression, with sklearn-compatible estimators for fast experimentation.

Why highFIS?

  • Built for high-dimensional data and numerical stability.
  • Supports adaptive and gated fuzzy inference, including feature selection and rule extraction.
  • Includes HDFIS variants for product T-norm and minimum T-norm high-dimensional inference.
  • Ships sklearn-compatible estimators (*Classifier / *Regressor) for every model family.
  • Works seamlessly with Pipeline, GridSearchCV, and standard scikit-learn workflows.

High-level overview

highFIS models combine:

  • differentiable membership functions for antecedent fuzzification,
  • configurable rule bases and T-norm aggregation,
  • normalized rule weights via defuzzification,
  • built-in metrics and evaluation utilities for regression and classification,
  • task-specific consequent layers for classification or regression.

Use a model class from highfis.models for custom PyTorch pipelines, or import an estimator directly from highfis for sklearn-compatible training.

Quick Start

pip install highfis
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from highfis import HTSKClassifier

# 1. Generate synthetic data
X, y = make_classification(n_samples=800, n_features=10, n_informative=8, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42)

# 2. Scale features (essential for fuzzy membership functions)
scaler = MinMaxScaler()
X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)

# 3. Fit the high-dimensional HTSK classifier
clf = HTSKClassifier(
    n_mfs=3,                  # Number of clusters (3 fuzzy rules)
    mf_init="kmeans",         # Initialise MFs using K-Means clustering
    epochs=100,
    learning_rate=0.01,
    random_state=42,
)
clf.fit(X_train_scaled, y_train)

# 4. Evaluate performance
test_accuracy = clf.score(X_test_scaled, y_test)
print(f"Test accuracy: {test_accuracy:.2%}")

Models Available

highFIS includes the following concrete TSK model families:

  • TSK — vanilla TSK with product antecedent aggregation and sum-based normalization.
  • HTSK — high-dimensional TSK with geometric mean aggregation and log-space softmax normalization.
  • LogTSK — inverse-log normalization of log-domain rule weights for stable high-dimensional inference.
  • HDFIS — high-dimensional inference with both product-DMF aggregation (HDFIS-prod) and minimum frozen-antecedent inference (HDFIS-min).
  • DombiTSK — Dombi parametric aggregation with a learnable shape parameter.
  • ADMTSK — adaptive Dombi TSK with dimension-dependent Gaussian membership functions.
  • AYATSK — Yager-style aggregation for more flexible antecedent behavior.
  • ADATSK — adaptive softmin aggregation with dynamic rule weighting.
  • ADPTSK — adaptive double-parameter softmin aggregation with stable normalized rule weights.
  • FSRE-ADATSK — gated feature selection and rule extraction inside an adaptive inference pipeline.
  • DGTSK — double-gated training for simultaneous feature selection and rule extraction.
  • DGALETSK — adaptive Ln-Exp softmin with embedded feature and rule gates for sparse high-dimensional modeling.
  • MHTSK — multihead sparse subantecedents for high-dimensional rule extraction and scalable TSK learning.

Each model family exposes both classifier and regressor variants.

Documentation

Topic Description
Quick Start Installation and first model run.
Model Families Guide to the 13 available neuro-fuzzy model architectures.
User Guides Guides for optimization, introspection, initialization, and tuning.
API Reference Complete reference documentation for all public modules.
Estimators sklearn-compatible estimator reference.
Models Model constructors and usage notes.
Layers Layer primitives for fuzzy pipelines.
Defuzzifiers Normalization strategies.
T-Norms Built-in and custom aggregation functions.
Memberships Membership functions for antecedents.
Metrics Regression and classification evaluation utilities.
Base TSK Unified training loop and shared logic.
Protocols Structural typing interfaces.
Persistence Estimator checkpoint serialization and load validation.
Contributing Development setup and contribution guide.

Get Started

Import estimators directly from highfis for sklearn-compatible usage, or access PyTorch model classes via highfis.models for custom training loops.