https://github.com/aim-uofa/dllm-midtruth
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: aim-uofa
- Language: Python
- Default Branch: main
- Size: 1.26 MB
Statistics
- Stars: 41
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
Time Is a Feature: Exploiting Temporal Dynamics in Diffusion Language Models
📣 News
- [2025-08-21] Code of Temporal Self-Consistency Voting and Evaluation Released!
- [2025-08-13] Paper Released!
🚀 Overview
📖 Description
Diffusion large language models (dLLMs) generate text through iterative denoising, yet current decoding strategies discard rich intermediate predictions in favor of the final output. Our work here reveals a critical phenomenon, temporal oscillation, where correct answers often emerge in the middle process, but are overwritten in later denoising steps. To address this issue, we introduce two complementary methods that exploit temporal consistency: - Temporal Self-Consistency Voting, a training-free, test-time decoding strategy that aggregates predictions across denoising steps to select the most consistent output; - Temporal Consistency Reinforcement, a post-training method that uses Temporal Semantic Entropy (TSE), a measure of semantic stability across intermediate predictions, as a reward signal to encourage stable generations.
⚙️ Getting Started
Environment Setup
To setup the environment, run;
conda env create -f env.yml
conda activate tiaf
Temporal Majority Voting
We provide a simple plug-and-play generate script to perform temporal self-consistency voting in eval/generate.py.
You can enable the voting mechanism by passing the --enable_vote flag together with both --tokenizer and --parse_answer_func.
Optionally, you may also specify --vote_method (fixed, linear, or exp) and, if using the exp method, control the weighting strength with --alpha.
Evaluation
You can easily evaluate our method by running the following command (using GSM8K with a generation length of 128 as an example):
```bash cd eval
CUDAVISIBLEDEVICES=0,1,2,3 torchrun \ --nprocpernode 4 \ --masterport 29173 \ eval.py \ --dataset gsm8k \ --batchsize 8 \ --genlength 128 \ --diffusionsteps 64 \ --outputdir "outputs/LLaDA-8B-Instruct/gsm8kgen128steps64temp0vote" \ --modelpath <yourmodelpath> \ --enablevote \ --vote_method exp \ --alpha 5.0 ```
For convenience, we also provide a wrapper script eval/run_eval.sh that allows easier evaluation management.
You can modify the parameters in this script to test different datasets, and voting strategies.
To compute accuracy, run get_acc.py after the evaluation is done.
🚩 Plan
- [x] source code of temporal self-consistency voting and evaluation
- [ ] source code of temporal consistency reinforcement
- [ ] checkpoints of temporal consistency reinforcement
🎫 License
For academic use, this project is licensed under the 2-clause BSD License. For commercial use, please contact Chunhua Shen.
🖊️ Citation
If you find this work useful, please consider citing:
bibtex
@article{wang2025temporaldynamics,
title={Time Is a Feature: Exploiting Temporal Dynamics in Diffusion Language Models},
author={Wen, Wang and Bozhen, Fang and Chenchen, Jing and Yongliang, Shen and Yangyi, Shen and Qiuyu, Wang and Hao, Ouyang and Hao, Chen and Chunhua, Shen},
journal={arXiv preprint arXiv:2508.09138},
year={2025}
}
Owner
- Name: Advanced Intelligent Machines (AIM)
- Login: aim-uofa
- Kind: organization
- Location: China
- Repositories: 23
- Profile: https://github.com/aim-uofa
A research team at Zhejiang University, focusing on Computer Vision and broad AI research ...
GitHub Events
Total
- Issues event: 4
- Watch event: 22
- Issue comment event: 2
- Push event: 1
- Fork event: 1
Last Year
- Issues event: 4
- Watch event: 22
- Issue comment event: 2
- Push event: 1
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 0
- Average time to close issues: 17 days
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 0
- Average time to close issues: 17 days
- Average time to close pull requests: N/A
- Issue authors: 3
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- NielsRogge (1)
- zs1314 (1)
- pUmpKin-Co (1)