Skip to content

Add GroupTransform module for differentiable group-wise time shift/scale/warp - #7

Open
denix56 wants to merge 1 commit into
mainfrom
codex/create-grouptransform-module-for-time-transformations
Open

Add GroupTransform module for differentiable group-wise time shift/scale/warp#7
denix56 wants to merge 1 commit into
mainfrom
codex/create-grouptransform-module-for-time-transformations

Conversation

@denix56

@denix56 denix56 commented Jan 22, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Add a learnable, differentiable group-wise temporal transform to enable per-group time shifts, amplitude scaling/bias, and monotone time warping for augmentations or learned transformations.
  • Initialize parameters near identity and allow configuration via group_cfg to make transforms weak by default and easy to tune.

Description

  • Add timesead_ext/models/transforms/group.py implementing GroupTransform that supports differentiable time shifting via grid_sample, amplitude scale/bias (softplus-based scale and tanh-bounded bias), and monotone warping using cumulative softplus knots resampled to length T with F.interpolate.
  • Parameters are learnable and initialized near identity using a _softplus_inverse helper for scale/knots and zeros for shift/bias, and they are read from group_cfg keys: k_group, enable_shift, enable_scale_bias, enable_warp, warp_knots, max_shift_frac, scale_range, bias_range, and warp_strength.
  • Implements internal helpers for building sampling grids (_make_base_grid, _get_shift_grid, _get_warp_grid), a 1D grid_sample wrapper _grid_sample_1d, and broadcasting utilities for group/ batch expansion.
  • Expose the new transforms package in timesead_ext/models/__init__.py and add timesead_ext/models/transforms/__init__.py exporting GroupTransform.

Testing

  • No automated tests were run as part of this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant