kth.sePublications
Change search
Link to record
Permanent link

Direct link
Publications (6 of 6) Show all publications
Lundén, D., Hummelgren, L., Kudlicka, J., Eriksson, O. & Broman, D. (2024). Suspension Analysis and Selective Continuation-Passing Style for Universal Probabilistic Programming Languages. In: Programming Languages and Systems - 33rd European Symposium on Programming, ESOP 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Proceedings: . Paper presented at 33rd European Symposium on Programming, ESOP 2024, held as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, Apr 6 2024 - Apr 11 2024 (pp. 302-330). Springer Nature, 14577
Open this publication in new window or tab >>Suspension Analysis and Selective Continuation-Passing Style for Universal Probabilistic Programming Languages
Show others...
2024 (English)In: Programming Languages and Systems - 33rd European Symposium on Programming, ESOP 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Proceedings, Springer Nature , 2024, Vol. 14577, p. 302-330Conference paper, Published paper (Refereed)
Abstract [en]

Universal probabilistic programming languages (PPLs) make it relatively easy to encode and automatically solve statistical inference problems. To solve inference problems, PPL implementations often apply Monte Carlo inference algorithms that rely on execution suspension. State-of-the-art solutions enable execution suspension either through (i) continuation-passing style (CPS) transformations or (ii) efficient, but comparatively complex, low-level solutions that are often not available in high-level languages. CPS transformations introduce overhead due to unnecessary closure allocations—a problem the PPL community has generally overlooked. To reduce overhead, we develop a new efficient selective CPS approach for PPLs. Specifically, we design a novel static suspension analysis technique that determines parts of programs that require suspension, given a particular inference algorithm. The analysis allows selectively CPS transforming the program only where necessary. We formally prove the correctness of the analysis and implement the analysis and transformation in the Miking CorePPL compiler. We evaluate the implementation for a large number of Monte Carlo inference algorithms on real-world models from phylogenetics, epidemiology, and topic modeling. The evaluation results demonstrate significant improvements across all models and inference algorithms.

Place, publisher, year, edition, pages
Springer Nature, 2024
Series
Lecture Notes in Computer Science, ISSN 0302-9743 ; 14577
Keywords
Continuation-passing style, Probabilistic programming, Static analysis
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-346543 (URN)10.1007/978-3-031-57267-8_12 (DOI)001281762600012 ()2-s2.0-85192176283 (Scopus ID)
Conference
33rd European Symposium on Programming, ESOP 2024, held as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, Apr 6 2024 - Apr 11 2024
Note

QC 20240521

Part of ISBN 978-303157266-1

Available from: 2024-05-16 Created: 2024-05-16 Last updated: 2024-09-12Bibliographically approved
Eriksson, O., Palmkvist, V. & Broman, D. (2023). Partial Evaluation of Automatic Differentiation for Differential-Algebraic Equations Solvers. In: GPCE 2023 - Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, Co-located with: SPLASH 2023: . Paper presented at 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2023, Cascais, Portugal, Oct 22 2023 - Oct 23 2023 (pp. 57-71). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Partial Evaluation of Automatic Differentiation for Differential-Algebraic Equations Solvers
2023 (English)In: GPCE 2023 - Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, Co-located with: SPLASH 2023, Association for Computing Machinery (ACM) , 2023, p. 57-71Conference paper, Published paper (Refereed)
Abstract [en]

Differential-Algebraic Equations (DAEs) are the foundation of high-level equation-based languages for modeling physical dynamical systems. Simulating models in such languages requires a transformation known as index reduction that involves differentiating individual equations before numerical integration. Commercial and open-source implementations typically perform index reduction by symbolic differentiation (SD) and produce a Jacobian callback function with forward-mode automatic differentiation (AD). The former results in efficient runtime code, and the latter is asymptotically efficient in both runtime and code size. However, AD introduces runtime overhead caused by a non-standard representation of real numbers, and SD is not always applicable in models with general recursion. This work proposes a new approach that uses partial evaluation of AD in the context of numerical DAE solving to combine the strengths of the two differentiation methods while mitigating their weaknesses. Moreover, our approach selectively specializes partial derivatives of the Jacobian by exploiting structural knowledge while respecting a user-defined bound on the code size. Our evaluation shows that the new method both enables expressive modeling from AD and retains the efficiency of SD for many practical applications.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2023
Keywords
Automatic Differentiation, Compiler, Differential-Algebraic Equations, Jacobian Generation, Partial Evaluation
National Category
Control Engineering
Identifiers
urn:nbn:se:kth:diva-340543 (URN)10.1145/3624007.3624054 (DOI)001125851800005 ()2-s2.0-85177667040 (Scopus ID)
Conference
22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, GPCE 2023, Cascais, Portugal, Oct 22 2023 - Oct 23 2023
Note

