AgriForeSight: Collaborative Forecasting of Indonesian Rice Prices Using LSTM and GNN
๐ค Project Overview
This project is a collaborative research and development effort aimed at forecasting daily premium rice prices across Indonesian provinces using deep learning techniques. We explored and compared two modeling approaches: Long Short-Term Memory (LSTM) and Graph Neural Network (GNN), followed by model evaluation and frontend visualization.
๐ฅ Team Contributions
- A. Tasdik Bijaksana (me - Project Leader): Led the entire project from conceptualization to completion, coordinated team activities and task distribution. Implemented and evaluated the GNN-based model (GCN/GAT-GRU architecture), including data preprocessing, temporal graph construction, feature engineering, and model tuning. Managed project timeline, facilitated team meetings, and ensured quality deliverables across all components.
- Muh. Naufal Fahri Salim: Developed and optimized the LSTM-based forecasting model, and also built the deployment-ready web application to showcase predictions from the best-performing model.
- Fara Rahmasari Fahirun: Contributed to the academic paper writing, visualization, and frontend interface design.
- Muh. Aipun Pratama: Responsible for conducting the literature review search, summarizing key references, and assisting in paper writing.
๐ฏ Project Leadership & Management
As the Project Leader, I took on multiple responsibilities beyond technical implementation:
๐ Project Coordination
- Strategic Planning: Defined project scope, objectives, and success metrics for the rice price forecasting initiative
- Task Distribution: Allocated responsibilities based on team membersโ strengths and expertise areas
- Timeline Management: Created and maintained project milestones, ensuring deliverable deadlines were met
- Quality Assurance: Reviewed all components (models, code, documentation, and deployment) for consistency and quality
๐ค Team Management
- Regular Meetings: Conducted weekly progress meetings and technical discussions
- Knowledge Sharing: Facilitated cross-team learning sessions on LSTM vs GNN approaches
- Problem Solving: Addressed technical challenges and resource constraints collaboratively
- Mentorship: Provided guidance on deep learning best practices and research methodologies
- Work Review & Quality Control: Systematically reviewed each team memberโs contributions:
- LSTM Model Review: Evaluated model architecture, hyperparameter tuning, and performance optimization strategies
- Frontend Code Review: Assessed web application functionality, user interface design, and deployment readiness
- Academic Writing Review: Reviewed paper sections for technical accuracy, clarity, and academic standards
- Literature Review Assessment: Validated research references, methodology citations, and theoretical foundations
๐ Technical Leadership
- Architecture Decisions: Led the decision to compare LSTM and GNN approaches for comprehensive analysis
- Data Strategy: Oversaw data collection strategy and preprocessing pipeline design
- Model Integration: Ensured consistent evaluation metrics and fair comparison between different approaches
- Research Direction: Guided the team toward academically rigorous and practically applicable solutions
๐ Project Deliverables Oversight
- Code Quality: Established coding standards and review processes across team repositories
- Documentation: Ensured comprehensive documentation for reproducibility and future development
- Academic Paper: Coordinated the research paper writing process and maintained academic standards
- Deployment: Supervised the web application development and deployment strategy
- Peer Review Process: Implemented systematic review cycles for all deliverables:
- Technical Review: Validated model implementations, data preprocessing pipelines, and experimental setups
- Code Review: Ensured clean, documented, and reproducible code across all team contributions
- Content Review: Reviewed academic paper sections, visualization accuracy, and technical documentation
- Integration Review: Verified compatibility and consistency between different project components
๐งพ Dataset
- Source: Badan Pangan Nasional RI
- Commodity: Premium rice
- Span: May 2022 โ May 2025
- Size: 41,648 records across 34 provinces
- Attributes: Date, Province, Commodity, Price
๐ง Methodology
โ๏ธ Preprocessing
- Date parsing, missing value handling, normalization
- Added engineered features:
month_sin,quarter_sin,rolling_mean,rolling_std - Used 30-day input window to predict next 30 days
๐ GNN Component (My Work)
- Pivoted dataset into
(date x province)format - Constructed spatial graphs based on geographical proximity
- Created daily graph snapshots for temporal learning
- Implemented and trained GAT-GRU-based architecture
- Applied weighted Huber loss and attention decoder
๐ LSTM Component (Teammateโs Work)
- Standard sequence modeling with engineered temporal features
- Multi-layer LSTM with optimized hyperparameters
๐ Results
| Model | MAE | MAPE (%) | RMSE | Rยฒ |
|---|---|---|---|---|
| LSTM (Final) | 319.01 | 2.28 | 514.80 | 0.8561 |
| GNN (Final) | 451.42 | 3.00 | 546.93 | -5.9673 |
While the LSTM model performed better in this context, the GNN model provided valuable insights into the limitations and strengths of spatial-temporal modeling under constrained features.
๐ผ๏ธ Visual Insights
- LSTM captured price fluctuations with high fidelity.
- GNN demonstrated spatial pattern potential but required richer exogenous features to generalize better.
๐ Tech Stack
- Language: Python
- Libraries: PyTorch, Pandas, Scikit-learn, NetworkX, Matplotlib
- Tools: Google Colab, GitHub, Kaggle Notebooks
๐ Project Links
- ๐ Collaborative Paper (PDF)
- ๐ AgriForeSight Website (LSTM Model Deployment)
- ๐ Notebook (My GNN Work)
๐ Key Takeaways
- Project Leadership: Successfully led a multidisciplinary team of 4 members, coordinating technical development, research, and deployment activities
- LSTM outperforms GNN in low-feature scenarios, especially with purely temporal data.
- GNN, when equipped with richer exogenous inputs (e.g., weather, policy data), could yield stronger performance due to spatial learning.
- Team collaboration was essential to divide workloads efficiently and ensure a high-quality end product.
- Research Management: Demonstrated ability to manage complex AI research projects from conception to academic publication and practical deployment
๐ฎ Future Work
- Add more exogenous spatial-temporal variables (weather, logistics).
- Deploy the web-based visualization dashboard.
- Explore hybrid LSTM-GNN architectures.
โ Conclusion
This collaborative project demonstrated the strengths and limitations of both LSTM and GNN in rice price forecasting. As the Project Leader, I successfully coordinated a multidisciplinary team to deliver comprehensive research outputs including model development, academic publication, and practical deployment. Through effective team management and division of roles, we were able to explore multiple dimensions of machine learning, from advanced model architectures to full-stack deployment and academic publishing, showcasing both technical expertise and leadership capabilities in AI research projects.