Part of proceedings ISBN 9798400704062

QC 20231207

Available from: 2023-12-07 Created: 2023-12-07 Last updated: 2024-01-22Bibliographically approved
Bereza-Jarocinski, R., Eriksson, O., Abdalmoaty, M.-H. R., Broman, D. & Hjalmarsson, H. (2022). Stochastic Approximation for Identification of Non-Linear Differential-Algebraic Equations with Process Disturbances. In: 2022 IEEE 61ST CONFERENCE ON DECISION AND CONTROL (CDC): . Paper presented at IEEE 61st Conference on Decision and Control (CDC), DEC 06-09, 2022, Cancun, MEXICO (pp. 6712-6717). Institute of Electrical and Electronics Engineers (IEEE)
Open this publication in new window or tab >>Stochastic Approximation for Identification of Non-Linear Differential-Algebraic Equations with Process Disturbances
Show others...
2022 (English)In: 2022 IEEE 61ST CONFERENCE ON DECISION AND CONTROL (CDC), Institute of Electrical and Electronics Engineers (IEEE) , 2022, p. 6712-6717Conference paper, Published paper (Refereed)
Abstract [en]

Differential-algebraic equations, commonly used to model physical systems, are the basis for many equation-based object-oriented modeling languages. When systems described by such equations are influenced by unknown process disturbances, estimating unknown parameters from experimental data becomes difficult. This is because of problems with the existence of well-defined solutions and the computational tractability of estimators. In this paper, we propose a way to minimize a cost function-whose minimizer is a consistent estimator of the true parameters-using stochastic gradient descent. This approach scales significantly better with the number of unknown parameters than other currently available methods for the same type of problem. The performance of the method is demonstrated through a simulation study with three unknown parameters. The experiments show a significantly reduced variance of the estimator, compared to an output error method neglecting the influence of process disturbances, as well as an ability to reduce the estimation bias of parameters that the output error method particularly struggles with.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2022
Series
IEEE Conference on Decision and Control, ISSN 0743-1546
National Category
Control Engineering
Identifiers
urn:nbn:se:kth:diva-326394 (URN)10.1109/CDC51059.2022.9993085 (DOI)000948128105103 ()2-s2.0-85147002802 (Scopus ID)
Conference
IEEE 61st Conference on Decision and Control (CDC), DEC 06-09, 2022, Cancun, MEXICO
Note

QC 20230503

Available from: 2023-05-03 Created: 2023-05-03 Last updated: 2023-12-15Bibliographically approved
Abdalmoaty, M., Eriksson, O., Bereza-Jarocinski, R., Broman, D. & Hjalmarsson, H. (2021). Identification of Non-Linear Differential-Algebraic Equation Models with Process Disturbances. In: Proceedings The 60th IEEE conference on Decision and Control (CDC): . Paper presented at The 60th IEEE conference on Decision and Control (CDC), Dec. 13-17, 2021, Austin, Texas, USA. Institute of Electrical and Electronics Engineers (IEEE)
Open this publication in new window or tab >>Identification of Non-Linear Differential-Algebraic Equation Models with Process Disturbances
Show others...
2021 (English)In: Proceedings The 60th IEEE conference on Decision and Control (CDC), Institute of Electrical and Electronics Engineers (IEEE) , 2021Conference paper, Published paper (Refereed)
Abstract [en]

Differential-algebraic equations (DAEs) arise naturally as a result of equation-based object-oriented modeling. In many cases, these models contain unknown parameters that have to be estimated using experimental data. However, often the system is subject to unknown disturbances which, if not taken into account in the estimation, can severely affect the model's accuracy. For non-linear state-space models, particle filter methods have been developed to tackle this issue. Unfortunately, applying such methods to non-linear DAEs requires a transformation into a state-space form, which is particularly difficult to obtain for models with process disturbances. In this paper, we propose a simulation-based prediction error method that can be used for non-linear DAEs where disturbances are modeled as continuous-time stochastic processes. To the authors' best knowledge, there are no general methods successfully dealing with parameter estimation for this type of model. One of the challenges in particle filtering  methods are random variations in the minimized cost function due to the nature of the algorithm. In our approach, a similar phenomenon occurs and we explicitly consider how to sample the underlying continuous process to mitigate this problem. The method is illustrated numerically on a pendulum example. The results suggest that the method is able to deliver consistent estimates.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2021
Series
IEEE Conference on Decision and Control, ISSN 0743-1546
Keywords
Nonlinear Identification; Process Disturbance; Differential-Algebraic Equations; Parameter Estimation; Simulated PEM
National Category
Control Engineering
Identifiers
urn:nbn:se:kth:diva-292187 (URN)10.1109/CDC45484.2021.9683787 (DOI)000781990302018 ()2-s2.0-85126001444 (Scopus ID)
Conference
The 60th IEEE conference on Decision and Control (CDC), Dec. 13-17, 2021, Austin, Texas, USA
Funder
Swedish Research Council, 2019-04956 and 2016-06079 (the research environment NewLEADS)Swedish Foundation for Strategic Research, FFL15-0032
Note

Financially also supported by SRA ICT TNG (Digital Futures) and KTH.

Part of proceedings ISBN 978-1-6654-3659-5

QC 20210326

QC 20220705

Available from: 2021-03-26 Created: 2021-03-26 Last updated: 2022-07-05Bibliographically approved
Broman, D. & Eriksson, O. (2019). Functional programmatic modeling in modelyze. In: ACM International Conference Proceeding Series: . Paper presented at 9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2019, 5 November 2019. Association for Computing Machinery
Open this publication in new window or tab >>Functional programmatic modeling in modelyze
2019 (English)In: ACM International Conference Proceeding Series, Association for Computing Machinery , 2019Conference paper, Published paper (Refereed)
Abstract [en]

Recent years are characterized by a growing digitalization of production environment and other areas of human's life. Complex cyber-physical systems play a very important role within this development. Hence, integrated model-based design of such systems has gained significant attention. Quite naturally, this leads to the necessity of modeling hybrid system - systems containing both continuous-time and event-based phenomena. Hybrid modeling languages based on equations, supporting both continuous-time and eventbased aspects (e.g. Modelica, SysML, VHDL-AMS, and Simulink/Simscape) enable high-level reuse and integrated modeling capabilities of both the physically surrounding system and software for embedded systems. Using such equation-based object-oriented (EOO) modeling languages, it has become feasible to model complex systems covering multiple application domains at a high level of abstraction through reusable model components. They thus offer considerable advantages for many application areas. EOOLT is a forum for researchers with interests in all aspects of equation-based modeling languages and their supporting tools, including design, implementation, open issues limiting their expressiveness or usefulness, as well as novel applications.

Place, publisher, year, edition, pages
Association for Computing Machinery, 2019
Keywords
modeling languages, simulation, Computer software reusability, Continuous time systems, Embedded systems, High level languages, Hybrid systems, Object oriented programming, Equation-based modeling, High level of abstraction, Hybrid modeling language, Integrated modeling, Multiple applications, Novel applications, Production environments
National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-274126 (URN)10.1145/3365984.3369802 (DOI)2-s2.0-85081120317 (Scopus ID)
Conference
9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2019, 5 November 2019
Note

QC 20200630

Part of ISBN 9781450377133

Available from: 2020-06-30 Created: 2020-06-30 Last updated: 2024-10-25Bibliographically approved
Lundén, D., Hummelgren, L., Kudlicka, J., Eriksson, O. & Broman, D.Suspension Analysis and Selective Continuation-Passing Style for Higher-Order Probabilistic Programming Languages.
Open this publication in new window or tab >>Suspension Analysis and Selective Continuation-Passing Style for Higher-Order Probabilistic Programming Languages
Show others...
(English)Manuscript (preprint) (Other academic)
Abstract [en]

Probabilistic programming languages (PPLs) make encoding and automatically solving statistical inference problems relatively easy by separating models from the inference algorithm. A popular choice for solving inference problems is to use Monte Carlo inference algorithms. For higher-order functional PPLs, these inference algorithms rely on execution suspension to perform inference, most often enabled through a full continuation-passing style (CPS) transformation. However, standard CPS transformations for PPL compilers introduce significant overhead, a problem the community has generally overlooked. State-of-the-art solutions either perform complete CPS transformations with performance penalties due to unnecessary closure allocations or use efficient, but complex, low-level solutions that are often not available in high-level languages. In contrast to prior work, we develop a new approach that is both efficient and easy to implement using higher-order languages. Specifically, we design a novel static suspension analysis technique that determines the parts of a program that require suspension, given a particular inference algorithm. The analysis result allows selectively CPS transforming the program only where necessary. We formally prove the correctness of the suspension analysis and implement both the suspension analysis and selective CPS transformation in the Miking CorePPL compiler. We evaluate the implementation for a large number of Monte Carlo inference algorithms on real-world models from phylogenetics, epidemiology, and topic modeling. The evaluation results demonstrate significant improvements across all models and inference algorithms.

National Category
Computer Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:kth:diva-324295 (URN)
Note

QC 20230227

Available from: 2023-02-25 Created: 2023-02-25 Last updated: 2023-03-02Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0009-0001-0678-549X

Search in DiVA

Show all publications